Mirelo SFX 2.0 API: Pricing, Documentation

by Mirelo AI

Mirelo SFX by Mirelo AI generates ambient audio and sound effects synchronized to video input. Through Pixazo's API, developers can produce immersive soundscapes from text prompts or directly from video content, ideal for film, game audio, content production, and accessibility.

Get API Key
Mirelo SFX API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

Mirelo SFX 2.0 API Documentation

Add sound to a video with Mirelo SFX 2.0: send the video in video_url and the seconds of sound to generate in duration. Optionally describe the sound in text_prompt, keep the speech already in the video with preserve_speech and ask for variations with num_samples. The soundtrack comes back as audio files, without the video. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the files from output.media_url (one audio file per sample).

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Audio - Mirelo SFX 2.0

Request Code

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "footsteps on gravel and a light breeze",
  "duration": 3,
  "num_samples": 1
}
import requests

url = "https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "footsteps on gravel and a light breeze",
  "duration": 3,
  "num_samples": 1
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "footsteps on gravel and a light breeze",
  "duration": 3,
  "num_samples": 1
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "text_prompt": "footsteps on gravel and a light breeze", "duration": 3, "num_samples": 1}'

Output

{
  "request_id": "mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "text_prompt": "footsteps on gravel and a light breeze", "duration": 3, "num_samples": 1}'

Callback Payload (success)

{
  "request_id": "mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-video-to-audio",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "mirelo-sfx-2-0-video-to-audio",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—A publicly reachable https URL of a video of 1 second or more (MP4 or MOV recommended)
The video to add sound to.
durationYesrequiredinteger—Whole number from 1 to 60
Seconds of sound to generate. When the video is shorter, the sound ends with the video and only that length is billed (see How Billing Is Measured).
text_promptNostring—Text, up to 2000 characters
Optional description of the sound you want.
negative_promptNostring—Text, up to 1000 characters
Sounds to keep out of the result, as a short comma-separated list.
preserve_speechNobooleantruetrue or false
Keep the speech already in the video and generate the rest of the soundtrack around it; false generates sound effects only and leaves speech out.
num_samplesNointeger2Whole number from 1 to 4
How many variations to generate. Each variation is a separate file and is billed separately.
seedNointeger—Whole number from 0 to 9007199254740991
Fix the seed to repeat a result; leave it out for a random seed.
upload_audio_formatNostring"wav"wav, mp3, aac, flac
File type of each audio file.
upload_audio_bitrate_kbpsNointeger—32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320
Only with upload_audio_format "mp3" or "aac": kilobits per second, exact for mp3 and a target for aac (which takes 32 to 256). Leave it out for the default.

Good to know

  • Each request returns one audio file per sample: set num_samples from 1 to 4 (2 when you leave it out). batch_size, num_images, number_of_images, n and count are rejected — use num_samples.
  • Set the length with duration (whole seconds, 1 to 60); it ends with the video when the video is shorter. seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Send every field at the top level of the JSON body; parameters, input, content and text are rejected.
  • Send one video in video_url as a publicly reachable https URL. For an MP4 or MOV video the billed seconds are measured from the video when you submit; for another type the full duration you send is billed.
  • Use the JSON types shown: duration, num_samples, seed and upload_audio_bitrate_kbps are whole numbers (3, not "3"), preserve_speech is true or false, and the other fields are strings.
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Options this API does not offer are rejected: video, video_urls, prompt and audio_url.

Video and Sound

  • duration sets the seconds of sound to generate (1 to 60); when the video is shorter, the sound ends with the video.
  • With preserve_speech left at true, speech already in the video is kept and the rest of the soundtrack is generated around it; false generates sound effects only.
  • Each of the num_samples variations (1 to 4, 2 by default) is a separate audio file in output.media_url. Choose the file type with upload_audio_format.

Example: three variations as MP3 files

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "footsteps on gravel and a light breeze",
  "duration": 3,
  "num_samples": 3,
  "upload_audio_format": "mp3"
}

Example: sound effects only, with music left out

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "duration": 3,
  "num_samples": 1,
  "preserve_speech": false,
  "negative_prompt": "music"
}

Example Request

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "footsteps on gravel and a light breeze",
  "duration": 3,
  "num_samples": 1
}

Example Response

{
  "request_id": "mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty video_url, video_url not a stringsynchronous 400
Missing or empty durationsynchronous 400
text_prompt not a string, or longer than 2000 characterssynchronous 400
negative_prompt not a string, or longer than 1000 characterssynchronous 400
upload_audio_bitrate_kbps needs upload_audio_format set to "mp3" or "aac" (wav and flac take no such setting)synchronous 400
upload_audio_bitrate_kbps with "aac" takes 32 to 256synchronous 400
upload_audio_format not one of the allowed values (written exactly as listed)synchronous 400
upload_audio_bitrate_kbps not one of the allowed values (written exactly as listed)synchronous 400
preserve_speech not true or false — for example the string "true"synchronous 400
num_samples not a whole number from 1 to 4 — for example 0, 5 or the string "1"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1, 9007199254740992 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
video, video_urls (send one video as video_url)synchronous 400
prompt (describe the sound in text_prompt)synchronous 400
audio_url (the sound is made from the video in video_url)synchronous 400
batch_size, num_images, number_of_images, n, count (use num_samples for variations)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration)synchronous 400
parameters, input, content, text (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A video that cannot be downloaded or read, or one shorter than 1 secondstatus: "ERROR"
A request the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

Missing duration (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' is required",
  "violations": [
    "'duration' is required"
  ]
}

A duration over 60 seconds (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 60 (got 90)",
  "violations": [
    "'duration' must be <= 60 (got 90)"
  ]
}

More than 4 variations (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_samples' must be <= 4 (got 6)",
  "violations": [
    "'num_samples' must be <= 4 (got 6)"
  ]
}

A batch field instead of num_samples (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'n' must be one of:  (got 2); 'n' is not supported: use 'num_samples' (1 to 4) to get several variations in one request.",
  "violations": [
    "'n' must be one of:  (got 2)",
    "'n' is not supported: use 'num_samples' (1 to 4) to get several variations in one request."
  ]
}

upload_audio_bitrate_kbps without an mp3 or aac format (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'upload_audio_bitrate_kbps' needs 'upload_audio_format' set to \"mp3\" or \"aac\" (wav and flac take no such setting).",
  "violations": [
    "'upload_audio_bitrate_kbps' needs 'upload_audio_format' set to \"mp3\" or \"aac\" (wav and flac take no such setting)."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "mirelo-sfx-2-0-video-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-video-to-audio",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — mirelo-sfx-2-0-video-to-audio for this endpoint.
output.media_urlarray of stringsURLs of the audio files: one WAV file per sample (num_samples, 2 when you leave it out), or the file type you choose with upload_audio_format.
output.media_typestringaudio/wav, or the type of the file type you choose with upload_audio_format.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

How Billing Is Measured

Billing is measured per second of generated sound and per sample: the seconds are the duration you send, cut to the length of the video when the video is shorter (measured from an MP4 or MOV video when you submit and rounded up to a whole second; for another type the full duration is billed), multiplied by num_samples. The prompts and the speech setting do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

Mirelo SFX 2.0 API Pricing

Your request will cost $0.015 per second per sample.
Text to Audio

Mirelo SFX 2.0 API Documentation

Generate sound effects from a text description with Mirelo SFX 2.0: describe the sound in prompt and set its length in duration. Optionally list sounds to leave out in negative_prompt and ask for variations with num_samples. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the files from output.media_url (one audio file per sample).

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Audio - Mirelo SFX 2.0

Request Code

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Heavy rain on a metal roof with distant thunder",
  "duration": 5,
  "num_samples": 1
}
import requests

url = "https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Heavy rain on a metal roof with distant thunder",
  "duration": 5,
  "num_samples": 1
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Heavy rain on a metal roof with distant thunder",
  "duration": 5,
  "num_samples": 1
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Heavy rain on a metal roof with distant thunder", "duration": 5, "num_samples": 1}'

Output

{
  "request_id": "mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "Heavy rain on a metal roof with distant thunder", "duration": 5, "num_samples": 1}'

Callback Payload (success)

{
  "request_id": "mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-text-to-audio",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "mirelo-sfx-2-0-text-to-audio",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text, up to 2000 characters
What the sound should be, for example Heavy rain on a metal roof with distant thunder.
durationYesrequiredinteger—Whole number from 1 to 60
Seconds of sound to generate. It sets the amount billed (see How Billing Is Measured).
negative_promptNostring—Text, up to 1000 characters
Sounds to keep out of the result.
num_samplesNointeger2Whole number from 1 to 4
How many variations to generate. Each variation is a separate file and is billed separately.
seedNointeger—Whole number from 0 to 9007199254740991
Seed of the first variation; leave it out for a random seed.
upload_audio_formatNostring"wav"wav, mp3, aac, flac
File type of each audio file.
upload_audio_bitrate_kbpsNointeger—32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320
Only with upload_audio_format "mp3" or "aac": kilobits per second, exact for mp3 and a target for aac (which takes 32 to 256). Leave it out for the default.

Good to know

  • Each request returns one audio file per sample: set num_samples from 1 to 4 (2 when you leave it out). batch_size, num_images, number_of_images, n and count are rejected — use num_samples.
  • Set the length with duration (whole seconds, 1 to 60). seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Send every field at the top level of the JSON body; parameters, input, content and text are rejected.
  • Describe the sound in prompt; name the sounds to keep out in negative_prompt.
  • Use the JSON types shown: duration, num_samples, seed and upload_audio_bitrate_kbps are whole numbers (5, not "5"), and the other fields are strings.
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Options this API does not offer are rejected: text_prompt, video_url and preserve_speech.

Sound Prompts

  • Describe the sound in prompt, for example a place, the objects in it and what happens.
  • List sounds to keep out in negative_prompt, for example music.
  • Each of the num_samples variations (1 to 4, 2 by default) is a separate audio file in output.media_url. Choose the file type with upload_audio_format.

Example: two variations without music

{
  "prompt": "A busy city street at night with passing cars",
  "negative_prompt": "music",
  "duration": 8,
  "num_samples": 2
}

Example Request

{
  "prompt": "Heavy rain on a metal roof with distant thunder",
  "duration": 5,
  "num_samples": 1
}

Example Response

{
  "request_id": "mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 2000 characterssynchronous 400
Missing or empty durationsynchronous 400
negative_prompt not a string, or longer than 1000 characterssynchronous 400
upload_audio_bitrate_kbps needs upload_audio_format set to "mp3" or "aac" (wav and flac take no such setting)synchronous 400
upload_audio_bitrate_kbps with "aac" takes 32 to 256synchronous 400
upload_audio_format not one of the allowed values (written exactly as listed)synchronous 400
upload_audio_bitrate_kbps not one of the allowed values (written exactly as listed)synchronous 400
num_samples not a whole number from 1 to 4 — for example 0, 5 or the string "1"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1, 9007199254740992 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
text_prompt (describe the sound in prompt)synchronous 400
video_url, preserve_speech (this API makes sound from text; for a video use Video to Audio)synchronous 400
batch_size, num_images, number_of_images, n, count (use num_samples for variations)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration)synchronous 400
parameters, input, content, text (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A prompt the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

Missing duration (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' is required",
  "violations": [
    "'duration' is required"
  ]
}

A duration sent as text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

More than 4 variations (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_samples' must be <= 4 (got 5)",
  "violations": [
    "'num_samples' must be <= 4 (got 5)"
  ]
}

A file type that is not offered (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'upload_audio_format' must be one of: \"wav\", \"mp3\", \"aac\", \"flac\" (got \"ogg\")",
  "violations": [
    "'upload_audio_format' must be one of: \"wav\", \"mp3\", \"aac\", \"flac\" (got \"ogg\")"
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "mirelo-sfx-2-0-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-text-to-audio",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — mirelo-sfx-2-0-text-to-audio for this endpoint.
output.media_urlarray of stringsURLs of the audio files: one WAV file per sample (num_samples, 2 when you leave it out), or the file type you choose with upload_audio_format.
output.media_typestringaudio/wav, or the type of the file type you choose with upload_audio_format.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

How Billing Is Measured

Billing is measured per second of generated sound and per sample: the duration you send multiplied by num_samples. The prompts and the file type do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

Mirelo SFX 2.0 API Pricing

Your request will cost $0.015 per second per sample.
Video to Video

Mirelo SFX 2.0 API Documentation

Give a video a new soundtrack with Mirelo SFX 2.0: send the video in video_url and the seconds of sound to generate in duration. Optionally describe the sound in text_prompt and keep the speech already in the video with preserve_speech. The video comes back with its new soundtrack, once per sample. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the files from output.media_url (one video per sample).

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - Mirelo SFX 2.0

Request Code

POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "soft ambient room tone",
  "duration": 3,
  "num_samples": 1
}
import requests

url = "https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "soft ambient room tone",
  "duration": 3,
  "num_samples": 1
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "soft ambient room tone",
  "duration": 3,
  "num_samples": 1
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "text_prompt": "soft ambient room tone", "duration": 3, "num_samples": 1}'

Output

{
  "request_id": "mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "text_prompt": "soft ambient room tone", "duration": 3, "num_samples": 1}'

Callback Payload (success)

{
  "request_id": "mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-video-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "mirelo-sfx-2-0-video-to-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—A publicly reachable https URL of a video of 1 second or more (MP4 or MOV recommended)
The video to add sound to.
durationYesrequiredinteger—Whole number from 1 to 60
Seconds of sound to generate. When the video is shorter, the sound ends with the video and only that length is billed (see How Billing Is Measured).
text_promptNostring—Text, up to 2000 characters
Optional description of the sound you want.
negative_promptNostring—Text, up to 1000 characters
Sounds to keep out of the result, as a short comma-separated list.
preserve_speechNobooleantruetrue or false
Keep the speech already in the video and generate the rest of the soundtrack around it; false generates sound effects only and leaves speech out.
num_samplesNointeger2Whole number from 1 to 4
How many variations to generate. Each variation is a separate file and is billed separately.
seedNointeger—Whole number from 0 to 9007199254740991
Fix the seed to repeat a result; leave it out for a random seed.

Good to know

  • Each request returns one video per sample: set num_samples from 1 to 4 (2 when you leave it out). batch_size, num_images, number_of_images, n and count are rejected — use num_samples.
  • Set the length with duration (whole seconds, 1 to 60); it ends with the video when the video is shorter. seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Send every field at the top level of the JSON body; parameters, input, content and text are rejected.
  • Send one video in video_url as a publicly reachable https URL. For an MP4 or MOV video the billed seconds are measured from the video when you submit; for another type the full duration you send is billed.
  • Use the JSON types shown: duration, num_samples and seed are whole numbers (3, not "3"), preserve_speech is true or false, and the other fields are strings.
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Options this API does not offer are rejected: video, video_urls, prompt, audio_url, upload_audio_format and upload_audio_bitrate_kbps.

Video and Sound

  • duration sets the seconds of sound to generate (1 to 60); when the video is shorter, the sound ends with the video.
  • With preserve_speech left at true, speech already in the video is kept and the rest of the soundtrack is generated around it; false generates sound effects only.
  • Each of the num_samples variations (1 to 4, 2 by default) is the video with its own soundtrack, as a separate MP4 file in output.media_url.

Example: keep the speech and get two variations

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "soft ambient room tone",
  "duration": 3,
  "num_samples": 2,
  "preserve_speech": true
}

Example Request

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "text_prompt": "soft ambient room tone",
  "duration": 3,
  "num_samples": 1
}

Example Response

{
  "request_id": "mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty video_url, video_url not a stringsynchronous 400
Missing or empty durationsynchronous 400
text_prompt not a string, or longer than 2000 characterssynchronous 400
negative_prompt not a string, or longer than 1000 characterssynchronous 400
preserve_speech not true or false — for example the string "true"synchronous 400
num_samples not a whole number from 1 to 4 — for example 0, 5 or the string "1"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1, 9007199254740992 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
video, video_urls (send one video as video_url)synchronous 400
prompt (describe the sound in text_prompt)synchronous 400
audio_url (the sound is made from the video in video_url)synchronous 400
upload_audio_format, upload_audio_bitrate_kbps (this API returns the video as MP4)synchronous 400
batch_size, num_images, number_of_images, n, count (use num_samples for variations)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration)synchronous 400
parameters, input, content, text (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A video that cannot be downloaded or read, or one shorter than 1 secondstatus: "ERROR"
A request the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

Missing duration (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' is required",
  "violations": [
    "'duration' is required"
  ]
}

A duration of 0 (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be >= 1 (got 0)",
  "violations": [
    "'duration' must be >= 1 (got 0)"
  ]
}

More than 4 variations (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_samples' must be <= 4 (got 5)",
  "violations": [
    "'num_samples' must be <= 4 (got 5)"
  ]
}

An audio file type on this API (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'upload_audio_format' must be one of:  (got \"mp3\"); 'upload_audio_format' is not accepted: this endpoint returns the video with its new soundtrack (mp4).",
  "violations": [
    "'upload_audio_format' must be one of:  (got \"mp3\")",
    "'upload_audio_format' is not accepted: this endpoint returns the video with its new soundtrack (mp4)."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "mirelo-sfx-2-0-video-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "mirelo-sfx-2-0-video-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — mirelo-sfx-2-0-video-to-video for this endpoint.
output.media_urlarray of stringsURLs of the videos: one MP4 file per sample (num_samples, 2 when you leave it out).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of generated sound and per sample: the seconds are the duration you send, cut to the length of the video when the video is shorter (measured from an MP4 or MOV video when you submit and rounded up to a whole second; for another type the full duration is billed), multiplied by num_samples. The prompts and the speech setting do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

Mirelo SFX 2.0 API Pricing

Your request will cost $0.015 per second per sample.

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
1,200last 30d
~40 per day
Success rate
100.0%
of completed generations
Generation time
28.0savg
p95 37.1s
Requests
Nov 1max 1,200Nov 30
Mirelo SFX 2.0Avg 40/day
Generation Time
Nov 1max 28.0sNov 30
Mirelo SFX 2.0Avg 28.0s
Error Rate
Nov 1max 5.0%Nov 30
Mirelo SFX 2.0Avg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
100.00%
across all generations of this model family
Uptime
Nov 1max 100%Nov 30
SuccessfulAvg 100.00%