Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Edit one to three source images from a text prompt. Pass a single image as a one-element images array.

prompt
string
required

Text description of the edit to apply.

Minimum string length: 1
Example:

"Render this as a pencil sketch with detailed shading"

images
string[]
required

Source image URLs to edit (1-3). Each item must be a publicly accessible HTTP(S) URL.

Required array length: 1 - 3 elements
Minimum string length: 1
Example:
n
integer
default:1

Number of edited images to generate.

Required range: 1 <= x <= 10
Example:

1

aspect_ratio
enum<string>

Aspect ratio of the output image. If omitted, the output follows the first input image.

Available options:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
2:1,
1:2,
19.5:9,
9:19.5,
20:9,
9:20,
21:9,
5:2,
auto
Example:

"16:9"

resolution
enum<string>
default:1k

Output resolution.

Available options:
1k,
2k
Example:

"1k"

quality
enum<string>
default:medium

Generation quality.

Available options:
low,
medium
Example:

"medium"

response_format
enum<string>
default:url

How images are returned: a temporary URL, or base64 in the task result.

Available options:
url,
b64_json
Example:

"url"

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.