Skip to content

mirelo-ai/sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Mirelo SDK

Official SDKs for the Mirelo API — generate sound effects from text or video using AI.

Get an API key at mirelo.ai.

Packages

Package Install Docs
Node.js / TypeScript npm install @mirelo/sdk node/
Python pip install mirelo-sdk python/

Quick start — Node.js

import { MireloClient, Video, MireloError } from "@mirelo/sdk";

const client = new MireloClient("sk-your-key");

// Generate sound effects from a video URL
const video = Video.fromUrl("https://example.com/clip.mp4");
const req = client.videoToSfx(video, { durationMs: 5000 });

try {
  const cost = await req.preflight();
  console.log(`${cost.credits} credits, ~${cost.estimatedMs}ms`);

  const job = await req.submitJob();
  const result = await job.wait();
  console.log(result.resultUrls);
} catch (e) {
  if (e instanceof MireloError) {
    console.error(`${e.code} (${e.httpStatus}): ${e.message}`);
  }
}

Quick start — Python

from mirelo import MireloClient, Video, MireloError

with MireloClient("sk-your-key") as client:
    video = Video.from_url("https://example.com/clip.mp4")
    req = client.video_to_sfx(video, duration_ms=5000)

    try:
        job = req.submit_job()
        result = job.wait()
        print(result.result_urls)
    except MireloError as e:
        print(f"{e.code} ({e.http_status}): {e.message}")

Features

  • Text to sound effects — describe a sound, get audio
  • Video to sound effects — generate sounds that match what's on screen
  • Sync and async (job-based) generation modes
  • Preflight check to estimate credits and time before generating
  • Retry logic with exponential backoff
  • Works in Node.js, browsers, Deno, Bun, and Adobe UXP (Node SDK)
  • Sync and async Python clients via httpx

Documentation

License

MIT — Mirelo AI GmbH

About

Official Mirelo API SDKs for Node.js and Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors