API REFERENCE
Create music from video
On this page
/api/music/video-to-musicGenerate background music from video files. Upload 1–10 video files via multipart/form-data (max 200 MB total). The AI analyzes the video content and generates music that matches the mood, pacing, and style. Optionally provide a text description and style tags to guide the output.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/music/video-to-music' \
--header 'x-api-key: YOUR_API_KEY' \
--form 'files=@YOUR_FILE_PATH'Request body required
Video files and optional generation parameters
multipart/form-data
filesarray<string>requiredVideo files to analyze (max 200 MB total)
minItems: 1 · maxItems: 10
Item properties for files
string
descriptionstringOptional text description to guide the music generation
maxLength: 1000
tagsarray<string>Optional style tags to influence the output (max 10)
maxItems: 10
Item properties for tags
string
sign_with_c2pabooleanSign the output with C2PA content credentials
Default: false
output_formatstringAudio output format (e.g. mp3_44100_192)
Responses
200Background music generated successfully+
song-idresponse headerUnique identifier for the generated song
audio/mpeg
string
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 background music from video files. Upload 1–10 video files via multipart/form-data (max 200 MB total). The AI analyzes the video content and generates music that matches the mood, pacing, and style. Optionally provide a text description and style tags to guide the output.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"requestBody": {
"description": "Video files and optional generation parameters",
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
},
"minItems": 1,
"maxItems": 10,
"description": "Video files to analyze (max 200 MB total)"
},
"description": {
"type": "string",
"maxLength": 1000,
"description": "Optional text description to guide the music generation"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 10,
"description": "Optional style tags to influence the output (max 10)"
},
"sign_with_c2pa": {
"type": "boolean",
"default": false,
"description": "Sign the output with C2PA content credentials"
},
"output_format": {
"type": "string",
"description": "Audio output format (e.g. mp3_44100_192)"
}
},
"required": [
"files"
]
}
}
}
},
"responses": {
"200": {
"description": "Background music generated successfully",
"headers": {
"song-id": {
"schema": {
"type": "string"
},
"description": "Unique identifier for the generated song"
}
},
"content": {
"audio/mpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Validation failed — invalid or missing request body fields",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MusicErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized — invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MusicErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MusicErrorResponse"
}
}
}
}
}
}