Перейти к содержимому
Главная

Seedream 4.0

seedream-4.0

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

POST /v1/queue/seedream-4.0 # Создать задачу
GET /v1/queue/seedream-4.0/requests/{request_id}/status # Проверить статус
GET /v1/queue/seedream-4.0/requests/{request_id}/response # Получить результат
PUT /v1/queue/seedream-4.0/requests/{request_id}/cancel # Отменить задачу
Окно терминала
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 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


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


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


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


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

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


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


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


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


Configuration for prompt optimization feature

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
}
ПолеТипОписание
request_idstringИдентификатор задачи для последующей проверки статуса, получения результата и отмены.
response_urlstringURL для получения итогового результата.
status_urlstringURL для проверки статуса задачи.
cancel_urlstringURL для отмены задачи.
queue_positionintТекущая позиция в очереди.