Skip to main content
POST
Generate pictures

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
enum<string>
required

Required. Forward model ID for MAI Image 2.5 Pro.

Available options:
microsoft/mai-image-2.5-pro
prompt
string
required

Required. Picture prompt words, the native model context limit is 32,000 tokens.

Minimum string length: 1
Example:

"A future city floating on the sea of clouds, with movie-level light and shadow and rich architectural details at sunrise"

size
string
default:1024x1024

OFOX compatible sizes WIDTHxHEIGHT. The width and height of MAI Image 2.5 Pro are at least 768, and the total pixels do not exceed 1,048,576.

Pattern: ^[1-9]\d*x[1-9]\d*$
response_format
enum<string>
default:b64_json

OFOX compatible response format. MAI native output is always a single PNG Base64; b64_json is recommended.

Available options:
b64_json,
url

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.