Skip to main content
POST
Jimeng Image Editing

Jimeng Image Editing

An OpenAI-compatible image editing interface, submitted using multipart/form-data, supports generating new images based on a reference image.
  • The route entry is POST /v1/images/edits.
  • Currently submitted using multipart/form-data.
  • A reference image file must be provided for editing.
  • Supports Jimeng model image editing capabilities.

Supported Models

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

Method and Path

Request Example

Response Example

Authentication

Body

model
string
Model name. For example, jimeng-4.0, jimeng-4.5.
prompt
string
required
Prompt. Text describing the editing content, supports Chinese and English.
image
file
required
The image to edit. Upload a single image file for editing. It must be a supported image file, supporting png, webp, and jpg formats, with each image no larger than 25MB.
n
integer
Number of images. The number of images to generate, defaults to 1.
ratio
string
Aspect ratio of the generated image. For example, 16:9, 1:1, 9:16, etc.
quality
string
Quality of the generated image. auto (default) will automatically select the best quality for the given model. gpt-image-l supports high, medium, and low; dall-e-3 supports hd and standard; dall-e-2 supports only standard.
response_format
string
Format of the returned generated image. Must be one of url or b64_json.
resolution
string
Resolution. Optional 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).