API REFERENCE
Edit Content
On this page
/api/contentApply 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.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request PATCH \
--url 'https://api.recoupable.dev/api/content' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"video_url": "string"
}'Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request PATCH \
--url 'https://recoup-api.vercel.app/api/content' \
--header 'Content-Type: application/json' \
--data '{
"video_url": "string"
}'Request body required
Edit parameters
application/json
video_urlstringrequiredInput video URL (required)
format: uri
templatestringTemplate name for deterministic edit config. If provided, operations are read from the template. See GET /api/content/templates for available options.
operationsarray<object>Array of edit operations to apply in order. Required if template is not provided.
Item properties for operations
typestring · enumrequiredOperation type
Values: "trim", "crop", "resize", "overlay_text"
startnumberStart time in seconds (trim)
durationnumberDuration in seconds (trim)
aspectstringAspect ratio e.g. 9:16 (crop)
widthintegerWidth in pixels (crop/resize)
heightintegerHeight in pixels (crop/resize)
contentstringText content (overlay_text)
fontstringFont name (overlay_text)
colorstringText color (overlay_text)
stroke_colorstringText stroke color (overlay_text)
max_font_sizenumberMaximum font size (overlay_text)
positionstring · enumText position (overlay_text)
Values: "top", "center", "bottom"
output_formatstring · enumOutput format
Values: "mp4", "webm", "mov"
Default: "mp4"
Responses
202Edit task triggered successfully. Poll via GET /api/tasks/runs using the returned runId.+
application/json
runIdstringrequiredBackground task run ID. Poll via GET /api/tasks/runs to check progress.
statusstring · enumrequiredStatus of the edit task
Values: "triggered"
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": "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.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"requestBody": {
"description": "Edit parameters",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentCreateEditRequest"
}
}
}
},
"responses": {
"202": {
"description": "Edit task triggered successfully. Poll via [GET /api/tasks/runs](/api-reference/tasks/runs) using the returned `runId`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentCreateEditResponse"
}
}
}
},
"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"
}
}
}
}
}
}