跳转到主要内容
POST
/
v1
/
images
/
edits
Edit Image
curl --request POST \
  --url https://utoken-test.uuzu.com/v1/images/edits/ \
  --header 'Content-Type: multipart/form-data' \
  --form image='@example-file' \
  --form 'prompt=<string>' \
  --form mask='@example-file' \
  --form 'n=<string>' \
  --form 'size=<string>' \
  --form 'response_format=<string>' \
  --form 'user=<string>' \
  --form 'model=<string>'
{}

Documentation Index

Fetch the complete documentation index at: https://docs.utoken.wgame-hk.com/llms.txt

Use this file to discover all available pages before exploring further.

请求体

multipart/form-data
image
file
必填

The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as mask.

prompt
string
必填

A text description of the desired image. The maximum length is 1000 characters.

示例:

"A cute baby sea otter wearing a beret."

mask
file

An additional image whose fully transparent regions (e.g., where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and with the same dimensions as image.

n
string

The number of images to generate. Must be between 1 and 10.

示例:

"1"

size
string

The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.

示例:

"1024x1024"

response_format
string

The format in which the generated images are returned. Must be url or b64_json.

示例:

"url"

user
string

A unique identifier representing your end-user, which can help monitor and detect abuse. Learn More

示例:

""

model
string
示例:

"dall-e-2"

响应

200 - application/json

Response

The response is of type object.