Seedream image API
Model IDs, generation and reference-image examples, and task polling.
Use an Official Group API key and the public model IDs below exactly as written.
Supported protocol
Generate with JSON POST /v1/images/generations, or upload files with
POST /v1/images/edits (multipart/form-data). Submission returns 202 Accepted
and a task id. Poll GET /v1/tasks/{id} until completed or failed.
A 202 response is not a completed image.
This family uses Images + asynchronous tasks. Image generation through
/v1/chat/completions or /v1/responses is not supported.
See the complete submission and polling example.
Models and parameters
| Public model ID | resolution | n | Reference limit |
|---|---|---|---|
seedream-4-0 | 1K / 2K / 4K | 1–15 | 14 |
seedream-4-5 | 2K / 4K | 1–15 | 14 |
seedream-5-0-lite | 2K / 3K | 1–15 | 14 |
seedream-5-0-pro | 1K / 1.5K / 2K | 1 | 10 |
4.0 and 4.5 require n=1 without references. For 4.0, 4.5 and Lite, references plus requested outputs must not exceed 15. Lite supports text-only batch generation; Pro always returns one image. Use aspect ratios such as 1:1 or 16:9 for size; auto requires references. Pro also accepts valid exact WIDTHxHEIGHT dimensions.
Generate an image
Set APIPOOL_API_KEY to your key, then run:
APIPOOL_ENDPOINT="https://app.apipool.dev"
curl "$APIPOOL_ENDPOINT/v1/images/generations" \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-pro",
"prompt": "A blue ceramic cup on a white table",
"size": "1:1",
"resolution": "1K",
"n": 1
}'Edit an image
Upload a local PNG, JPEG or WebP file, replacing source.png with its path:
curl "https://app.apipool.dev/v1/images/edits" \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-F "model=seedream-5-0-pro" \
-F "prompt=Change the cup to green" \
-F "image=@./source.png" \
-F "size=1:1" \
-F "resolution=1K" \
-F "n=1"For multiple references, repeat -F "image=@./second.png" within the model's limit.
To use publicly downloadable references, send image_urls to the same JSON
generation endpoint:
{
"model": "seedream-5-0-pro",
"prompt": "Change the cup to green",
"size": "1:1",
"resolution": "1K",
"n": 1,
"image_urls": ["https://your-cdn.example/source.png"]
}Replace the example URL with a real address reachable by the server. Expired tunnels, DNS failures and download timeouts can fail the task. Browser-only localhost or authenticated image URLs are unsuitable.
Poll and retrieve results
Save the submission's id, such as imgtask_01..., and query with the same key:
TASK_ID="imgtask_01..."
curl "https://app.apipool.dev/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIPOOL_API_KEY"Continue polling for submitted, submission_unknown, processing or
meter_pending. On completed, read data[].url and download before expiry.
On failed, inspect error. Do not resubmit while waiting.
See Asynchronous image tasks for all states,
timeout handling and a runnable polling example.
Scope and billing
Do not send stream: true, tools, masks or explicit sequential-generation options. layer_decomposition: true is not supported.
See the selected model and group in Models & pricing. Pricing and available parameter tiers depend on that listing. Pro includes the first reference at no extra charge; additional references are billed individually.