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.

Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
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-audioAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video_url | Yesrequired | string | — | A publicly reachable https URL of a video of 1 second or more (MP4 or MOV recommended) |
| The video to add sound to. | ||||
duration | Yesrequired | integer | — | 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_prompt | No | string | — | Text, up to 2000 characters |
| Optional description of the sound you want. | ||||
negative_prompt | No | string | — | Text, up to 1000 characters |
| Sounds to keep out of the result, as a short comma-separated list. | ||||
preserve_speech | No | boolean | true | true 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_samples | No | integer | 2 | Whole number from 1 to 4 |
| How many variations to generate. Each variation is a separate file and is billed separately. | ||||
seed | No | integer | — | Whole number from 0 to 9007199254740991 |
| Fix the seed to repeat a result; leave it out for a random seed. | ||||
upload_audio_format | No | string | "wav" | wav, mp3, aac, flac |
| File type of each audio file. | ||||
upload_audio_bitrate_kbps | No | integer | — | 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_samplesfrom 1 to 4 (2 when you leave it out).batch_size,num_images,number_of_images,nandcountare rejected — usenum_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_secondandmusic_length_msare rejected. - Send every field at the top level of the JSON body;
parameters,input,contentandtextare rejected. - Send one video in
video_urlas a publicly reachablehttpsURL. For an MP4 or MOV video the billed seconds are measured from the video when you submit; for another type the fulldurationyou send is billed. - Use the JSON types shown:
duration,num_samples,seedandupload_audio_bitrate_kbpsare whole numbers (3, not"3"),preserve_speechistrueorfalse, 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_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. streamis not supported: the result is delivered when the job completes.- Options this API does not offer are rejected:
video,video_urls,promptandaudio_url.
Video and Sound
durationsets the seconds of sound to generate (1 to 60); when the video is shorter, the sound ends with the video.- With
preserve_speechleft attrue, speech already in the video is kept and the rest of the soundtrack is generated around it;falsegenerates sound effects only. - Each of the
num_samplesvariations (1 to 4, 2 by default) is a separate audio file inoutput.media_url. Choose the file type withupload_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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid 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. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty video_url, video_url not a string | synchronous 400 |
Missing or empty duration | synchronous 400 |
text_prompt not a string, or longer than 2000 characters | synchronous 400 |
negative_prompt not a string, or longer than 1000 characters | synchronous 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 256 | synchronous 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 second | status: "ERROR" |
| A request the model refuses, for example under its content policy | status: "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_KEYcURL 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — mirelo-sfx-2-0-video-to-audio for this endpoint. |
| output.media_url | array of strings | URLs 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_type | string | audio/wav, or the type of the file type you choose with upload_audio_format. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-audio/v1/video-to-audio. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the audio file fromoutput.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
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-audioAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text, up to 2000 characters |
What the sound should be, for example Heavy rain on a metal roof with distant thunder. | ||||
duration | Yesrequired | integer | — | Whole number from 1 to 60 |
| Seconds of sound to generate. It sets the amount billed (see How Billing Is Measured). | ||||
negative_prompt | No | string | — | Text, up to 1000 characters |
| Sounds to keep out of the result. | ||||
num_samples | No | integer | 2 | Whole number from 1 to 4 |
| How many variations to generate. Each variation is a separate file and is billed separately. | ||||
seed | No | integer | — | Whole number from 0 to 9007199254740991 |
| Seed of the first variation; leave it out for a random seed. | ||||
upload_audio_format | No | string | "wav" | wav, mp3, aac, flac |
| File type of each audio file. | ||||
upload_audio_bitrate_kbps | No | integer | — | 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_samplesfrom 1 to 4 (2 when you leave it out).batch_size,num_images,number_of_images,nandcountare rejected — usenum_samples. - Set the length with
duration(whole seconds, 1 to 60).seconds,num_frames,frames_per_secondandmusic_length_msare rejected. - Send every field at the top level of the JSON body;
parameters,input,contentandtextare rejected. - Describe the sound in
prompt; name the sounds to keep out innegative_prompt. - Use the JSON types shown:
duration,num_samples,seedandupload_audio_bitrate_kbpsare 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_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. streamis not supported: the result is delivered when the job completes.- Options this API does not offer are rejected:
text_prompt,video_urlandpreserve_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 examplemusic. - Each of the
num_samplesvariations (1 to 4, 2 by default) is a separate audio file inoutput.media_url. Choose the file type withupload_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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid 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. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, prompt not a string, or longer than 2000 characters | synchronous 400 |
Missing or empty duration | synchronous 400 |
negative_prompt not a string, or longer than 1000 characters | synchronous 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 256 | synchronous 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 policy | status: "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_KEYcURL 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — mirelo-sfx-2-0-text-to-audio for this endpoint. |
| output.media_url | array of strings | URLs 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_type | string | audio/wav, or the type of the file type you choose with upload_audio_format. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/mirelo-sfx-2-0-text-to-audio/v1/text-to-audio. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the audio file fromoutput.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
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-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video_url | Yesrequired | string | — | A publicly reachable https URL of a video of 1 second or more (MP4 or MOV recommended) |
| The video to add sound to. | ||||
duration | Yesrequired | integer | — | 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_prompt | No | string | — | Text, up to 2000 characters |
| Optional description of the sound you want. | ||||
negative_prompt | No | string | — | Text, up to 1000 characters |
| Sounds to keep out of the result, as a short comma-separated list. | ||||
preserve_speech | No | boolean | true | true 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_samples | No | integer | 2 | Whole number from 1 to 4 |
| How many variations to generate. Each variation is a separate file and is billed separately. | ||||
seed | No | integer | — | 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_samplesfrom 1 to 4 (2 when you leave it out).batch_size,num_images,number_of_images,nandcountare rejected — usenum_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_secondandmusic_length_msare rejected. - Send every field at the top level of the JSON body;
parameters,input,contentandtextare rejected. - Send one video in
video_urlas a publicly reachablehttpsURL. For an MP4 or MOV video the billed seconds are measured from the video when you submit; for another type the fulldurationyou send is billed. - Use the JSON types shown:
duration,num_samplesandseedare whole numbers (3, not"3"),preserve_speechistrueorfalse, 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_modeis accepted only asfalse. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_url,webhook_modeandcallback_urlin the JSON body are rejected. streamis 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_formatandupload_audio_bitrate_kbps.
Video and Sound
durationsets the seconds of sound to generate (1 to 60); when the video is shorter, the sound ends with the video.- With
preserve_speechleft attrue, speech already in the video is kept and the rest of the soundtrack is generated around it;falsegenerates sound effects only. - Each of the
num_samplesvariations (1 to 4, 2 by default) is the video with its own soundtrack, as a separate MP4 file inoutput.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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid 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. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty video_url, video_url not a string | synchronous 400 |
Missing or empty duration | synchronous 400 |
text_prompt not a string, or longer than 2000 characters | synchronous 400 |
negative_prompt not a string, or longer than 1000 characters | 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 |
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 second | status: "ERROR" |
| A request the model refuses, for example under its content policy | status: "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_KEYcURL 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — mirelo-sfx-2-0-video-to-video for this endpoint. |
| output.media_url | array of strings | URLs of the videos: one MP4 file per sample (num_samples, 2 when you leave it out). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/mirelo-sfx-2-0-video-to-video/v1/video-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.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
⚡ 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).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.