Errors, retries and recovery
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.
Separate HTTP request errors from generation failure: a successful GET can return HTTP200 with task status=failed/expired. For material/verification responses, inspect ResponseMetadata.Error and Result.Error even on HTTP200.
Retain the actual HTTP status, complete body, code/message/type/param, numeric codes and valid extensions. The summary below provides common handling, not a complete fixed error enumeration. See the official catalog for additional generic errors.
| HTTP | Next steps |
|---|---|
| 400 | Inspect required fields and specific parameters; corrected submissions are deliberate new intents |
| 401 / 403 | Check the Key and current access; do not rotate Keys automatically |
| 404 | Verify the ID, original Key and visibility; do not infer a refund or absence of submission |
| 409 | Follow the actual conflict message without changing targets to force a retry |
| 413 | Reduce the oversized request before submitting again |
| 422 | An internal timeout can mean already submitted; recover the original intent |
| 429 / 5xx | Back off using Retry-After; preserve uncertain mutation/create intents |
Recovery order
- Keep the original platform Key, body, task/operation identity and stable key.
- If a task id is known, query that task instead of POSTing again.
- For materials, query X-Tokenlio-Operation-Id; RequestId cannot replace it.
- If the result is unknown, recover with the same body/key, not a new key used as a probe.
- Follow TaskSubmissionPending / TaskSettlementPending / TaskInUse messages; wait and query the original task on TaskOperationPending.
Unknown mutations and operation receipts
A mutation may return X-Tokenlio-Operation-Id; save that platform operation UUID. It is neither an asset ID nor ResponseMetadata.RequestId. RequestId is diagnostic and cannot replace the platform operation ID, even if it looks like a UUID.
curl -sS --fail-with-body 'https://api.tokenlio.ai/api/v3/assets/operations/OPERATION_ID' \
-H "Authorization: Bearer $TOKENLIO_API_KEY"This GET has no body or query parameters and uses the original platform Key. It reads the original operation without resubmitting a mutation. Only state=succeeded is complete. sending/unknown/observed are not success; observed means a result has been observed, while rejected is a definitive rejection. Do not substitute the previous operation ID when the current response has no operation header.
Timeouts,429/5xx and internal timeouts encoded as HTTP422 may already have submitted. Keep the original body, stable key and operation ID for recovery. Without an operation ID, use the original Action/body/stable key to recover the same intent rather than creating another mutation. Check the actual HTTP status, ResponseMetadata.Error and Result.Error, not200 alone.
HTTP request errors
{
"error": {
"code": "MissingParameter",
"message": "The request is missing the required parameter: model.",
"type": "BadRequest",
"param": "model"
}
}| HTTP | Code | Meaning |
|---|---|---|
400 | MissingParameter / InvalidParameter | Missing or invalid request fields. |
401 | AuthenticationError | Missing or invalid API Key. |
403 | AccessDenied | Access denied. |
404 | NotFound | Task absent or inaccessible. |
429 | See error.code/message | Request, concurrency or usage limit reached. |
500 | InternalServiceError | Unexpected service error. |
503 | NoAvailableService | Temporarily unavailable. |
HTTP errors include code, readable message and type; param identifies a field when known. Task-level errors use their own code/message inside the task object.
