Skip to main content
POST
/
api
/
content
/
image
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/api/content/image \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "template": "<string>",
  "prompt": "<string>",
  "reference_image_url": "<string>",
  "images": [
    "<string>"
  ],
  "num_images": 1,
  "aspect_ratio": "auto",
  "resolution": "1K",
  "model": "<string>"
}
'
{
  "imageUrl": "<string>",
  "images": [
    "<string>"
  ]
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Image generation parameters

template
string

Optional template ID. When provided, uses the template's image prompt, reference images, and style rules. Caller params override template defaults. Artist context overrides template style when available. See GET /api/content/templates for available options.

prompt
string

Optional prompt to guide image generation

reference_image_url
string<uri>

URL of a reference image for conditioning the generation

images
string<uri>[]

Optional reference image URLs to guide generation

num_images
integer
default:1

Number of images to generate (1-4)

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

Aspect ratio of the generated image

Available options:
auto,
21:9,
16:9,
3:2,
4:3,
5:4,
1:1,
4:5,
3:4,
2:3,
9:16,
4:1,
1:4,
8:1,
1:8
resolution
enum<string>
default:1K

Output resolution

Available options:
0.5K,
1K,
2K,
4K
model
string

fal.ai model ID. Defaults to fal-ai/nano-banana-2

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.