Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Use Doubao Seedream 5.0 Pro to generate images from text.

model
string
required

Required. Use a model ID or available alias returned by Get Models.

Minimum string length: 1
Example:

"microsoft/mai-image-2.5-pro"

prompt
string
required

Required. Describe the image to generate.

Minimum string length: 1
Example:

"一座漂浮在云海上的未来城市,日出时分,电影级光影,建筑细节丰富"

size
string
default:1024x1024

Output size as WIDTHxHEIGHT, or auto for the model default. Supported sizes depend on the selected model.

Pattern: ^[1-9][0-9]*x[1-9][0-9]*$
response_format
enum<string>
default:url

Response format: url returns image URLs; b64_json returns Base64 image data.

Available options:
b64_json,
url
images
(string | object)[]

Optional reference images for image-to-image generation. Omit for text-to-image generation. Image limits depend on the selected model.

Required array length: 1 element
Minimum string length: 1

Response

200 - application/json

Unify transformed OpenAI Images responses.

created
integer
required

Unix timestamp of the image creation time, in seconds.

Example:

1788480000

data
object[]
required

Generate a list of results.

model
string
required

The model ID that actually executes the request.

output_format
string
required

Actual output format.

size
string
required

actual generated size.

usage
object
required

The usage information generated this time.