Seedream 4.0
Seedream 4.0, an image generation model by ByteDance.
Overview
Seedream 4.0, an image generation model by ByteDance.
- Model ID:
bytedance/seedream-4.0 - Maker: ByteDance
- Type:
image - Timeout: 600 s
- Unified format: Supported
- Endpoint:
POST https://api.kerox.ai/v1/tasks
Pricing
| Tier | Official / image | Kerox / image | Savings |
|---|---|---|---|
| Default | $0.0300 | $0.0270 | 10% |
- Image sets: with image sets on, every generated image is billed at this price, up to 15 per task. The hold covers the most the task may generate; the charge follows the actual count.
Request example
Submit a task with the model's native parameters.
curl -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedream-4.0",
"input": {
"prompt": "editorial portrait of a ceramicist in morning sunlight, 35mm film",
"size": "2048x2048"
},
"wait_seconds": 30
}'Parameters
| Parameter | Type | Default | Values | Description |
|---|---|---|---|---|
| size | string | "2048x2048" | — | Size |
| image | string | string[] | — | — | Reference images |
| prompt | string | — | — | Prompt |
| watermark | boolean | false | — | Watermark |
| optimize_prompt_options | object | {"mode":"standard"} | — | Prompt optimization |
| sequential_image_generation | string | "disabled" | auto, disabled | Image set mode |
| sequential_image_generation_options | object | — | — | Image set options |
Polling and output
Poll GET /v1/tasks/{id} or receive a webhook when the task finishes. Output files expire at expires_at (7 days after completion), so download anything you want to keep. The other fields of the task object are in the tasks guide and the API reference.
curl https://api.kerox.ai/v1/tasks/task_01JD8X9B4Q2M7T8N3K5P6R1S0V \
-H "Authorization: Bearer $KEROX_API_KEY"Input schema (JSON)
The full JSON Schema, nested parameters included
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"prompt"
],
"properties": {
"size": {
"type": "string",
"x-tier": "common",
"default": "2048x2048",
"pattern": "^(1K|2K|4K|[1-9][0-9]*x[1-9][0-9]*)$",
"x-label-en": "Size",
"x-label-zh": "尺寸",
"x-constraints": {
"max_aspect": 16,
"max_pixels": 16777216,
"min_aspect": 0.0625,
"min_pixels": 921600
}
},
"image": {
"oneOf": [
{
"type": "string",
"pattern": "^(https://|data:image/)"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^(https://|data:image/)"
},
"maxItems": 14,
"minItems": 1
}
],
"x-tier": "common",
"x-label-en": "Reference images",
"x-label-zh": "参考图"
},
"prompt": {
"type": "string",
"x-tier": "common",
"pattern": "\\S",
"minLength": 1,
"x-label-en": "Prompt",
"x-label-zh": "提示词"
},
"watermark": {
"type": "boolean",
"x-tier": "advanced",
"default": false,
"x-label-en": "Watermark",
"x-label-zh": "水印"
},
"optimize_prompt_options": {
"type": "object",
"x-tier": "advanced",
"default": {
"mode": "standard"
},
"properties": {
"mode": {
"enum": [
"standard",
"fast"
],
"type": "string",
"x-tier": "advanced",
"default": "standard",
"x-label-en": "Mode",
"x-label-zh": "模式"
}
},
"x-label-en": "Prompt optimization",
"x-label-zh": "提示词优化",
"additionalProperties": false
},
"sequential_image_generation": {
"enum": [
"auto",
"disabled"
],
"type": "string",
"x-tier": "advanced",
"default": "disabled",
"x-label-en": "Image set mode",
"x-label-zh": "顺序组图"
},
"sequential_image_generation_options": {
"type": "object",
"x-tier": "advanced",
"properties": {
"max_images": {
"type": "integer",
"x-tier": "advanced",
"default": 15,
"maximum": 15,
"minimum": 1,
"x-label-en": "Max images",
"x-label-zh": "最多张数"
}
},
"x-label-en": "Image set options",
"x-label-zh": "组图选项",
"additionalProperties": false
}
},
"additionalProperties": false
}