seedream
Doubao Seedance 4 0 Image Generation
Copy page
Detailed model guidance is not published yet.
/api/v1/developer/generationsCheck out Doubao Seedance 4 0 API pricing here, cheaper than Fal AI.
Model selection
| Model ID | Billing | Images per request | Reference size |
|---|---|---|---|
doubao-seedance-4-0 | 20 credits / generation | 1–4 per request | Max 8 files (≤20MB) |
This endpoint is asynchronous. An accepted request returns a UUID generation_id with an initial status such as queued. Use poll_after_ms to query Task Results until the task finishes.
Request headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | required | Bearer <token>, using a formal account API Key (pca_live_...) or OAuth access token. |
Content-Type | string | required | application/json |
Idempotency-Key | string | required | UUID v4 to safely retry requests without generating duplicates. |
Parameters
model_keystringrequiredModel ID to invoke: doubao-seedance-4-0.
operationstringrequiredSupported operation: image_generation.
negative_promptstringoptionalpromptstringoptionalreference_upload_idsarrayoptionalparameters.aspect_ratiostringoptionalSupported aspect ratios for output generation.
parameters.nintegeroptionalNumber of outputs to generate (1–4, default: 1).
parameters.qualitystringoptionalImage render quality.
Output specifications
| Aspect ratio | Resolutions |
|---|---|
1:1 | Default |
4:3 | Default |
3:4 | Default |
16:9 | Default |
9:16 | Default |
2:3 | Default |
3:2 | Default |
21:9 | Default |
5:4 | Default |
4:5 | Default |
Edit a reference image
Send owned reference uploads with the same endpoint. The reference fields are ignored when the model does not support them.
{
"model_key": "doubao-seedance-4-0",
"operation": "image_generation",
"prompt": "Enhance details, adjust lighting, cinematic finish",
"reference_upload_ids": [
"22222222-2222-4222-8222-222222222222"
]
}
Submit response
Returns HTTP 202 with initial task metadata upon successful acceptance. The following example illustrates the response shape; credit values come from the actual response:
{
"success": true,
"code": "OK",
"message": "OK",
"request_id": "docs-example",
"data": {
"generation_id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"model_key": "doubao-seedance-4-0",
"modality": "image",
"operation": "image_generation",
"created_at": "2026-10-14T00:00:00.000Z",
"updated_at": "2026-10-14T00:00:00.000Z",
"poll_after_ms": 2000,
"estimated_credits": 10,
"reserved_credits": 10,
"charged_credits": 0,
"outputs": []
}
}
Query a task result
/api/v1/developer/generations/{generation_id}Task status
| Status | Meaning |
|---|---|
| queued | Queued |
| running | Generating |
| succeeded | Succeeded; read the media list from the response. |
| failed | Failed; read the reason from the error object. The task is refunded in full. |
| cancelled | Task cancelled by client request. |
Billing
20 credits / generation
Credits are reserved when the task is created and settled when it completes. A failed task is refunded in full.
Common errors
| Situation | Handling |
|---|---|
HTTP 400 | Check that every parameter value is inside the published limit and that the body matches the schema. |
HTTP 401 | Check the credential. API keys and OAuth tokens are never accepted in query strings. |
HTTP 402 / 403 | Top up the credit wallet so the estimate can be covered. |
HTTP 422 | A field failed validation. Read the field name in the error details and resend. |
HTTP 429 | Back off and retry with jitter. |
| Task failed / blocked | Unsupported value, missing reference, or a content-safety block. Adjust the input and retry. |