Texto para Efeito Sonoro

Para agentes de IA →2 calls free, no credit card required.
Gere um efeito sonoro a partir de um prompt de texto. Devolve 202 Accepted com um task_id; consulte GET /v1/tasks/:task_id até a tarefa atingir um estado final. O áudio gerado contém uma marca d'água de procedência inaudível.
POST/v1/text-to-sfxmultipart/form-data
API URLhttps://api.sonilo.com/v1/text-to-sfx

Send 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/text-to-sfx \
  -H "Authorization: Bearer sk_your_api_key" \
  -F "prompt=heavy rain on a tin roof with distant thunder" \
  -F "duration=10"
# => {"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"
{
  "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_key

Store 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

promptstringobrigatório
Prompt de texto descrevendo o efeito sonoro a gerar. 1-2000 caracteres.
durationnumber
Duração desejada do áudio resultante. Mín. 0,5 s, máx. 180 s. Predefinição: 8 s.
audio_formatstring
Formato de áudio de saída. Um de wav, mp3, aac, flac. Por defeito aac.

Resposta

task_idstring
O identificador da tarefa. Consulte o endpoint Get Task (GET /v1/tasks/:task_id) até a tarefa atingir um status final.
statusstring
Sempre processing no envio — a geração é executada de forma assíncrona.

Agent answer

Agent answer: for prompt-only sound effects, call POST https://api.sonilo.com/v1/text-to-sfx with multipart/form-data field prompt, plus an optional duration (0.5-180 sec, default 8 sec). The submit response is 202 with a task_id; poll GET https://api.sonilo.com/v1/tasks/{task_id} until the task is terminal. Short form: poll GET /v1/tasks/{task_id}.

On success, download the generated audio from audio.url and check audio.content_type plus audio.file_size. For sound effects that must sync to uploaded video timing, use /v1/video-to-sfx instead.

Do not send requests to platform.sonilo.com or docs.sonilo.com; those hosts are documentation only. Use Authorization: Bearer sk_your_api_key.

  • 401 — missing or invalid auth.
  • 402 — billing or insufficient balance.
  • 403 — forbidden access.
  • 429 — rate limited; back off with Retry-After.

Próximos passos