curl --request PATCH \
--url https://api.recoupable.dev/api/content \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"video_url": "<string>",
"template": "<string>",
"operations": [
{
"start": 123,
"duration": 123,
"aspect": "<string>",
"width": 123,
"height": 123,
"content": "<string>",
"font": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"max_font_size": 123
}
],
"output_format": "mp4"
}
'import requests
url = "https://api.recoupable.dev/api/content"
payload = {
"video_url": "<string>",
"template": "<string>",
"operations": [
{
"start": 123,
"duration": 123,
"aspect": "<string>",
"width": 123,
"height": 123,
"content": "<string>",
"font": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"max_font_size": 123
}
],
"output_format": "mp4"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: '<string>',
template: '<string>',
operations: [
{
start: 123,
duration: 123,
aspect: '<string>',
width: 123,
height: 123,
content: '<string>',
font: '<string>',
color: '<string>',
stroke_color: '<string>',
max_font_size: 123
}
],
output_format: 'mp4'
})
};
fetch('https://api.recoupable.dev/api/content', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => '<string>',
'template' => '<string>',
'operations' => [
[
'start' => 123,
'duration' => 123,
'aspect' => '<string>',
'width' => 123,
'height' => 123,
'content' => '<string>',
'font' => '<string>',
'color' => '<string>',
'stroke_color' => '<string>',
'max_font_size' => 123
]
],
'output_format' => 'mp4'
]),
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"
payload := strings.NewReader("{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.recoupable.dev/api/content")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "triggered"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Edit Content
Apply ffmpeg edits to a video — trim, crop, resize, or overlay text. Pass a template for a preset edit pipeline, or build your own with an operations array.
curl --request PATCH \
--url https://api.recoupable.dev/api/content \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"video_url": "<string>",
"template": "<string>",
"operations": [
{
"start": 123,
"duration": 123,
"aspect": "<string>",
"width": 123,
"height": 123,
"content": "<string>",
"font": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"max_font_size": 123
}
],
"output_format": "mp4"
}
'import requests
url = "https://api.recoupable.dev/api/content"
payload = {
"video_url": "<string>",
"template": "<string>",
"operations": [
{
"start": 123,
"duration": 123,
"aspect": "<string>",
"width": 123,
"height": 123,
"content": "<string>",
"font": "<string>",
"color": "<string>",
"stroke_color": "<string>",
"max_font_size": 123
}
],
"output_format": "mp4"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: '<string>',
template: '<string>',
operations: [
{
start: 123,
duration: 123,
aspect: '<string>',
width: 123,
height: 123,
content: '<string>',
font: '<string>',
color: '<string>',
stroke_color: '<string>',
max_font_size: 123
}
],
output_format: 'mp4'
})
};
fetch('https://api.recoupable.dev/api/content', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => '<string>',
'template' => '<string>',
'operations' => [
[
'start' => 123,
'duration' => 123,
'aspect' => '<string>',
'width' => 123,
'height' => 123,
'content' => '<string>',
'font' => '<string>',
'color' => '<string>',
'stroke_color' => '<string>',
'max_font_size' => 123
]
],
'output_format' => 'mp4'
]),
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"
payload := strings.NewReader("{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.recoupable.dev/api/content")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"<string>\",\n \"template\": \"<string>\",\n \"operations\": [\n {\n \"start\": 123,\n \"duration\": 123,\n \"aspect\": \"<string>\",\n \"width\": 123,\n \"height\": 123,\n \"content\": \"<string>\",\n \"font\": \"<string>\",\n \"color\": \"<string>\",\n \"stroke_color\": \"<string>\",\n \"max_font_size\": 123\n }\n ],\n \"output_format\": \"mp4\"\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "triggered"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Authorizations
Your Recoup API key. Learn more.
Body
Edit parameters
Requires a video URL. Operations are applied sequentially via ffmpeg.
Input video URL (required)
Template name for deterministic edit config. If provided, operations are read from the template. See GET /api/content/templates for available options.
Array of edit operations to apply in order. Required if template is not provided.
Show child attributes
Show child attributes
Output format
mp4, webm, mov Response
Edit task triggered successfully. Poll via GET /api/tasks/runs using the returned runId.
Background task run ID. Poll via GET /api/tasks/runs to check progress.
Status of the edit task
triggered Was this page helpful?
