Text to SFX · Generate from prompt
Text to SFX·Generate from prompt
Generate from prompt
Describe any sound in natural language and get back audio clips ready to drop into your project.
Endpoint
POST
https://api.mirelo.ai/v2/text-to-sfx/v1.5/syncParameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | required | Bearer token authentication using your API key. Example: |
Content-Type | string | required | Must be application/json. Example: |
Body
| Name | Type | Required | Description |
|---|---|---|---|
prompt | string | required | A text description of the sound to generate. Up to 5,000 characters. |
duration_ms | integer | optional | Target duration of the output audio in milliseconds. Must be between 1,000 and 10,000. Default: |
num_samples | integer | optional | Number of audio variants to generate in parallel. Returns one URL per sample. Default: |
curl 'https://api.mirelo.ai/v2/text-to-sfx/v1.5/preflight?duration_ms=10000&num_samples=1' \
--header 'Authorization: Bearer YOUR_API_KEY'200 OK — cost estimate
{
"credits": 2,
"estimated_ms": 4200
}curl https://api.mirelo.ai/v2/text-to-sfx/v1.5/sync \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Heavy rain on a metal roof with distant thunder",
"duration_ms": 5000,
"num_samples": 1
}'200 OK
{
"result_urls": [
"https://cdn.mirelo.ai/output/abc123.wav"
]
}