Errors
HTTP status codes and error codes returned by the Seedance 3.0 API, and when to retry.
Errors use standard HTTP status codes and a JSON body:
{
"error": {
"type": "insufficient_credits",
"code": "INSUFFICIENT_CREDITS",
"message": "Not enough credits. Top up at /pricing."
}
}code is present when the failure came from the generation pipeline. param names the offending field on validation errors.
Status codes
| Status | error.type | error.code | What to do |
|---|---|---|---|
400 | invalid_request_error | INVALID_INPUT, CONTENT_POLICY | Fix the request or prompt. Don't retry unchanged |
401 | authentication_error | Check the API key | |
402 | insufficient_credits | INSUFFICIENT_CREDITS | Top up credits |
403 | permission_error | The account is disabled | |
404 | not_found_error | Unknown model id or generation id | |
429 | rate_limit_error | RATE_LIMIT, TOO_MANY_IN_FLIGHT | Back off and retry; wait for running jobs to finish |
502 | api_error | GENERATION_FAILED | Provider failed. Retry once |
503 | api_error | SERVICE_UNAVAILABLE | Retry with exponential backoff |
504 | api_error | TIMEOUT | Retry with exponential backoff |
Failed generations
A generation can also fail after it was created. In that case GET /generations/{id} returns 200 with status: "failed" and an error object using the same codes:
{
"id": "0b6f4c1e-8f1a-4d0e-9a51-1d3c2a7e9b10",
"object": "generation",
"status": "failed",
"outputs": [],
"error": {
"code": "CONTENT_POLICY",
"message": "The prompt or input media was rejected by content moderation."
}
}Credits for failed generations are refunded automatically, except when the finished output is blocked by moderation or the job times out at the provider.
Limits
- Requests to
POST /generationsfrom the same client are limited to roughly one per second. - Each account can have a limited number of generations running at once. Extra requests return
429withTOO_MANY_IN_FLIGHTuntil one finishes.