Skip to content
Home

Seedream 4.0

seedream-4.0

Upgraded image generation with improved lighting, visual detail, and complex prompt understanding.

POST /v1/queue/seedream-4.0 # Create task
GET /v1/queue/seedream-4.0/requests/{request_id}/status # Check status
GET /v1/queue/seedream-4.0/requests/{request_id}/response # Get result
PUT /v1/queue/seedream-4.0/requests/{request_id}/cancel # Cancel task
Окно терминала
curl --request 'POST' 'https://odirouter.ai/model/v1/queue/seedream-4.0' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--location \
--data-raw '{
"prompt": "A clean studio shot of a red apple on a white table, soft natural light.",
"image": "https://www.gstatic.com/webp/gallery/1.jpg",
"sequential_image_generation": "disabled",
"stream": false,
"response_format": "url"
}'
prompt string required

Prompt for image generation, supports both Chinese and English

Recommended not to exceed 300 Chinese characters or 600 English words. Too many characters may cause information dispersion, and the model may ignore details, focusing only on key points, resulting in missing elements in the image

image string | array

Input image information, supports URL or Base64 encoding, supports single or multiple image input

Image URL: Ensure the image URL is accessible

Base64 encoding: Follow this format data:image/<image_format>;base64,<Base64_encoding>. Note that <image_format> should be lowercase, e.g., data:image/png;base64,<base64_image>

Image requirements:

Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF

Aspect ratio (width/height) range: 1/16 to 16

Width and height (px) > 14

Size: not exceeding 10MB

Total pixels: not exceeding 6000x6000=36000000 px (limit on the pixel product of single image width and height, not on individual width or height values)

Maximum 14 reference images supported

size string

Specify the size information of the generated image. Supports two methods, cannot be mixed

Method 1: Specify the resolution of the generated image, and describe the aspect ratio, shape, or usage in the prompt using natural language

Available values: 1K, 2K, 4K

Method 2: Specify the width and height pixel values

Total pixel range: 1280x720=921600 to 4096x4096=16777216

Aspect ratio range: 1/16 to 16

When using Method 2, both the total pixel range and aspect ratio range must be satisfied. Total pixels is a limit on the pixel product of single image width and height, not on individual width or height values

Valid example: 1600x600

Total pixel value 1600x600=960000, meets the range requirement [921600, 16777216]. Aspect ratio 1600/600=8/3, meets the range requirement [1/16, 16], so this example value is valid

Invalid example: 800x800

Total pixel value 800x800=640000, does not meet the minimum requirement 921600. Aspect ratio 800/800=1, although meets the range requirement [1/16, 16], but because it does not satisfy both constraints simultaneously, this example value is invalid

Recommended width and height pixel values:

1:1: 2048x2048

4:3: 2304x1728

3:4: 1728x2304

16:9: 2560x1440

9:16: 1440x2560

3:2: 2496x1664

2:3: 1664x2496

21:9: 3024x1296

Default: 2048x2048

sequential_image_generation string

Control whether to disable the image group feature

Image group: A set of content-related images generated based on your input

auto: Automatic mode, the model will determine whether to return image groups and the number of images based on the prompt

disabled: Disable image group feature, the model will only generate one image

Options: auto, disabled

Default: disabled

sequential_image_generation_options object

Configuration for image group feature. Only effective when sequential_image_generation is auto

max_images integer

Specify the maximum number of images that can be generated in this request

The actual number of images that can be generated is also affected by the number of input reference images. Number of input reference images + final generated images ≤ 15

Range: 1 to 15

Default: 15

stream boolean

Control whether to enable streaming output mode

false: Non-streaming output mode, returns all information at once after all images are generated

true: Streaming output mode, returns results for each image immediately. Streaming output mode is effective for both single image and image group scenarios

Options: true, false

Default: false

response_format string

Specify the return format of the generated image

Generated images are in JPEG format, supports the following two return methods:

url: Returns image download link. Link is valid for 24 hours after image generation, please download images promptly

b64_json: Returns image data in Base64 encoded JSON format

Options: url, b64_json

Default: url

watermark boolean

Whether to add watermark to the generated image

false: No watermark

true: Add "AI Generated" watermark in the bottom right corner

Options: true, false

Default: true

optimize_prompt_options object

Configuration for prompt optimization feature

mode string

Set the mode for prompt optimization feature

standard: Standard mode, higher quality content generation, longer processing time

fast: Fast mode, shorter processing time, general quality

Options: standard, fast

Default: standard

{
"request_id": "task_01hxyz...",
"response_url": "https://odirouter.ai/model/v1/queue/seedream-4.0/requests/task_01hxyz.../response",
"status_url": "https://odirouter.ai/model/v1/queue/seedream-4.0/requests/task_01hxyz.../status",
"cancel_url": "https://odirouter.ai/model/v1/queue/seedream-4.0/requests/task_01hxyz.../cancel",
"queue_position": 0
}
FieldTypeDescription
request_idstringTask ID used for all follow-up operations.
response_urlstringURL to fetch the final result.
status_urlstringURL to query task status.
cancel_urlstringURL to cancel the task.
queue_positionintCurrent queue position.