Jiniu AIJiniu AI
Docs
ImagesNative OpenAI format

Edit image

Create an edited or extended image from a source image and a prompt.

POST
/v1/images/edits
model*string

Model name. Required by this gateway

image*string

Image to edit, as a public URL or Base64 string

images?array<string>

Multiple images to edit. Gateway extension

prompt*string

Edit instruction

mask?string

Mask image, as a public URL or Base64 string

n?integer

Number of images. The gateway allows 1–128 and treats an omitted value as 1

Range1 <= value <= 128
size?string

Output size, formatted as widthxheight

quality?string

Quality tier; gpt-image-1 defaults to auto

Value in"auto" | "low" | "medium" | "high" | "standard"
background?string

Background handling, supported by the GPT image family only

Value in"transparent" | "opaque" | "auto"
input_fidelity?string

Input fidelity, supported by gpt-image-1 and newer models only

Value in"low" | "high"
output_format?string

Output image format, supported by the GPT image family only

Value in"png" | "jpeg" | "webp"
output_compression?integer

Compression level, 0–100

Range0 <= value <= 100
response_format?string

Response form, supported by dall-e-2 only

Value in"url" | "b64_json"
stream?boolean

Whether to stream partial results

watermark?boolean

Whether to add a watermark. Gateway extension, not part of the official API

user?string

End-user identifier

Response Body

application/json

curl -X POST "https://jiniu.ai/v1/images/edits" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-image-1",    "image": "https://example.com/input.png",    "prompt": "string"  }'
{
  "created": 0,
  "data": [
    {
      "url": "string",
      "b64_json": "string",
      "revised_prompt": "string"
    }
  ]
}