Skip to content
English

Mirelo SFX 2.0 API

POST Base URL: https://api.hiapi.ai /v1/tasks

Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model name mirelo-sfx-2.0
Type Audio generation (text-to-audio)
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

Mirelo SFX 2.0 text-to-audio: describe the source, material, action, distance, and environment of a sound, and generate a 1–30 second WAV effect for video foley, games, and short-form content.

Production guidance

Production guidance
  • For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
  • GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
  • Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.

Best suited for

Video foley

Fill missing impacts, switches, footsteps, or ambience in an edit with 1–5 second effects that match the shot.

promptduration
Game audio

Generate reusable short effects for buttons, pickups, abilities, doors, and mechanisms, or an ambience bed.

promptduration
Short-form and podcasts

Add a transition, accent, or ambience layer from one description instead of searching a library for a one-off sound.

promptduration

Request parameters

model string required

Fixed value mirelo-sfx-2.0.

example mirelo-sfx-2.0
input object required

Business parameters. Put Mirelo SFX 2.0 inputs here.

prompt string required

Sound description of up to 2,000 characters: name the source, material, action, distance, and environment, then add the attack and tail. For example, "a hammer strike on a steel beam in a large empty warehouse, close perspective, sharp transient and long metallic ring".

duration integer optional

Length of the generated sound effect, an integer from 1 to 30 seconds; when omitted, the clip is generated at 5 seconds. Longer clips cost more; trial the timbre at 1–5 seconds first.

default 5
callback object optional

Optional callback configuration. When set, HiAPI notifies your service when the task reaches a terminal state.

url string required

Required when callback is set; HTTPS URL that receives terminal task notifications.

example https://your-domain.com/hiapi/callback
when enum optional

Callback trigger timing. Use final.

default final enum: final

Example requests

Hammer strike on steel (golden example)

A one-second close-perspective hammer strike that names the source, material, space, and tail; the docs request, model-page case, and Playground use the same request.

Request body
{
  "model": "mirelo-sfx-2.0",
  "input": {
    "prompt": "A single heavy hammer strike on a steel beam in a large empty warehouse, sharp transient, long metallic ring, close perspective.",
    "duration": 1
  }
}

Getting the result

  1. The response returns a taskId immediately without waiting for generation to finish.
  2. In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
  3. When status=success, find the type=audio item in output and download the generated audio from its url.
  4. When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.

FAQ

What is Mirelo SFX 2.0?

Mirelo SFX 2.0 is a text-to-sound-effect model: describe the source, material, action, distance, and environment, and it generates a 1–30 second WAV sound effect. It does not generate songs, speech, or dialogue.

How should I write the prompt?

Order the description as source, material, action, distance and space, environment, then attack and tail. For example, "a hammer strike on a steel beam in a large empty warehouse, close perspective, sharp transient and long metallic ring" is easier to use than a bare "impact sound".

How do I control the length?

Set duration to an integer from 1 to 30 seconds; when omitted, the clip is generated at 5 seconds. Longer clips cost more. Trial the timbre at 1–5 seconds first, then generate the longer version.

What is the output format?

Each request returns one WAV audio file. The first release does not offer other formats or multiple samples per request; submit separate requests or adjust the prompt for another version.

How is it billed?

By the seconds of generated audio, set by duration in the request. Failed tasks are refunded; see the pricing page for the live rate. View pricing

How do I call it through the API?

Send an asynchronous task to POST /v1/tasks with model set to mirelo-sfx-2.0 and prompt in input, plus duration when needed. The call returns a taskId immediately; receive the result through callback.url or poll GET /v1/tasks/:id.

Next steps