Images (Seedream)
Image generation and editing, compatible with the OpenAI Images API and passing Seedream extension fields through.
Generations
POST/v1/images/generations
| Field | Type | Description | |
|---|---|---|---|
| model | string | required | Copy an active catalogue id, such as dola-seedream-5-0-lite; a display name is not an API id. |
| prompt | string | required | Prompt. |
| size | string | optional | Model-specific resolution: Pro 1K / 1.5K / 2K; Lite 2K / 3K / 4K; 4.5 2K / 4K. Widthxheight is also allowed within official bounds. |
| n | integer | optional | Use 1 for one image. Lite / 4.5 accept 1–9 as the maximum image-set size; the gateway adapts this to the provider field, holds for the maximum, and settles actual outputs. Pro allows one image per request. |
| response_format | string | optional | url (default) or b64_json. |
| image | string | array | optional | Reference URL, data:image Base64, or an owned asset://<id>. Owned assets are checked and converted to upstream-compatible image data; max 10 MiB each and 20 MiB combined. |
| watermark | boolean | optional | Whether to add a watermark (Seedream extension). |
| sequential_image_generation | string | optional | Lite / 4.5 may use auto only with n to bound the maximum charge. Standalone sequential_image_generation_options are not accepted; n is adapted automatically by default. |
curl https://www.link42.ai/v1/images/generations \
-H "Authorization: Bearer $LINK42_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "dola-seedream-5-0-lite", "prompt": "Sunrise over the sea, film grain look", "size": "2K", "watermark": false}'{
"created": 1788300000,
"data": [{"url": "https://…/image.png", "size": "2048x2048"}],
"usage": {"generated_images": 1, "output_tokens": 0, "total_tokens": 0}
}Edits
POST/v1/images/edits
For Volcengine Ark and BytePlus image-to-image, call /v1/images/generations with image set to a URL, Base64 data URI, or your own asset://<id>. These providers do not expose a separate upstream edits endpoint. /v1/images/edits applies only to other providers explicitly configured for that endpoint.
Asynchronous generation
POST/v1/images/generations/async
Takes the same body as a synchronous generation (stream is not supported) and answers 202 with a task id at once. Use it when a large or high-quality image takes long enough to run into the idle timeout of a CDN or reverse proxy. The task runs as the API key that submitted it: authentication, IP allowlist, rate limits, billing and routing are those of a synchronous call.
Poll GET /v1/images/tasks/{id}; status moves through queued, running, then succeeded or failed. A succeeded task carries result in the shape of the synchronous response, where data[].url is a temporary download link to the image in platform storage, signed afresh on every read (valid for 1 hour by default); tasks and their images are kept for 72 hours by default. A failed task carries error with the code and message a synchronous call would have returned.
A task turned away by a rate or concurrency limit does not fail: it goes back to the queue and runs later, and ends with that limit's error only after waiting more than 30 minutes. Each user may have 10 tasks queued or running at once by default; beyond that the submission answers 429 too_many_running_tasks. Submissions honour the Idempotency-Key header: a retry with the same key while the task is retained returns the task the first submission created (with the response header Idempotency-Replayed: true) instead of rendering and charging again; the same key with a different body answers 409 idempotency_conflict.
curl https://www.link42.ai/v1/images/generations/async \
-H "Authorization: Bearer $LINK42_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "dola-seedream-5-0-lite", "prompt": "Sunrise over the sea, film grain look", "size": "4K"}'{
"id": "imgtask_7c10e3ddf2dd27209947d8b9c0b603b2",
"object": "image.task",
"model": "dola-seedream-5-0-lite",
"status": "queued",
"created_at": 1788300000
}curl https://www.link42.ai/v1/images/tasks/imgtask_7c10e3ddf2dd27209947d8b9c0b603b2 \
-H "Authorization: Bearer $LINK42_API_KEY"{
"id": "imgtask_7c10e3ddf2dd27209947d8b9c0b603b2",
"object": "image.task",
"model": "dola-seedream-5-0-lite",
"status": "succeeded",
"created_at": 1788300000,
"finished_at": 1788300042,
"expires_at": 1788559242,
"result": {
"created": 1788300041,
"data": [{"url": "https://…/image-tasks/…/0.png?X-Amz-Signature=…"}],
"usage": {"generated_images": 1}
}
}Model reference
Seedream extensions are validated per model: n>1 for Lite / 4.5 is adapted to Ark image-set fields, and model is rewritten to the bound upstream id. The maximum output count is held, while actual images are settled. Older rows below aid migration; the live catalogue determines what is available.
| Model id | Name | Upstream | Billing | Fields that differ | Limits and gotchas |
|---|---|---|---|---|---|
| seedream-4-0-250828 | Seedream-4.0 | BytePlus Ark | Per image | prompt, size, response_format, stream, sequential_image_generation, watermark | Billed on usage.generated_images, falling back to the length of data when the upstream omits it; size accepts 1K / 2K / 4K or width x height |
| seedream-4-5-251128 | Seedream-4.5 | BytePlus Ark | Per image | Same as 4.0 | Same billing and size rules as 4.0 |
| seedream-5-0-260128 | Seedream-5.0 | BytePlus Ark | Per image | Same as 4.0 | Same billing and size rules as 4.0 |
| dola-seedream-5-0-pro-260628 | Seedream-5.0 Pro (upstream id) | BytePlus Ark | Per image (pixel-area tiers) | Supports 1K / 1.5K / 2K and image references; no image sets | This is the upstream id; the current LINK42 catalogue id is dola-seedream-5-0-pro. At most 2.61 MP: $0.045/image; above: $0.09/image. First input reference is free, then $0.003 each. |
| dola-seedream-5-0-pro | Dola-Seedream-5.0-pro | BytePlus Ark | Per image (pixel-area tiers) | 1K / 1.5K / 2K; single output, image editing and multiple references | At most 2.61 MP: $0.045/image; above: $0.09/image. First input reference is free, then $0.003 each. No sequential_image_generation. |
| dola-seedream-5-0-lite | Dola-Seedream-5.0-lite | BytePlus Ark | Per image | 2K / 3K / 4K; references, official-bounds custom dimensions, and image sets up to 9 | $0.035/image; hold for the maximum and settle the actual generated count. |
| bytedance-seedream-4-5 | ByteDance-Seedream-4.5 | BytePlus Ark | Per image | 2K / 4K; references, official-bounds custom dimensions, and image sets up to 9 | $0.04/image; hold for the maximum and settle the actual generated count. |
| doubao-seedream-5-0-pro | Doubao-Seedream-5.0-pro | Volcengine Ark, Beijing | Native CNY list price converted to USD using the latest checked SAFE quote, then the effective discount (user if set, otherwise model) | 1K / 1.5K / 2K or documented width x height; single output and reference images | Original image rate ¥0.30 / ¥0.60 by pixel tier. The first input image is free, then ¥0.02 each. Layer decomposition is not yet enabled by LINK42. |
| doubao-seedream-5-0-lite | Doubao-Seedream-5.0-lite | Volcengine Ark, Beijing | Native CNY list price converted to USD using the latest checked SAFE quote, then the effective discount (user if set, otherwise model) | 2K / 3K / 4K or documented width x height; references and image sets up to 9 | Original rate ¥0.22/image; hold for the maximum and settle the actual generated count. |
- data[].url is a signed upstream address with a limited lifetime. Copy it to your own storage if you need to keep it, or turn on result archiving in the console.