Video to SFX

Generate SFX from video (sync)

Generate sound effects from a video clip. Provide a video object with either {type: "url", video_url} or {type: "asset", asset_id}. Blocks until complete. Use output to control whether the response contains audio-only files or the original video with SFX mixed in.

post/v2/video-to-sfx/v1.6/sync

Request

  • Base URL: https://api.mirelo.ai
  • URL: https://api.mirelo.ai/v2/video-to-sfx/v1.6/sync
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Stable key for one logical sync request, for retrying after an ambiguous response such as a transport timeout. Reuse it only with the identical body. While the original request is in progress, after it completed, or with a different body, the retry returns 409 idempotency_conflict instead of starting another billable request. A failed attempt may run again with the same key. A completed request's key is remembered for 24 to 48 hours after the original request completes, depending on when the daily sweep runs. A 409 retry does not extend this window; reusing the key after it is forgotten starts and bills a new request.

Request body

duration_msnumber required

Duration in milliseconds

start_offset_msnumber

Start offset into the video in milliseconds. Defaults to 0 (beginning of video).

promptstring

Optional text prompt. When provided, the video drives the timing while the prompt guides which sound to generate (video-synced style transfer). Omit for pure video-driven generation.

num_samplesinteger

Number of audio variants to generate

output'audio' | 'video'

Output format. "audio" (default) returns SFX audio files only. "video" returns the original video with the generated SFX mixed in.

seedinteger nullable

Seed for reproducible generation. Integer, minimum -1. Omit, or send -1 or null, for a randomly chosen seed. It does not guarantee identical audio because generation is not bit-deterministic across inference workers.

output_format'wav' | 'mp3' | 'aac' | 'flac'

Container for the generated audio. One of "wav" (default), "mp3", "aac", "flac". Omit for WAV, which is what every request returned before this parameter existed. Requests that need server-side post-processing — a tiled loop, a windowed extend or inpaint, a long video clip — are generated losslessly and encoded into this container once, at the end.

Example request

{
  "video": {
    "type": "url",
    "video_url": "https://example.com/clip.mp4"
  },
  "duration_ms": 10000,
  "num_samples": 1,
  "output": "audio"
}

Response

Generated output URLs. Audio files when output is "audio" (default); original video with SFX mixed in when output is "video".

modelstring nullable

Public release that produced this result. Null when unknown or when multiple releases contributed; not a runtime fingerprint or reproducibility guarantee.

result_urlsstring[] required

Array of URLs to the generated output files (audio, or video with SFX mixed in when output is "video"). Signed by the inference service at upload time and valid for one hour from then — not from when you read them. Prefer download_urls.

download_urlsstring[]

Short download links on mirelo.ai, index-aligned with result_urls when present. Each is a 302 to a URL signed at the moment you follow it, so the link stays valid for as long as the generation is retained instead of expiring on the job's clock. Short enough for clients that reject long URLs, and accepted anywhere this API takes an input URL. Repeated follows are expected and supported; a link followed hard enough to be throttled answers 429 with Retry-After rather than looking like a dead file. Optional — always fall back to result_urls. Every SFX endpoint emits it, extend and inpaint included; the music endpoints record no generation and so never carry one. Minting is best-effort on top of that, so even a response carrying generation_id may omit it.

generation_idstring

Server-side generation record id, present when the generation was persisted. Retain it to later reference the generation (e.g. attach feedback). Absent when persistence was skipped or failed — never blocks the result.

Changes

No recorded changes to this operation across all 1 revision of this API.