Jimeng Image Generation
Use `POST /v1/images/generations` to call the Jimeng model for image generation.
https://zx1.deepwl.net/v1/images/generationscurl -X POST https://zx1.deepwl.net/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '
{
"model": "jimeng-4.0",
"prompt": "A close-up depiction of a domestic cat in a relaxed state. The cat features vibrant orange fur, with striking white markings around its eyes that extend down to its soft, pink nose.",
"n": 1,
"size": "1024*1024"
}'{
"created": 1735689600,
"data": [
{
"url": "https://example.com/generated-image.png",
"revised_prompt": "A close-up depiction of a domestic cat in a relaxed state..."
}
]
}An image generation API in OpenAI-compatible format, currently submitted using application/json. It supports the image generation capabilities of the Jimeng models (jimeng-4.0, jimeng-4.5), and supports image-to-image generation by passing reference images through the image field.
Supported Models
jimeng-4.0: Jimeng 4.0 modeljimeng-4.5: Jimeng 4.5 model
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json.
Request Body
modelstring必填Model name. Supports jimeng-4.0 and jimeng-4.5.
promptstring必填Prompt. The text description for image generation, supporting both Chinese and English.
ninteger必填Number of images. The number of images to generate.
sizestringImage size. Resolution settings, such as 1024*1024.
imagestring[]Reference image. An array of reference image URLs, used for image-to-image scenarios.
ratiostringImage ratio. For example, 1:1, 16:9, 9:16, 4:3, 3:4, and so on.
resolutionstringResolution. Available values: 1k, 2k, 4k.
Request Examples
Response Examples
Response Fields
createdintegerGeneration timestamp (Unix timestamp).
dataarrayArray of generation results.
urlstringURL of the generated image.
revised_promptstringRewritten prompt (returned by some upstream services).