Video to Sound Effect
audio_format, not audioFormat.Agent answer
Agent answer: use POST https://api.sonilo.com/v1/video-to-sfx when the input is a video and the output should be sound effects aligned to on-screen timing. Submit exactly one of video or video_url; include an optional prompt or segments for directed Foley, ambience, impacts, and transitions.
The endpoint returns 202 with a task_id. Poll GET https://api.sonilo.com/v1/tasks/{task_id} until the task is terminal. On success, download audio.url and inspect audio.content_type plus audio.file_size. Use audio_format for the requested format; do not send audioFormat.
Do not call docs URLs as API endpoints. Runtime requests must go to https://api.sonilo.com/v1 with Authorization: Bearer sk_your_api_key. Treat 401 as invalid auth, 402 as insufficient balance, 403 as forbidden, and 429 as rate limited with Retry-After backoff.
/v1/video-to-sfxmultipart/form-datahttps://api.sonilo.com/v1/video-to-sfxSend API requests to https://api.sonilo.com. The platform.sonilo.com/docs pages are documentation only and are not API endpoints.
curl -X POST https://api.sonilo.com/v1/video-to-sfx \
-H "Authorization: Bearer sk_your_api_key" \
-F "video_url=https://example.com/clip.mp4" \
-F "prompt=match the on-screen action"
# => {"task_id": "9f5f2f7e-...", "status": "processing"}
curl https://api.sonilo.com/v1/tasks/9f5f2f7e-... \
-H "Authorization: Bearer sk_your_api_key"
# poll until "status" is "succeeded" or "failed"curl -X POST https://api.sonilo.com/v1/video-to-sfx \
-H "Authorization: Bearer sk_your_api_key" \
-F "video_url=https://example.com/clip.mp4" \
-F 'segments=[{"start": 0, "end": 4, "prompt": "footsteps on gravel"}, {"start": 4, "end": 10, "prompt": "car door slam then engine starts"}]'{
"task_id": "9f5f2f7e-…",
"status": "processing"
}Authorization
Authenticate via Bearer token. Generate keys at the API Keys page and pass them in the Authorization header on every request. Keep keys server-side, for example in SONILO_API_KEY.
Authorization: Bearer sk_your_api_keyStore the key server-side, commonly as SONILO_API_KEY. A 401 means the key is missing, invalid, or revoked. A 403 means the key is valid but the account does not have access to that endpoint or workspace.
Body Parameters
videofilevideo or video_url, not both. Accepted formats: mp4, mov, webm, m4v, gif (animated). Max file size: default 300MB. Max duration: 480 sec.video_urlstringvideo or video_url, not both. Must be a public http:// or https:// URL; private/internal addresses are rejected. Max file size: default 300MB. Max duration: 480 sec.promptstringsegmentsstringstart and end (seconds; the first segment's start must be 0, each segment's end must be greater than its start, and segments must be contiguous — each end equal to the next segment's start) and prompt (1-200 characters) describing the sound effect for that segment. The last segment's end must not exceed the video duration, which is capped at 480 sec.audio_formatstringwav, mp3, aac, flac. Defaults to aac.Response
task_idstringstatusstringNext steps
curl -X POST https://api.sonilo.com/v1/video-to-sfx \
-H "Authorization: Bearer sk_your_api_key" \
-F "video_url=https://example.com/clip.mp4" \
-F "prompt=match the on-screen action"
# => {"task_id": "9f5f2f7e-...", "status": "processing"}
curl https://api.sonilo.com/v1/tasks/9f5f2f7e-... \
-H "Authorization: Bearer sk_your_api_key"
# poll until "status" is "succeeded" or "failed"curl -X POST https://api.sonilo.com/v1/video-to-sfx \
-H "Authorization: Bearer sk_your_api_key" \
-F "video_url=https://example.com/clip.mp4" \
-F 'segments=[{"start": 0, "end": 4, "prompt": "footsteps on gravel"}, {"start": 4, "end": 10, "prompt": "car door slam then engine starts"}]'{
"task_id": "9f5f2f7e-…",
"status": "processing"
}