Skip to content

Seedream

ByteDance 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)
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`).
prompt string Required
A text description of the desired image.
size string Required
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
Reference image URL for image-to-image generation.
watermark boolean Default: false
Set to `true` to add a visible watermark to the generated image.
response_format string Default: b64_json
Response format: `url` (returns an image URL) or `b64_json` (returns base64-encoded image data).
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": {
        "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

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".