cURL
curl --request POST \
--url https://api.recoupable.dev/api/content/caption \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"topic": "<string>",
"template": "<string>",
"length": "short"
}
'import requests
url = "https://api.recoupable.dev/api/content/caption"
payload = {
"topic": "<string>",
"template": "<string>",
"length": "short"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({topic: '<string>', template: '<string>', length: 'short'})
};
fetch('https://api.recoupable.dev/api/content/caption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recoupable.dev/api/content/caption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'topic' => '<string>',
'template' => '<string>',
'length' => 'short'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.recoupable.dev/api/content/caption"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.recoupable.dev/api/content/caption")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content/caption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}"
response = http.request(request)
puts response.read_body{
"content": "<string>",
"color": "white",
"borderColor": "black",
"maxFontSize": 42,
"font": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Content Creation
Generate Caption
Generate a short caption from a topic. Returns the text content and default styling (font, color, size).
POST
/
api
/
content
/
caption
cURL
curl --request POST \
--url https://api.recoupable.dev/api/content/caption \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"topic": "<string>",
"template": "<string>",
"length": "short"
}
'import requests
url = "https://api.recoupable.dev/api/content/caption"
payload = {
"topic": "<string>",
"template": "<string>",
"length": "short"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({topic: '<string>', template: '<string>', length: 'short'})
};
fetch('https://api.recoupable.dev/api/content/caption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recoupable.dev/api/content/caption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'topic' => '<string>',
'template' => '<string>',
'length' => 'short'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.recoupable.dev/api/content/caption"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.recoupable.dev/api/content/caption")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content/caption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topic\": \"<string>\",\n \"template\": \"<string>\",\n \"length\": \"short\"\n}"
response = http.request(request)
puts response.read_body{
"content": "<string>",
"color": "white",
"borderColor": "black",
"maxFontSize": 42,
"font": "<string>"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Authorizations
apiKeyAuthbearerAuth
Your Recoup API key. Learn more.
Body
application/json
Text generation parameters
The subject or theme for caption generation
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.
Desired text length
Available options:
short, medium, long Response
Text generated successfully
Generated on-screen text content
Text color as a CSS color value
Example:
"white"
Text border/stroke color as a CSS color value
Example:
"black"
Maximum font size in pixels
Example:
42
Font name for the text, or null for default
Was this page helpful?
⌘I
