Video to Music
POSThttps://api.knoxstudio.ai/v1/music/video-to-music
Generate a soundtrack matched to uploaded video. Videos are combined in order. Max 10 videos, 200MB combined, 210MB multipart payload. Billed at $0.20/min. output_format uses the stem allow-list (no auto, no 48 kHz MP3).
Request
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| output_format | String | No | Allowed: mp3_22050_32, mp3_24000_48, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_32000, pcm_44100, pcm_48000, ulaw_8000, alaw_8000, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192. |
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | Bearer <token> Knox API key. xi-api-key is also accepted. |
| Content-Type | String | Yes | multipart/form-data. |
Request Body (multipart/form-data)
| Name | Type | Required | Description |
|---|---|---|---|
| videos | Files | Yes | One or more video files (videos FormData array). Combined in order. |
| description | String | No | Music description, max 1000 characters. |
| tags | List of Strings | No | Style tags, max 10 (for example upbeat, cinematic). |
| model_id | String | No | music_v1, music_v2, or music_v2_5. |
| sign_with_c2pa | Boolean | No | C2PA sign MP3 output. |
cURL Example
curl -X POST "https://api.knoxstudio.ai/v1/music/video-to-music?output_format=mp3_44100_128" \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-F "videos=@clip1.mp4" \
-F "videos=@clip2.mp4" \
-F "description=Warm cinematic score, no vocals" \
-F "tags=cinematic" \
-F "tags=orchestral" \
-F "model_id=music_v2_5" \
-o score.mp3
Response
Success Response (200)
Generated audio file. Content-Type follows output_format (default MP3).
Error Responses
Validation uses HTTP 422:
{
"detail": [
{
"loc": ["body", "field"],
"msg": "…",
"type": "value_error"
}
]
}
Other errors use { "detail": "message" }.
| Status | When |
|---|---|
400 | WebSocket path called without Upgrade: websocket. |
401 | Missing or invalid API key. |
402 | Insufficient credits. |
403 | Token is not allowed to use this model. |
404 | Resource not found. |
422 | Validation error. |
429 | Rate limit exceeded. |
500 | Internal server error. |