Skip to main content
AI

Seedream Image Generation

this page Seedream image generation model, image model Endpoint, Parameters, constraints, responsesandExample.

Basic Information

Authentication

All /v1/* endpoints require an API key:

Authorization: Bearer <your_api_key>

supports Model

Public modelCapabilityBilling basis
seedream-4.0, image editingimage
seedream-4.5, image editingimage
seedream-5.0-lite, image editingimage

Model name supports andimage editing:

OperationType
passreference
pass image/image_url/image_urls/imagesimage editing

billing detail recommended: image billing detail. custom_size, Landscape, Portrait, Ratio billing detail.

scenarioEndpointresultreturn
, synchronousPOST /v1/images/generationsYesdata[].url
image editing, synchronousPOST /v1/images/editsYesdata[].url

Parameters

supported parameters

ParametersTypeRequiredNote
modelstringbodyYesseedream-4.0, seedream-4.5, seedream-5.0-lite
promptstringbodyYesoreditingprompt
nintegerbodyNoimage,1 6. OpenAI compatibility field
custom_sizeobjectbodyNosize,{"width": 2048, "height": 2048}
imagestring / arraybody / formrequired for editingreference URL, pass or
image_urlstring / object / arraybody / formrequired for editingreference URL, compatibility {"url": "..."}
image_urlsarraybody / formrequired for editingmultiple reference images URL
imagesarraybodyrequired for editingmultiple reference images URL, supportsstringorobject
timeout_secondsintegerbodyNosynchronousEndpoint

n

  • defaultvalue: 1
  • value: 1
  • value: 6

Example:

{
"num_images": 3
}

or:

{
"n": 3
}

custom_size sizeRules

format:

{
"custom_size": {
"width": 2048,
"height": 2048
}
}

sizeconstraints:

ModelWhether 16
seedream-4.0921600167772164096No
seedream-4.53686400167772164096No
seedream-5.0-lite3686400167772164096No

size:

sizeRatioseedream-4.0seedream-4.5seedream-5.0-lite
960x9601:1unavailable, below the minimum pixel sizeunavailable, below the minimum pixel size
1280x72016:9unavailable, below the minimum pixel sizeunavailable, below the minimum pixel size
720x12809:16unavailable, below the minimum pixel sizeunavailable, below the minimum pixel size
2048x20481:1
2560x144016:9
1440x25609:16
2304x17284:3
1728x23043:4
4096x40961:1,,,

reference

image editingmode supports URL reference. does not support pass file.:

{
"image": "https://example.com/a.png"
}
{
"image_url": "https://example.com/a.png"
}
{
"image_url": {
"url": "https://example.com/a.png"
}
}
{
"image_urls": [
"https://example.com/a.png",
"https://example.com/b.png"
]
}
{
"images": [
"https://example.com/a.png",
{
"url": "https://example.com/b.png"
},
{
"image_url": "https://example.com/c.png"
}
]
}

editingconstraints:

constraintsvalue
reference up to10
up to6
+ up to15

Example:

referencenum_images
16
56
96
105

synchronous

curl -X POST "$BASE_URL/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.0",
"prompt": "one, and "}'

responses:

{
"created": 1778688000,
"data": [
{
"url": "https://example.com/generated-1.png"
}
]
}

generation 6

curl -X POST "$BASE_URL/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.5",
"prompt": ", ",
"num_images": 6,
"custom_size": {"width": 2048,
"height": 2048}}'

16:9 Landscape

seedream-4.5 and seedream-5.0-lite, recommended 2560x1440:

curl -X POST "$BASE_URL/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-5.0-lite",
"prompt": "16:9, ",
"n": 2,
"custom_size": {"width": 2560,
"height": 1440}}'

9:16 Portrait

curl -X POST "$BASE_URL/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.5",
"prompt": "Portrait, ",
"num_images": 1,
"custom_size": {"width": 1440,
"height": 2560}}'

seedream-4.0 sizeExample

1280x720 seedream-4.0, seedream-4.5 and seedream-5.0-lite.

curl -X POST "$BASE_URL/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.0",
"prompt": "Landscape, ",
"custom_size": {"width": 1280,
"height": 720}}'

synchronousimage editing

JSON reference

curl -X POST "$BASE_URL/v1/images/edits" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.0",
"prompt": "change image into style, reserved subject ",
"image": "https://example.com/source.png",
"num_images": 1,
"custom_size": {"width": 2048,
"height": 2048}}'

JSON multiple reference images

curl -X POST "$BASE_URL/v1/images/edits" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4.5",
"prompt": " reference, ",
"image_urls": ["https://example.com/product.png",
"https://example.com/background.png"],
"n": 3,
"custom_size": {"width": 2560,
"height": 1440}}'

images arrayobject

curl -X POST "$BASE_URL/v1/images/edits" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-5.0-lite",
"prompt": "reference one and, generationone style ",
"images": [{"url": "https://example.com/person.png"},
{"image_url": "https://example.com/outfit.png"}],
"num_images": 2,
"custom_size": {"width": 2048,
"height": 2048}}'