Skip to content
API Reference

Seedream

Seedream is a high-resolution image generation model series supporting text-to-image and image-to-image generation, with flexible size specifications from 1K up to 4K resolution.

POST https://llm.siraya.ai/v1/images/generations

Supported Models

Model ID Description
ByteDance-Seedream-4.0 Seedream 4.0 image generation
ByteDance-Seedream-4.5 Seedream 4.5 image generation (higher minimum pixel requirement)
Dola-Seedream-5.0-lite Seedream 5.0 Lite image generation (higher minimum pixel requirement)
Dola-Seedream-5.0-pro Seedream 5.0 Pro image generation. Supported sizes: see the model catalog.
Authorization string Required
Your API Key (e.g., `Bearer `).

Body

model string Required
The model ID (e.g., `ByteDance-Seedream-4.0`, `ByteDance-Seedream-4.5`, `Dola-Seedream-5.0-lite`).
prompt string Required
A text description of the desired image.
size string
Image dimensions. Accepts shorthand values (`1K`, `2K`, `4K`) combined with aspect ratio described in the prompt, or explicit pixel dimensions (e.g., `2048x2048`). See size reference below.
image string | array
Reference image for image-to-image generation. Pass a public URL, or a base64 data URL in the form data:image/png;base64,<BASE64> for a local file. Pass an array of these to combine several reference images in one generation.
watermark boolean Default: true
Adds a visible watermark to the generated image. Set to `false` to generate without a watermark.
response_format string Default: b64_json
Response format: `url` (returns a signed image URL that expires after 24 hours — download and re-host what you need to keep) or `b64_json` (returns base64-encoded image data).
sequential_image_generation string
Batch image generation mode: `auto` or `disabled`.
extra_body map
Additional model-specific parameters passed directly to the provider. Supported keys include: watermark (boolean, add visible watermark), guidance_scale (number). Unknown top-level fields are also automatically captured into this object.
curl https://llm.siraya.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "ByteDance-Seedream-4.0",
    "prompt": "A shiba inu running on the beach, golden hour lighting",
    "size": "2048x2048"
  }'
import requests

url = "https://llm.siraya.ai/v1/images/generations"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <API_KEY>"
}
data = {
    "model": "ByteDance-Seedream-4.0",
    "prompt": "A shiba inu running on the beach, golden hour lighting",
    "size": "2048x2048"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Example Response

{
    "created": 1778553630,
    "data": [
        {
            "b64_json": "<base64 encoded JPEG>"
        }
    ],
    "usage": {
        "generated_images": 1,
        "output_tokens": 4096,
        "total_tokens": 4096
    }
}

Size Reference

There are two ways to specify image size — they cannot be used together:

Method 1: Shorthand + Prompt Aspect Ratio

Use 1K, 2K, or 4K as the size value and describe the desired aspect ratio in the prompt. The model will automatically select the matching pixel dimensions.

  • Without a ratio in the prompt, defaults to a 1:1 square
  • With a ratio in the prompt, the model matches the closest pixel combination
Model Supported Shorthand
Seedream 4.0 1K, 2K, 4K
Seedream 4.5 2K, 4K
Seedream 5.0 Lite 2K, 3K, 4K
Seedream 5.0 Pro See the model catalog

3K is available as a shorthand only (Seedream 5.0 Lite); the explicit-pixel tables below cover 1K, 2K and 4K.

Method 2: Explicit Pixel Dimensions

Specify dimensions directly using WxH format. Only the values listed in the table below are supported.

1K

Aspect Ratio Size
1:1 1024x1024
3:4 864x1152
4:3 1152x864
16:9 1312x736
9:16 736x1312
2:3 832x1248
3:2 1248x832
21:9 1568x672

2K

Aspect Ratio Size
1:1 2048x2048
3:4 1728x2304
4:3 2304x1728
16:9 2848x1600
9:16 1600x2848
3:2 2496x1664
2:3 1664x2496
21:9 3136x1344

4K

Aspect Ratio Size
1:1 4096x4096
3:4 3520x4704
4:3 4704x3520
16:9 5504x3040
9:16 3040x5504
2:3 3328x4992
3:2 4992x3328
21:9 6240x2656

Only sizes listed in the table above are supported. Arbitrary pixel values are not accepted.

Seedream 4.5 & 5.0 Lite Size Limits

Seedream 4.5 and 5.0 Lite do not support 1K sizes. The minimum pixel count is 3,686,400 pixels (equivalent to 1920×1920).

Size Tier Supported Notes
1K (e.g., 1024x1024) ❌ Below minimum pixel count
2K (e.g., 2048x2048) ✅ Recommended minimum
4K (e.g., 4096x4096) ✅

Error: Using a size below the threshold returns "image size must be at least 3686400 pixels".