Jimeng Image

Jimeng Image Generation

Use `POST /v1/images/generations` to call the Jimeng model for image generation.

POSThttps://zx1.deepwl.net/v1/images/generations
Request
curl -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"
}'
Response
{
  "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 model
  • jimeng-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.

sizestring

Image size. Resolution settings, such as 1024*1024.

imagestring[]

Reference image. An array of reference image URLs, used for image-to-image scenarios.

ratiostring

Image ratio. For example, 1:1, 16:9, 9:16, 4:3, 3:4, and so on.

resolutionstring

Resolution. Available values: 1k, 2k, 4k.

Request Examples

Response Examples

Response Fields

createdinteger

Generation timestamp (Unix timestamp).

dataarray

Array of generation results.

urlstring

URL of the generated image.

revised_promptstring

Rewritten prompt (returned by some upstream services).