Vídeo para Efeito Sonoro
audio_format, not audioFormat. For scene selection, sound layering, and sync review, read the Foley, ambience, and action SFX guide and the sound effects workflow reference. To see how video SFX tools compare on frame accuracy, read the frame-accurate AI sound effects tools comparison./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"
}Autorização
Autentique via token Bearer. Gere chaves na página Chaves de API e passe-as no cabeçalho Authorization em cada pedido.
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.
Parâmetros do Body
videofilevideo ou video_url, não ambos. Formatos aceites: mp4, mov, webm, m4v, gif (animado). Tamanho máximo de ficheiro: 300MB por defeito. Duração máxima: 480 s.video_urlstringvideo ou video_url, não ambos. Deve ser um URL público http:// ou https://; endereços privados/internos são rejeitados. Tamanho máximo de ficheiro: 300MB por defeito. Duração máxima: 480 s.promptstringsegmentsstringstart e end (segundos; o start do primeiro segmento deve ser 0, o end de cada segmento deve ser maior que o seu start, e os segmentos devem ser contíguos — cada end igual ao start do segmento seguinte) e prompt (1-200 caracteres) descrevendo o efeito sonoro desse segmento. O end do último segmento não pode exceder a duração do vídeo, limitada a 480 s.audio_formatstringwav, mp3, aac, flac. Por defeito aac.Resposta
task_idstringstatusstringAgent 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.
401— invalid auth.402— insufficient balance.403— forbidden.429— rate limited; back off withRetry-After.
Próximos passos
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"
}