Skip to main content
POST
cURL

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Image generation parameters

prompt
string

Text prompt used to generate or edit the image

image_urls
string<uri>[]

Reference images to edit (1-10 HTTP(S) URLs). When provided, edits these images with prompt instead of generating a new one.

Required array length: 1 - 10 elements
num_images
integer
default:1

Number of images to generate (1-4)

Required range: 1 <= x <= 4
aspect_ratio
enum<string>

Output aspect ratio. If omitted, the model chooses automatically based on the request.

Available options:
21:9,
16:9,
4:3,
3:2,
1:1,
2:3,
3:4,
9:16,
9:21
output_format
enum<string>
default:webp

Format of the generated image

Available options:
jpeg,
png,
webp
sync_mode
boolean
default:false

If true, the image is returned as a data URI and is not persisted in the request history

Response

Image generated successfully

imageUrl
string<uri>
required

URL of the first generated image

images
string<uri>[]
required

URLs of all generated images. Contains one element when num_images is 1.