---
title: Seedance · Query and manage tasks
description: "Query and manage tasks — Tokenlio Seedance API"
outline: [2, 3]
pageClass: video-api-reference seedance-v2-reference
---

# Query and manage tasks

::: info Seedance API（v3）
Use https://api.tokenlio.ai with your platform Bearer Key and an exact model ID from the current catalog. Official references provide more field details; use the addresses, authentication and examples on this page for your calls.
:::

Query the task UUID returned by creation every5–10 seconds until succeeded, failed, cancelled or expired. An HTTP query error does not justify creating a replacement task.

```bash
curl -sS --fail-with-body "https://api.tokenlio.ai/api/v3/contents/generations/tasks/$TASK_ID" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY"
```

## List, cancel and delete

Lists are filtered by **the current Workspace and the current platform API Key**, with current membership checks. Another Key in the same Workspace does not list this Key's tasks. Both `total` and `items` use that scope; items use the individual-task shape. An empty list is `{"total":0,"items":[]}`. This differs from the [Workspace-shared material library](./conventions#management-scope).

`filter.task_ids` accepts up to 500 platform UUIDs using repeated query keys, not commas or a JSON array. Other parameters cannot repeat. Omitting `filter.service_tier` filters default; explicitly use flex to list flex tasks.

| Query parameter | Description |
| --- | --- |
| `page_num` | 1–500; default 1. |
| `page_size` | 1–500; default 20. |
| `filter.status` | queued, running, succeeded, failed, cancelled or expired. |
| `filter.model` | Exact public model ID. |
| `filter.service_tier` | default or flex; default default. |
| `filter.task_ids` | Platform task IDs; repeat the query key for multiple IDs. |

Lists cover the last 7 days. Drafts created from 2026-10-28 10:00 UTC+8 are listed for 14 days. This window does not extend result URLs or delete billing history.

```bash
curl -sS --fail-with-body 'https://api.tokenlio.ai/api/v3/contents/generations/tasks?page_num=1&page_size=20&filter.status=succeeded' \
  -H "Authorization: Bearer $TOKENLIO_API_KEY"

curl -sS --fail-with-body -X DELETE 'https://api.tokenlio.ai/api/v3/contents/generations/tasks/TASK_ID' \
  -H "Authorization: Bearer $TOKENLIO_API_KEY"
```

Successful DELETE returns HTTP200 `{}`. A cancelled queued task remains queryable with status cancelled. New DELETE requests are not allowed for running or cancelled tasks. Deleting succeeded, failed or expired records makes them unavailable to GET and lists. Deletion does not refund successful generation or guarantee continued access to an existing video URL. Deleted drafts cannot be referenced by new tasks.

DELETE has **no JSON body**, separate `/cancel` path, or status/action/force fields. First GET the target and check its status. HTTP200 `{}` is an operation ACK; continue GET until cancellation is confirmed as cancelled. It does not prove a refund. Finished records can be deleted only after their original settlement; deletion does not refund captured charges.

| Condition | Handling |
| --- | --- |
| queued | Manually DELETE to cancel; cancellation can race generation. |
| running / cancelled | New DELETE is not allowed; another button cannot force cancellation or deletion. |
| succeeded / failed / expired | Delete after settlement; a successful deletion hides the record from GET and lists. |
| 409 | Follow the actual `TaskSubmissionPending`, `TaskSettlementPending`, `TaskInUse` or other code/message. |
| 503 / `TaskOperationPending`, timeout or uncertainty | Back off using Retry-After and query the original task. A404 or lost response does not prove cancellation or a refund. |

Optional `Idempotency-Key` identifies one cancel/delete intent. Retry with the original platform Key, target and stable operation key; use a new key only for a new intent or target. Stored results retain the original HTTP status/body, including a definitive rejection such as404. Not every repeated request becomes200.

```bash
curl -sS --fail-with-body --get 'https://api.tokenlio.ai/api/v3/contents/generations/tasks' \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  --data-urlencode 'filter.task_ids=TASK_ID_1' \
  --data-urlencode 'filter.task_ids=TASK_ID_2'

# Replace TASK_ID; keep TOKENLIO_OPERATION_KEY stable when retrying this intent.
curl -sS --fail-with-body -X DELETE 'https://api.tokenlio.ai/api/v3/contents/generations/tasks/TASK_ID' \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Idempotency-Key: ${TOKENLIO_OPERATION_KEY:?Set a stable operation key}"
```

## Task response

```json
{
  "id": "dfc68868-d388-4d83-a173-d44e47a8bec7",
  "model": "seedance-2.0",
  "status": "succeeded",
  "content": {
    "video_url": "https://example.com/result.mp4"
  },
  "resolution": "1080p",
  "duration": 5,
  "usage": {
    "completion_tokens": 108900,
    "total_tokens": 108900
  }
}
```

| Field | Meaning |
| --- | --- |
| `id / model / status` | Task ID, model ID and current state. |
| `content.video_url` | Video URL on success. |
| `content.last_frame_url` | Last-frame URL when requested and available. |
| `usage.completion_tokens / usage.total_tokens` | Actual generation token usage. |
| `usage.tool_usage.web_search` | Actual search calls when returned. |
| `error.code / error.message` | Failure details. |
| `draft_task_id` | Referenced draft ID. |
| `resolution / ratio / duration / output_format` | Actual output settings when returned. |
| `created_at / updated_at` | Unix timestamps when returned. |
| `seed / frames / framespersecond` | Generation metadata when returned. |
| `execution_expires_after / priority / service_tier / generate_audio / draft / safety_identifier / tools` | Additional metadata when returned. |

| status | What to do |
| --- | --- |
| `queued / running` | Keep querying the original task; do not create it again. |
| `succeeded` | Save the result promptly. Temporary URLs are not renewed by another query. |
| `failed / expired / cancelled` | Stop polling and inspect error. |

A failed/expired task still has an HTTP200 query response. A timeout or 429/5xx on the query does not prove generation failed. Back off and query the same ID. If creation itself times out, verify its outcome before creating another task.


## Next steps

- [Create video tasks](./generation)
- [Errors, retries and recovery](./errors)
- [Generation callbacks](./callbacks)


## Official references

- [Query and manage tasks · GET](https://docs.volcengine.com/docs/ark/get-video-generation-task-api?lang=zh)
- [Query and manage tasks · LIST](https://docs.volcengine.com/docs/ark/list-video-generation-tasks-api?lang=zh)
- [Query and manage tasks · DELETE](https://docs.volcengine.com/docs/ark/cancel-or-delete-video-generation-tasks-api?lang=zh)
