Skip to main content
POST
Generate or edit an image

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required

Model ID.

Available options:
doubao-seedream-5-0-pro
Example:

"doubao-seedream-5-0-pro"

prompt
string
required

Text prompt for image generation or editing. For coordinate edits, include tags such as or in the prompt.

Example:

"Add a ceramic coffee cup to the marked area and keep the original composition."

image

Reference image URL/Base64 data URI, or an array of reference images. Required for image-to-image editing. Seedream 5.0 Pro supports up to 10 reference images. Official input limits: formats jpeg/png/webp/bmp/tiff/gif/heic/heif; each image up to 30 MB; aspect ratio between 1/16 and 16; width and height at least 14px; total pixels up to 36,000,000.

Example:
size
string

Output image size. Use 1K, 2K, or explicit pixels such as 2048x1024. Explicit pixel sizes must satisfy the official total-pixel and aspect-ratio limits.

Example:
response_format
enum<string>
default:url

Generated image return format. URL links are temporary and should be saved promptly.

Available options:
url,
b64_json
output_format
enum<string>
default:jpeg

Generated image file format.

Available options:
png,
jpeg
watermark
boolean
default:true

Whether to add the AI-generated watermark.

optimize_prompt_options
object

Prompt optimization options. Use standard mode. Official documentation says fast mode is not supported for Seedream 5.0 Pro.

Response

Image generated successfully

model
string
description
any
example
any
created
integer

Creation timestamp in Unix seconds.

Example:

1775029815

data
object[]

Generated image list.

usage
object

Usage information.

error
object

Request-level error information.