Model Rover

Tasks and Callbacks

Query asynchronous work, process terminal callbacks, and control Seedance tasks safely.

Query a task

GET /v1/tasks/{taskId}
Authorization: Bearer $API_KEY

All asynchronous video protocols support the common lookup path. Seedance also supports its native alias:

GET /v1/contents/generations/tasks/{taskId}
curl "http://127.0.0.1:11113/v1/tasks/9dcf8ab2-c4b7-42be-a516-597223897b99" -H "Authorization: Bearer $API_KEY"

A task is visible only to an API key for the same wallet that created it. A missing task and a task owned by another wallet both return 404 task_not_found to prevent ID probing.

Native response shapes

The query endpoint returns the latest pre-rendered response in the creation protocol. It does not wrap every provider in another generic task schema.

Creation protocolPublic task ID fieldProgress or terminal fields
xAI videorequest_idstatus, progress, video, error, usage
Gemini Omni Interactionsidstatus, steps, usage
Gemini Veonamedone, then response or error
Seedanceidstatus, content, usage, provider-compatible metadata

Every ID in a public snapshot is the platform task ID. Upstream task IDs and internal routing identity are never exposed. A callback body and a GET response for the same terminal task are byte-compatible snapshots.

Polling

Poll with a bounded interval, such as 5–10 seconds for video work, and apply backoff for transport failures. Task lookup is read-only and safe to retry.

Stop polling when the native response reaches a terminal outcome:

ProtocolRunningSuccessFailure or expiration
xAIpendingdonefailed, expired
Omniqueued, in_progresscompletedfailed, incomplete, budget_exceeded, cancelled
Veodone: falsedone: true with generated samplesdone: true with an error or no accepted sample
Seedancequeued, runningsucceededfailed, cancelled, expired

Transient task-backend failures return 503; retain the task ID and retry instead of creating the model task again.

Terminal callbacks

Add a top-level callback_url to a supported asynchronous creation request. The platform sends the same terminal snapshot returned by GET as an HTTP POST body.

POST /your/callback?token=unguessable
Content-Type: application/json
Idempotency-Key: 9dcf8ab2-c4b7-42be-a516-597223897b99

Callback delivery is at least once. Deduplicate with the platform task ID or the outbound Idempotency-Key; that header applies only to callback delivery and does not make incoming model calls idempotent.

Delivery behavior:

  1. Settlement and terminal persistence complete before delivery starts.
  2. Each attempt has a 10-second timeout.
  3. Any 2xx response is successful.
  4. A failed first attempt is retried after approximately 10 seconds, 1 minute, and 10 minutes, for at most four attempts in total.
  5. Delivery failure never changes task settlement; polling remains available.

Callback URL requirements

  • The URL must use http or https and be syntactically valid when the task is created.
  • Delivery refuses loopback, private, link-local, cloud metadata, and other non-public addresses after DNS resolution.
  • Redirects are not followed.
  • Until a signed callback-verification contract is published, include an unguessable token in the URL and validate it on receipt.
  • Return a 2xx only after durably recording or idempotently processing the task ID.

Cancel or delete a Seedance task

DELETE /v1/contents/generations/tasks/{taskId}
Authorization: Bearer $API_KEY

This control path is specific to Seedance-compatible tasks.

Current stateBehavior
queuedCancels upstream work and updates the public snapshot to cancelled.
runningReturns 409; running work cannot be deleted through this endpoint.
cancelledReturns 409.
succeeded, failed, or expiredDeletes the upstream task resource and removes the public Redis lookup snapshot.

Deleting a terminal resource does not remove platform billing records, request logs, persisted task history, or retained media evidence. A later GET can return 404 even though those operational and financial records remain.

curl -X DELETE "http://127.0.0.1:11113/v1/contents/generations/tasks/9dcf8ab2-c4b7-42be-a516-597223897b99" -H "Authorization: Bearer $API_KEY"

A successful Seedance delete returns HTTP 200 with an empty JSON object:

{}

Creation retry safety

Incoming model calls reject Idempotency-Key. If a creation POST disconnects after it may have reached the upstream, do not automatically submit the same work again. Retain any returned platform task ID; if no ID was returned, surface the ambiguous outcome to the application rather than risking a duplicate billable task.

Help us improve this page

Found something unclear, outdated, or incorrect?

Last updated on