API Documentation
Build powerful video processing workflows with our simple REST API
Getting Started
Authentication
All API requests require an API key. Get your API key from the dashboard after signing in.
Include your API key in the x-api-key header:
curl -X POST https://api.videocomposer.io/video/convert \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"input_url": "...", "out_format": "mp4"}'Quick Start
- 1Get your API key from the dashboard
- 2Create a job with one of our video processing endpoints
- 3Check the job status using the job ID
- 4Download your processed video from the output URL
Rate Limits
API rate limits are enforced to ensure fair usage:
- •100 requests per minute per API key
- •1,000 requests per hour per API key
- •10,000 requests per day per API key
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1620000000Video Processing
/video/convertConvert Video Format
Convert a video to a different format with options for resizing and bitrate adjustment
Parameters
input_urlstringout_formatstringwidthnumberheightnumberbitrate_kbpsnumberRequest Body
{
"input_url": "https://cdn.videocomposer.io/sample_video1.mp4",
"out_format": "webm",
"width": 1280,
"height": 720,
"bitrate_kbps": 2000
}Response Example
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"status": "queued",
"message": "Your job has been queued and will be processed shortly."
}Code Examples
curl -X POST https://api.videocomposer.io/video/convert \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"input_url": "https://cdn.video",
"out_format": "webm",
"width": 1280,
"height": 720
}'/video/trimTrim Video
Extract a portion of a video by specifying start and end times
Parameters
input_urlstringstartstringendstringRequest Body
{
"input_url": "https://cdn.video",
"start": "00:00:10.000",
"end": "00:00:20.000"
}Response Example
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"status": "queued",
"message": "Your job has been queued and will be processed shortly."
}Code Examples
curl -X POST https://api.videocomposer.io/video/trim \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"input_url": "https://cdn.video",
"start": "00:00:10.000",
"end": "00:00:20.000"
}'/video/composeCompose Videos
Combine multiple video clips with optional audio track and subtitles
Parameters
inputsarrayaudio_urlstringsubtitle_urlstringcrossfade_secnumberRequest Body
{
"inputs": [
"https://cdn.videocomposer.io/sample_video1.mp4",
"https://cdn.videocomposer.io/sample_video2.mp4"
],
"audio_url": "https://cdn.videocomposer.io/sample_audio.mp3",
"subtitle_url": "https://cdn.videocomposer.io/sample_subtitle.srt",
"crossfade_sec": 0.5
}Response Example
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"status": "queued",
"message": "Your job has been queued and will be processed shortly."
}Code Examples
curl -X POST https://api.videocomposer.io/video/compose \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"inputs": [
"https://cdn.videocomposer.io/sample_video1.mp4",
"https://cdn.videocomposer.io/sample_video2.mp4"
],
"audio_url": "https://cdn.videocomposer.io/sample_audio.mp3"
}'/video/overlayAdd Overlay
Add watermark image or text overlay to a video
Parameters
input_urlstringoverlay_urlstringtextstringxnumberynumberopacitynumberfont_sizenumberRequest Body
{
"input_url": "https://cdn.video",
"text": "© 2024 My Company",
"x": 20,
"y": 20,
"font_size": 36,
"opacity": 0.9
}Response Example
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"status": "queued",
"message": "Your job has been queued and will be processed shortly."
}Code Examples
curl -X POST https://api.videocomposer.io/video/overlay \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"input_url": "https://cdn.video",
"text": "© 2024 My Company",
"x": 20,
"y": 20,
"font_size": 72,
"opacity": 0.9
}'/video/thumbnailGenerate Thumbnail
Create a thumbnail from a video - single frame, animated GIF, or sprite sheet
Parameters
input_urlstringmodestringtimestampstringfpsnumberRequest Body
{
"input_url": "https://cdn.video",
"mode": "frame",
"timestamp": "00:00:15.000"
}Response Example
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"status": "queued",
"message": "Your job has been queued and will be processed shortly."
}Code Examples
curl -X POST https://api.videocomposer.io/video/thumbnail \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"input_url": "https://cdn.video",
"mode": "frame",
"timestamp": "00:00:15.000"
}'/video/validateValidate Media
Validate media files to ensure they are accessible and of the expected type
Parameters
input_urlstringexpected_typestringResponse Example
{
"valid": true,
"fileType": "video",
"contentType": "video/mp4",
"contentLength": 50000000,
"supportedExtensions": {
"video": [
"mp4",
"webm"
],
"audio": [
"mp3"
],
"image": [
"jpg",
"jpeg",
"png",
"gif",
"bmp",
"tiff",
"webp"
],
"subtitle": [
"srt"
]
}
}Code Examples
curl -X GET "https://api.videocomposer.io/video/validate?input_url=https://cdn.video&expected_type=video" \
-H "x-api-key: YOUR_API_KEY"Job Management
/jobs/:idCheck Job Status
Retrieve the status and details of a video processing job
Parameters
idstringResponse Example
{
"id": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"state": "done",
"input_url": "https://videocomposer.io/video.mp4",
"output_url": "https://videocomposer.io/outputs/54c0dd36-15e8-4b7f-bb6a-71c97938b84b.mp4",
"error": null,
"created_at": "2025-06-08T01:47:46.434Z"
}Code Examples
curl -X GET "https://api.videocomposer.io/jobs/54c0dd36-15e8-4b7f-bb6a-71c97938b84b" \
-H "x-api-key: YOUR_API_KEY"Webhooks
Configure webhooks to receive real-time notifications when your video processing jobs complete.
Webhook Configuration
Each API key can have one webhook URL configured. When a job completes (successfully or with an error), we'll send a POST request to your webhook URL with the job details.
Webhook Payload
{
"jobId": "54c0dd36-15e8-4b7f-bb6a-71c97938b84b",
"state": "done",
"inputUrl": "https://cdn.video",
"outputUrl": "https://videocomposer.io/outputs/54c0dd36-15e8-4b7f-bb6a-71c97938b84b.mp4",
"error": null,
"createdAt": "2025-06-08T01:47:46.434Z",
"completedAt": "2025-06-08T01:48:12.123Z",
"processingTimeMs": 26689
}Webhook Headers
Content-Type: application/json
User-Agent: VideoComposer-Webhook/1.0
X-Webhook-Event: job.completed
X-Webhook-Timestamp: 2025-06-08T01:48:12.123Z
X-Webhook-Signature: sha256=d2e58b45f8c6e7a9d4b3c1a8e9f6d3b2a7c4e8f9a2b5c7d8e3f4a6b7c8d9e1f2Retry Policy
- •We'll retry failed webhook deliveries up to 3 times
- •Retries use exponential backoff: 1 minute, 5 minutes, then 15 minutes
- •Webhooks have a 30 second timeout
- •Only 2xx status codes are considered successful
Security
If you provide a webhook secret when configuring your webhook, we'll use it to sign the payload with HMAC-SHA256. The signature is included in the X-Webhook-Signature header.
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSignature)
);
}/webhooksUpdate Webhook Configuration
Configure or update the webhook URL for your API key
Request Body
{
"webhook_url": "https://your-domain.com/webhook",
"webhook_secret": "your-secret-key-min-16-chars"
}Response Example
{
"success": true,
"message": "Webhook updated successfully",
"webhook_url": "https://your-domain.com/webhook"
}Code Examples
curl -X PUT https://api.videocomposer.io/webhooks \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"webhook_url": "https://your-domain.com/webhook",
"webhook_secret": "your-secret-key-min-16-chars"
}'/webhooksGet Webhook Configuration
Retrieve the current webhook configuration for your API key
Response Example
{
"webhook_url": "https://your-domain.com/webhook",
"configured": true
}Code Examples
curl -X GET https://api.videocomposer.io/webhooks \
-H "x-api-key: YOUR_API_KEY"/webhooks/testTest Webhook
Send a test payload to a webhook URL to verify it's working correctly
Request Body
{
"webhook_url": "https://your-domain.com/webhook",
"webhook_secret": "your-secret-key-min-16-chars"
}Response Example
{
"success": true,
"message": "Webhook test successful",
"responseTime": 123
}Code Examples
curl -X POST https://api.videocomposer.io/webhooks/test \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"webhook_url": "https://your-domain.com/webhook",
"webhook_secret": "your-secret-key-min-16-chars"
}'Account
/usageGet Credit Balance
Check your current credit balance
Response Example
{
"credits": 500
}Code Examples
curl -X GET "https://api.videocomposer.io/usage" \
-H "x-api-key: YOUR_API_KEY"Sample Videos
Use these sample videos for testing the API
https://cdn.videocomposer.io/sample_video1.mp4https://cdn.videocomposer.io/sample_video2.mp4https://cdn.videocomposer.io/sample_video3.mp4https://cdn.videocomposer.io/sample_video4.mp4https://cdn.videocomposer.io/sample_video5.mp4