Skip to main content
POST
Edit image
This page uses the same images/edits operation as Edit image, with the playground above pre-filled for the generic OpenAI-style edit schema (image, mask, prompt, etc.). The notes below describe the Qwen-specific request shape for wanx-v1 style models.
Qwen image editing models accept an alternate JSON request shape that wraps your editing instructions and source image references inside input.messages, rather than uploading image/mask files via multipart form data. Provide model and input together in the playground’s request body to use this shape.

Qwen-specific request fields

Source images can be referenced inline within input.messages[].content (for example as URLs or embedded references) rather than as separate multipart file uploads.

Example: editing an image

Response fields

The response follows the standard image edit shape:
integer
Creation timestamp.
array
Generated image entries.

Example response

200

Authorizations

Authorization
string
header
required

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

Body

image
file
required

Source image in PNG format, under 4 MB.

prompt
string
required

Editing instruction.

mask
file

Optional mask image.

model
string

Target image model.

n
integer

Number of outputs.

size
string

Output size.

response_format
string

Response format.

user
string

End-user identifier.

Response

Edited images in the image generation response format.

created
integer

Creation timestamp.

data
object[]

Generated image entries.

usage
object