Skip to main content
POST
Jimeng Image Generation

Jimeng Image Generation

An image generation API in OpenAI-compatible format, supporting the image generation capabilities of the Jimeng model.
  • The route entry is POST /v1/images/generations.
  • Currently submitted using application/json.
  • Supports Jimeng models (jimeng-4.0, jimeng-4.5).
  • Supports image-to-image generation by passing a reference image through the image field.

Supported Models

  • jimeng-4.0: Jimeng 4.0 model
  • jimeng-4.5: Jimeng 4.5 model

Method and Path

Request Example

Example with Reference Image

Response Example

Authentication

Body

model
string
required
Model name. Supports jimeng-4.0 and jimeng-4.5.
prompt
string
required
Prompt. The text description for image generation, supporting both Chinese and English.
n
integer
required
Number of images. The number of images to generate.
size
string
Image size. Resolution settings, such as 1024*1024.
image
array
Reference image. An array of reference image URLs, used for image-to-image scenarios.
ratio
string
Image ratio. For example, 1:1, 16:9, 9:16, 4:3, 3:4, and so on.
resolution
string
Resolution. Available values: 1k, 2k, 4k.

Response

created
integer
Generation timestamp (Unix timestamp).
data
array
Array of generation results.
data[].url
string
URL of the generated image.
data[].revised_prompt
string
Rewritten prompt (returned by some upstream services).