Skip to main content
POST
Generate an image from text
For specific content requests, select the Special-Ns resource group.

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-260628
Example:

"doubao-seedream-5-0-pro-260628"

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

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

Model used for generation. The upstream response may return the provider-side model name.

Example:

"doubao-seedream-5-0-pro-260628"

created
integer

Creation timestamp in Unix seconds.

Example:

1775029815

data
object[]

Generated image list.

usage
object

Usage information.

error
object

Request-level error information.