Developer Docs
Integrating Mirelo Audio APIs into Creative Workflows
Learn how to integrate Mirelo's AI audio generation API into your creative workflow to automate sound effects, foley, and background ambiance production for video and games.
What this guide covers
Mirelo provides a developer API for generating custom sound effects, foley, and background ambiance from text and video, plus native plugins for Adobe Premiere, DaVinci Resolve Studio, and Roblox Studio. This guide is for developers and creators who want to replace manual sound-design work with programmatic audio generation.
- Set up the Developer API and store an API key.
- Generate foley and ambiance from a text prompt, or from a video clip.
- Drop the result into an editing timeline with a native plugin, or keep it in your own pipeline.
Setting up the Mirelo Developer API
The REST API lives at https://api.mirelo.ai. It exposes text-to-SFX and video-to-SFX generation, plus extend and inpaint. The interactive reference is at /api-docs, and the production v3 OpenAPI document is at https://api.mirelo.ai/v3/openapi.json.
- Create an API key in Studio and send it as a Bearer token.
- Call preflight on a generation before you spend credits.
- Submit the create with ?wait=25, then poll if the job is still running.
Getting your API key
API requests authenticate with a Bearer token. Keys are issued in your Mirelo Studio account, begin with sk-, and are billed against Studio credits.
- Sign in at mirelo.ai/studio.
- Open Developer → API Keys (/studio/api-keys).
- Click "Create key", give it a name, and copy it immediately. It is shown once.
- The playground at /studio/playground runs requests before you write code. It does not create keys.
- Hosted MCP (Cursor, Claude, and ChatGPT) signs you in through the browser instead of this key, and bills the same Studio credits.
Configuring environment variables
Store the key in an environment variable rather than hardcoding it. Send it on every request.
- Set MIRELO_API_KEY to the key you copied.
- Set MIRELO_IDEMPOTENCY_KEY to a unique identifier for each new generation. Reuse that value and the same request body when retrying the generation.
- Send Authorization: Bearer $MIRELO_API_KEY.
- Send Content-Type: application/json.
Generating foley and ambiance from text
Preflight the request to read its credit cost, then create the generation with ?wait=25. If the job is still running, poll urls.self and check the job's status before downloading audio. Send an Idempotency-Key on create and reuse it with the same body if you retry. The reference below covers response shapes, job outcomes, and download expiry.
- POST /v3/text-to-sfx/generations/preflight with the same body you intend to generate.
- Gate the create on the quoted credits.
- POST /v3/text-to-sfx/generations?wait=25.
- If the response is 202, poll urls.self until status is final. A successful HTTP response alone does not mean the job succeeded.
Preflight
curl https://api.mirelo.ai/v3/text-to-sfx/generations/preflight \
--request POST \
--header "Authorization: Bearer $MIRELO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "sfx-1.6",
"duration_ms": 8000,
"num_variants": 1,
"input": { "prompt": "Heavy rain on a metal roof with distant thunder" }
}'Create
curl https://api.mirelo.ai/v3/text-to-sfx/generations?wait=25 \
--request POST \
--header "Authorization: Bearer $MIRELO_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: ${MIRELO_IDEMPOTENCY_KEY:?Set a unique key for this generation}" \
--data '{
"model": "sfx-1.6",
"duration_ms": 8000,
"num_variants": 1,
"input": { "prompt": "Heavy rain on a metal roof with distant thunder" }
}'Picture-locked foley from video
For silent or AI-generated footage, video-to-SFX watches the picture and times effects to on-screen action. The clip is input.video on POST /v3/video-to-sfx/generations. Pass a public HTTP or HTTPS URL, or upload a local file with the two requests below. An optional input.prompt covers off-screen detail: the video still drives the timing. Text-to-SFX suites make you generate, then place and sync the audio yourself.
- For a local file, POST /v3/assets with your API key and the file's content_type. The 201 response is an upload ticket with id, upload_url, fields, upload_expires_at, and max_bytes; it does not mean the file has arrived.
- POST multipart/form-data to upload_url without an Authorization header. Send every returned fields entry first, then the file bytes as the final part named file. Keep the upload within max_bytes and start before upload_expires_at.
- Wait for the storage upload's own 2xx response before using the asset id. Generating before the bytes arrive returns asset_not_ready, which can be retried after the upload finishes.
- Send input.video as { "type": "url", "url": "https://…" } or { "type": "asset", "id": "…" }.
- Add input.prompt only when you want to steer which sound to generate.
- Preflight and create the same way as text-to-SFX, on /v3/video-to-sfx/generations.
Create from a video URL
curl https://api.mirelo.ai/v3/video-to-sfx/generations?wait=25 \
--request POST \
--header "Authorization: Bearer $MIRELO_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: ${MIRELO_IDEMPOTENCY_KEY:?Set a unique key for this generation}" \
--data '{
"model": "sfx-1.6",
"duration_ms": 10000,
"input": {
"video": { "type": "url", "url": "https://example.com/scene.mp4" },
"prompt": "Footsteps on wet concrete"
}
}'Integrating with video editing software
Native plugins connect generated audio to an editing timeline or a game engine. They are listed at /plugins.
Adobe Premiere
Generate sound from a selected clip or a text prompt, then use Timeline Sync to place it in Premiere.
Premiere installation and usageDaVinci Resolve Studio
Generate audio and place it on the timeline with Timeline Sync. The plugin requires DaVinci Resolve Studio.
DaVinci Resolve Studio installation and usageRoblox Studio
Generate game-ready sound effects from a prompt and publish them to your Roblox account for use in an experience.
Roblox Studio installation and usageWhat you can build with this
The same API and plugins cover three common jobs.
- Automated foley and ambiance: room tone, weather, and impact sounds from text prompts, with a credit preflight so the cost is known first.
- Timeline-native sound design: Premiere, DaVinci Resolve Studio, or Roblox Studio, with sync handled by the plugin.
- Programmatic pipelines: the REST API on its own, or an MCP-connected agent in Cursor, Claude, or ChatGPT for on-demand generation.
Related resources
The API reference and plugins sit next to this guide. They do not replace it.
API Docs
Interactive reference for every endpoint, including request and response schemas.
API reference (Markdown)
Read the v3 API concepts and examples as plain Markdown.
OpenAPI v3
Download the production v3 OpenAPI document.
Plugins
Premiere, DaVinci Resolve Studio, and Roblox Studio plugins.
Studio Docs
Studio workflow guide for uploading a clip and generating inside the app.
API playground
Run a request in Studio before you write the client.