Source: https://01router.com/docs/models/wan-2.7/cancel Base URL: https://01router.com/api/v1 # Wan 2.7 · Cancel a task POST /generations/:id/cancel asks the provider to stop a running task. Once the provider confirms, the task ends as failed with error "Canceled by user" and its credits are refunded. Supported on fal (while still queued) and Replicate; other providers, or tasks already finished, answer 409 not_cancelable. `POST /api/v1/generations/{id}/cancel` Bearer API key ## Input parameters | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | id | string · path | yes | Generation ID returned by the create request. | | ## Response fields | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | id | string | — | Generation ID returned by the create request. | | | object | "generation" | — | generation | | | model | string | — | Model slug from the catalog. Project keys may use a project-specific model slug. | | | type | video \| image \| audio \| chat | — | | | | provider | string | — | Optional provider slug. Omit for automatic routing; project settings may pin the provider. | | | status | string | — | queued / processing / succeeded / failed. Stop polling on succeeded or failed. | | | input | object | — | Model-specific input object. See the selected model reference for required fields, defaults and limits. | | | outputs | string[] | — | Result file URLs. Empty until available; download promptly because URLs may expire. | | | error | string \| null | — | Error message on failure; null otherwise. | | | credits | number | — | Credits charged for this generation; zero after a refund. | | | price_usd | number | — | Price of this generation in USD; zero after a refund. | | | created_at | string | — | Creation time in ISO 8601 format. | | | completed_at | string \| null | — | Completion time in ISO 8601 format, or null while running. | | ## cURL ```bash curl -X POST 'https://01router.com/api/v1/generations/gen_example/cancel' \ -H "Authorization: Bearer $API_KEY" ``` ## 200 · application/json ```json { "id": "gen_example", "object": "generation", "model": "wan-2.7", "type": "video", "provider": "fal", "status": "failed", "input": { "prompt": "A cinematic landscape at sunrise.", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9" }, "outputs": [], "error": "Canceled by user", "credits": 0, "price_usd": 0, "created_at": "2026-10-25T08:00:00.000Z", "completed_at": "2026-10-25T08:01:00.000Z" } ```