Mirelo
PluginsPricingCreative PartnershipsAPI Docs
Go to Studio

API Reference

Mirelo AI

Guides

Generate

api.mirelo.ai
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

POSThttps://api.mirelo.ai/v2/text-to-sfx/v1.5/sync

Parameters

Headers

NameTypeRequiredDescription
Authorizationstringrequired

Bearer token authentication using your API key.

Example: Bearer mk_live_xxxxxxxxxxxxxxxx

Content-Typestringrequired

Must be application/json.

Example: application/json

Body

NameTypeRequiredDescription
prompt
stringrequired

A text description of the sound to generate. Up to 5,000 characters.

duration_ms
integeroptional

Target duration of the output audio in milliseconds. Must be between 1,000 and 10,000.

Default: 10000

num_samples
integeroptional

Number of audio variants to generate in parallel. Returns one URL per sample.

Default: 1

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"
  ]
}