API REFERENCE
Generate Caption
On this page
/api/content/captionGenerate a short caption from a topic. Returns the text content and default styling (font, color, size).
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/content/caption' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"topic": "string"
}'Request body required
Text generation parameters
application/json
templatestringOptional 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.
topicstringrequiredThe subject or theme for caption generation
lengthstring · enumDesired text length
Values: "short", "medium", "long"
Default: "short"
Responses
200Text generated successfully+
application/json
contentstringrequiredGenerated on-screen text content
fontstring | nullFont name for the text, or null for default
colorstringrequiredText color as a CSS color value
borderColorstringrequiredText border/stroke color as a CSS color value
maxFontSizenumberrequiredMaximum font size in pixels
400Validation failed — invalid or missing request body fields+
application/json
errorstringrequiredError message describing what went wrong
401Unauthorized — invalid or missing API key+
application/json
errorstringrequiredError message describing what went wrong
500Internal server error+
application/json
errorstringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download content.jsonView operation source
{
"description": "Generate a short caption from a topic. Returns the text content and default styling (font, color, size).",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"requestBody": {
"description": "Text generation parameters",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentCreateTextRequest"
}
}
}
},
"responses": {
"200": {
"description": "Text generated successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentCreateTextResponse"
}
}
}
},
"400": {
"description": "Validation failed — invalid or missing request body fields",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized — invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentErrorResponse"
}
}
}
}
}
}