Skip to main content
POST
/
api
/
content
/
caption
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/api/content/caption \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "topic": "<string>",
  "template": "<string>",
  "length": "short"
}
'
{
  "content": "<string>",
  "color": "white",
  "borderColor": "black",
  "maxFontSize": 42,
  "font": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Text generation parameters

topic
string
required

The subject or theme for caption generation

template
string

Optional template ID. When provided, injects the template's caption guide (tone, rules, formats) and examples into the LLM prompt. Caller's topic is still required. See GET /api/content/templates for available options.

length
enum<string>
default:short

Desired text length

Available options:
short,
medium,
long

Response

Text generated successfully

content
string
required

Generated on-screen text content

color
string
required

Text color as a CSS color value

Example:

"white"

borderColor
string
required

Text border/stroke color as a CSS color value

Example:

"black"

maxFontSize
number
required

Maximum font size in pixels

Example:

42

font
string | null

Font name for the text, or null for default