> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.videogen.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.videogen.io/_mcp/server.

# Cancel a workflow run

POST https://api.videogen.io/v1/workflows/runs/{workflowRunId}/cancel

Reference: https://docs.videogen.io/rest-api-reference/workflows/cancel-workflow-run

## Authentication

- `Authorization` header (bearer token, required) — API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

## Request

### Path parameters

- `workflowRunId` (string, required) — The workflow run id returned when the workflow was started.

## Response

### 202

Cancellation request accepted.

- `workflowRunId` (string, required) — Opaque workflow run id (e.g. `vg_work_...`).
- `projectId` (string, required) — Id of the project created for this workflow run (e.g. `vg_proj_...`).
- `projectUrl` (string, required) — Deep link to open this project in the VideoGen web editor. Not required for an API-only integration: store `projectId` and use the Projects API (export, remix, metadata). Use `projectUrl` when a person should open the project in the app to review or edit it manually. The project is visible only to members of your team and any project collaborators, the same access model as a project created in the dashboard.
- `remixActionIds` (list of string, required) — Opaque remix action ids (e.g. `vg_rmix_...`), one per `remixActions` entry in request order. Empty when no remix actions were requested. Each runs after the video is built; poll `GET /v1/projects/{projectId}/remix-actions`.

## Examples

**Response**

```json
{
  "workflowRunId": "string",
  "projectId": "string",
  "projectUrl": "string",
  "remixActionIds": [
    "string"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/workflows/runs/workflowRunId/cancel"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```