Seedream API
This platform provides an asynchronous image-generation endpoint for the public model IDs seedream-4-5, seedream-5-0-lite, and seedream-5-0-pro.
This document is for client integrations. It covers the public request path, authentication, request parameters, and task result contract.
Notes:
- Create task:
POST /v1/images/create - Query task:
GET /v1/tasks/{task_id} - Model IDs:
seedream-4-5,seedream-5-0-lite,seedream-5-0-pro - Execution mode: asynchronous task
- Typical use: text-to-image, image editing, sequential image generation
- Input images: URL input only through
input.image_urls
1. Overview
- Request method:
POST - Request path:
/v1/images/create - Content-Type:
application/json - Result retrieval:
- The create endpoint only returns task acceptance
- Poll
/v1/tasks/{task_id}or receive the final state throughcallback_url
2. Authentication
Request headers:
Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json| Header | Required | Description |
|---|---|---|
Authorization | Yes | Platform API key in the format Bearer sk-xxxxxx |
Content-Type | Yes | Must be application/json |
3. Create Task
Request body example:
{
"model": "seedream-5-0-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A premium product hero image, square composition, clean studio lighting",
"image_urls": [],
"resolution": "2k",
"output_format": "png",
"watermark": false,
"sequential_image_generation": "disabled"
}
}3.1 Top-Level Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be seedream-4-5, seedream-5-0-lite, or seedream-5-0-pro |
callback_url | string | No | Final-state callback URL. Only https is supported. Maximum length is 2048. Local, intranet, and private network targets are rejected |
input | object | Yes | Image generation parameters |
3.2 input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Generation prompt. Keep composition, ratio, and intended use in the prompt when needed |
image_urls | array<string> | No | Reference image URLs. Omit or pass an empty array for text-to-image. Pass one or more URLs for image editing. seedream-5-0-pro supports up to 10; the other models support up to 14 |
resolution | string | No | Output resolution tier. seedream-4-5 supports 2k, 4k; seedream-5-0-lite supports 2k, 3k, 4k; seedream-5-0-pro supports 1k, 2k and defaults to 2k |
size | string | No | Output size. Takes priority over resolution. Supports the model resolution tiers or pixel sizes such as 2048x2048 and 3750x1250 |
output_format | string | No | Supported by seedream-5-0-lite and seedream-5-0-pro. Allowed values: png, jpeg. seedream-4-5 does not support this field and outputs JPEG by default |
watermark | boolean | No | Whether to add the upstream watermark. If omitted, the upstream default is used |
sequential_image_generation | string | No | Enables sequential batch generation. Allowed values: auto, disabled. If omitted, the upstream default is disabled |
sequential_image_generation_options | object | No | Batch generation options. Effective only when sequential_image_generation is auto |
optimize_prompt_options | object | No | Prompt optimization options. seedream-5-0-pro supports standard and fast; the other models support only standard |
sequential_image_generation_options:
| Field | Type | Required | Description |
|---|---|---|---|
max_images | integer | No | Maximum generated images for this task. When sequential_image_generation is auto, allowed range is 1 to 15; reference image count plus max_images must not exceed 15 |
optimize_prompt_options:
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | Prompt optimization mode. standard favors quality and is the default; fast reduces latency with a possible quality tradeoff and is supported only by seedream-5-0-pro |
Notes:
- Seedream does not support
input.aspect_ratio. Put ratio requirements in the prompt, or passinput.size. - The platform always uses the asynchronous task flow.
- The task result contract is
data[].url. - Local files should first be uploaded with
POST /v1/images/uploads, then passed throughinput.image_urls. - Base64 image input is not part of the ReachAPI public contract for these models, even though the upstream Pro model supports it directly.
4. Request Examples
4.1 Text-to-Image
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-5",
"input": {
"prompt": "A quiet ceramic tea cup on a wooden table, square composition, soft morning light",
"resolution": "2k",
"watermark": false
}
}'4.2 Text-to-Image with Output Format
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-lite",
"input": {
"prompt": "A premium skincare bottle hero image, 4:5 vertical poster composition, clean studio lighting",
"resolution": "3k",
"output_format": "png",
"watermark": false
}
}'4.3 Image Editing
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-5",
"input": {
"prompt": "Turn this sneaker photo into a clean e-commerce hero image, keep the original product shape",
"image_urls": [
"https://cdn.example.com/reference-1.png"
],
"resolution": "2k"
}
}'4.4 Custom Size
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-lite",
"input": {
"prompt": "A wide cinematic concept art image for a sci-fi city skyline",
"size": "3750x1250",
"output_format": "jpeg"
}
}'4.5 Sequential Image Generation
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-lite",
"input": {
"prompt": "Create a coherent set of 4 product lifestyle images for the same perfume bottle",
"image_urls": [
"https://cdn.example.com/reference-1.png"
],
"resolution": "2k",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 4
}
}
}'4.6 Prompt Optimization
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-pro",
"input": {
"prompt": "A restaurant poster for a summer tasting menu",
"resolution": "2k",
"optimize_prompt_options": {
"mode": "fast"
}
}
}'4.7 Seedream 5.0 Pro Interactive Editing
seedream-5-0-pro can target a local edit through natural-language descriptions of marks drawn on the input image. For more precise placement, include <point> or <bbox> coordinate tags in the prompt.
curl -X POST "https://direct.reachapi.ai/v1/images/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-0-pro",
"input": {
"prompt": "Use the subject in Image 2 <bbox>118 331 933 871</bbox> to replace the subject in Image 1 <bbox>179 283 796 986</bbox>.",
"image_urls": [
"https://cdn.example.com/base-image.png",
"https://cdn.example.com/subject-reference.png"
],
"resolution": "2k",
"output_format": "png",
"watermark": false
}
}'Coordinate tags identify edit regions and target positions; they do not replace image_urls. The referenced images must still be supplied in the same order used by the prompt.
5. Create Response
Response example:
{
"code": 200,
"msg": "",
"status": "queued",
"task_id": "task_xxx",
"data": []
}| Field | Type | Description |
|---|---|---|
code | integer | Platform business status code |
msg | string | Error or status message |
status | string | Initial task status, usually queued |
task_id | string | Task ID for later polling |
data | array | Empty array during task submission |
6. Query Task
Request example:
curl -X GET "https://direct.reachapi.ai/v1/tasks/task_xxx" \
-H "Authorization: Bearer YOUR_REACH_API_KEY"Task states:
| Status | Description |
|---|---|
queued | Accepted and waiting to run |
generating | Generation in progress |
success | Generation succeeded |
failed | Generation failed |
Success response example:
{
"code": 200,
"msg": "",
"status": "success",
"task_id": "task_xxx",
"data": [
{
"url": "https://cdn.example.com/generated/image-1.jpeg"
}
]
}Failure response example:
{
"code": 500,
"msg": "Model service request failed",
"status": "failed",
"task_id": "task_xxx",
"data": []
}Notes:
- The primary response contract is
data[].url. - Sequential generation may return multiple images in
data[]. - If some images are filtered or fail during sequential generation, only successful images are returned. If no image succeeds, the task fails.
7. Callback
If callback_url is provided when creating the task, the gateway sends a POST request when the task reaches a terminal state. The callback body matches the task query response.
Callback constraints:
- Only
httpsURLs are supported - Maximum length is
2048 localhost,.local, and obvious private network targets are rejected- Single delivery timeout is
10s - Failed delivery is retried up to 2 times, for at most 3 delivery attempts in total
8. Constraints and Unsupported Fields
promptis required and cannot be emptyseedream-5-0-prosupports up to 10image_urls;seedream-4-5andseedream-5-0-litesupport up to 14image_urlsmust contain server-accessiblehttpsURLsseedream-5-0-proinput formats:jpeg,png,webp,bmp,tiff,gif,heic, andheif- For each Pro input image: file size must not exceed 30MB; width and height must each be greater than 14px; aspect ratio must be between
1/16and16; total pixels must not exceed 36,000,000 (6000x6000) seedream-4-5resolutionvalues:2k,4kseedream-5-0-literesolutionvalues:2k,3k,4kseedream-5-0-proresolutionvalues:1k,2k; default is2ksizecan be a supported resolution tier or a pixel size in<width>x<height>format- For
seedream-5-0-pro, custom pixelsizemust contain between 921,600 (1280x720) and 4,624,220 (2048x2048x1.1025) total pixels, with an aspect ratio between1/16and16 - For
seedream-4-5andseedream-5-0-lite, custom pixelsizetotal pixels must be between2560x1440and4096x4096, with an aspect ratio between1/16and16 sequential_image_generationonly allowsautoanddisabledseedream-5-0-proallowsoptimize_prompt_options.modevaluesstandardandfast; the other models allow onlystandardseedream-5-0-prointeractive editing supports freeform marks and<point>/<bbox>coordinate tags inprompt- Upstream-generated image URLs are retained for 24 hours; download or persist results promptly
watermarkmust be a boolean
Unsupported public input fields include:
input.image_base64s- Base64 image data in any image input field
input.aspect_ratioinput.system_promptinput.enable_web_searchinput.streaminput.response_formatinput.seedinput.guidance_scaleinput.ninput.qualityinput.backgroundinput.moderationinput.negative_prompt