Skip to main content
Four generators — images, videos, sound effects and music — a catalogue, and — further down — stock, a free search over a licensed photo library, clips, the video-clipping job, audio, transcription, speech and speech-to-speech, and skills, a skill built from short videos. An image, sound effect or song renders in one call and comes back as files; a video is a media job you read back until it finishes. The catalogue belongs to the provider and changes without a release of ours, so it is a search, not a constant.

images.generate

POST /v1/media/images, synchronous. Every output is a file:
model left out picks the platform’s default image model — with image_urls, the first that takes an image input; with character, one that pins it. image_urls edits or restyles images — stored fil_ ids or public URLs — instead of rendering from nothing. character renders as a trained character and is not combined with image_urls. aspect_ratio that is not W:H, or wider than 8:1 / 1:8, is refused with validation_failed on aspect_ratio before anything renders or is billed. n is 1–4, default 1; when some fail, the ones that rendered are still returned and billed. The client sends the required Idempotency-Key for you.

videos.generate

POST /v1/media/videos — answers at once with the job in queued. model is optional: omitted, it is the first of the platform’s video defaults — the standard video model, black-forest-labs/flux-3-max, minimax/hailuo-3, bytedance/seedance-2.5, then alibaba/wan-3.0/text-to-video — that this deploy’s catalogue publishes. Not every deploy publishes the first, so check listModels({ kind: "video" }) before pinning one; the job’s model names the one that ran. image_urls is one first frame — a stored still’s fil_ id (one rendered as a character, say) or a public URL. seconds is 1–60.

meshes.create

POST /v1/media/meshes — a 3D model, answered at once with the job (kind: "mesh") in queued. Read it back with get; a completed job’s result.files[0] is a GLB (model/gltf-binary). Priced for the options used, at completion; a failed job is free.

soundEffects.generate

POST /v1/media/sound-effects, synchronous — a text prompt to a short generated clip, saved as a file:
Turns a description into an effect (ambience, foley, a sting), so it takes no voice and no model. loop makes the clip loop seamlessly for backgrounds. The client sends the required Idempotency-Key for you.

music.generate

POST /v1/media/music, synchronous — a text prompt to an original song, saved as a file:
Turns a description into a song (any genre, mood or instrumentation), so it takes no voice and no model. instrumental forces a track with no vocals. The client sends the required Idempotency-Key for you.

get

GET /v1/media/{id}. Any med_ of yours, a clipping job’s included. Poll until status is completed or failed; a completed video job’s result.files[].file_id is the rendered video, a completed clipping job’s result.clips are its clips (see clips.get).

list

GET /v1/media, newest first. session_id narrows to what one session’s agent submitted; API-submitted jobs carry session_id: null. kind: "clip" answers the same jobs as clips.list — clipping jobs submitted through the API — so with session_id it answers none.

listModels

GET /v1/media/models. kind is required: each is its own capability with its own catalogue. stt, tts and s2s are the audio models — the managed alias for the direction first, then pinned models. Each entry:
string
The model id you pass as model above, or to generate_image / generate_video, or pin on an agent as tools.configs.<tool>.config.models.
string
The model’s display name.
"image" | "video" | "stt" | "tts" | "s2s"
Which capability it serves.
string
What the model is good at.
No price is on the object. A generation is billed what it actually cost, once it has finished — see Pricing.
GET /v1/media/stock. Not a cursor page: the library pages by number, and count is the whole page. Each StockPhoto:
string
The library’s own id. Opaque, unprefixed, not a Naive Managed Agents resource.
number
Pixel width of the original.
number
Pixel height of the original.
string
A direct image URL at the requested size.
string
A small thumbnail.
string | null
A one-line description of the photo.
string | null
Who took it — show this credit wherever the photo is used.
string | null
The page to link the credit to.
string | null
The average colour as a hex value.
string
A neutral name to save the photo under, stock-<id>.<ext>. Absent only from an API older than this field.
A result is a URL, not a file; to hold the bytes as a fil_, import url through client.files under file_name, with the credit in description so it travels with the file:
The search is free and is booked as a search line at 0 credits. A deploy with no stock photo library configured rejects with feature_not_configured.

edits.create

POST /v1/media/edits. Submits a Mira edit and returns it queued. video is a fil_ id, a public http(s) URL of a video file, or a public post or video link from Instagram, YouTube, X, Vimeo or Facebook, which the platform downloads (one that cannot be fetched fails bad_source and costs nothing). A TikTok link is validation_failed before anything is held: TikTok blocks automated downloads, so upload the video as a file, prompt is what to change, and references is up to four pictures. A fil_ video that is not a video, or a fil_ reference that is not an image, is validation_failed before anything is held. mode picks the kind of edit: edit (the default; left out means the same) is the regular editor, and scene, outfit_or_object, person_swap or recast narrow it; motion_transfer copies the clip’s exact motion onto the characters in 1–3 fil_ image references and keeps the place. An Idempotency-Key is sent for you. Read the job with client.media.edits.get(id) (GET /v1/media/edits/{id}) until status is completed; result.file_id is the edit, and rendered_as says how it was made (motion_transfer or edit). The job answers mode: null for the default edit. client.media.edits.cancel(id) (POST /v1/media/edits/{id}/cancel) stops it at 0 credits while cancellable is true, that is before its render starts; after that it is 409 state_conflict, and the edit runs on and is charged only if it comes out right.
A motion transfer works best on 5–15 s clips of fights, dances and stunts. With 2–3 photos, start the prompt with one <CharacterN> tag per photo, in order, naming who in the clip it replaces, then a new line. person_swap, recast and motion_transfer without a reference, or with a URL reference, reject with validation_failed on references. A clip under 5 s, more than 3 photos, or a motion transfer that fails is made by the regular editor instead, so the job still completes, with rendered_as: "edit". It costs 50 credits a second (750 credits for 15 s), or the regular editor’s price when it falls back — see pricing.

clips.create

POST /v1/media/clips. Submits a clipping job and returns it queued; the whole video is read and its best moments arrive as files when it completes — see how clips are picked and framed. ClipCreate is the request body: video_url (public http(s) only), and optional aspect_ratio (9:16 framed per shot, the default, or 16:9 kept as shot), remove_silence, caption_preset (none | clean | bold | karaoke; defaults to none, no captions), language, min_seconds, max_seconds, title. An Idempotency-Key is sent for you, so a retry replays rather than re-queues.

clips.get

GET /v1/media/clips/{id}. The job as it stands; once status is completed, result.clips holds each clip’s file_id, title, start_seconds / end_seconds (the source window it was cut from, lead-in included), duration_seconds (the finished length, shorter with remove_silence), virality scores and ready-to-post copy (hook, hook_text, tiktok_caption, instagram_caption, youtube_title, each string | null), and cost_micro_usd is what it cost. A failed job’s error.code says whether to retry: the source_* codes fail again on the same link (codes).
To poll until it finishes, use clips.wait; to be told instead, subscribe a webhook to media.job.completed / media.job.failed.

clips.wait

Reads GET /v1/media/clips/{id} every intervalMs (default 5 s) until the job is completed or failed, and answers it. Past timeoutMs (default 65 minutes, longer than the 60 minutes a job may queue and run) it answers the job as it stands, still queued or processing, rather than throwing — check status.

clips.list

GET /v1/media/clips. Newest first. Only jobs submitted through the API are listed; what an agent’s clip_video tool cuts inside a session lands in that session as files.

audio.transcribe

POST /v1/media/audio/transcriptions. Answers a media_job of kind: "transcription" — usually already completed, with result.text filled in; a long recording the provider queues comes back processing, to be re-read with audio.get. result.segments, language and duration_seconds are filled only by a model that reports them; the default model returns the text alone (empty segments, null language and duration).

audio.get

GET /v1/media/audio/transcriptions/{id} — the same job, re-read.

audio.speak

POST /v1/media/audio/speech. model omitted is the default speech model — the first row of listModels({ kind: "tts" }), openai/gpt-audio-mini in the voice alloy. The catalogue’s models answer WAV whatever format asks; speech.file.content_type says what you got. Synchronous; the reply’s file is the stored file, so the bytes are one client.files.downloadBytes(speech.file.id) away.

audio.converse

POST /v1/media/audio/conversations. Synchronous, and the same SpeechGeneration as speak: the spoken reply to the turn in file_id, stored as a file. The input is a stored file — client.files.upload or client.files.import a recording first.

skills

Media skill builds: create (POST /v1/media/skills) studies 1–3 public short-video links (urls) and writes an organization skill that captures their format; revise sends the same route a build_id and your feedback and runs the next round. Both send the required Idempotency-Key for you, need a live key and a balance above zero, and answer the build in building. get (GET /v1/media/skills/{id}) moves the build forward as it reads it, so poll it until state is ready; skill is then { id, slug, version }, the saved skill. list (GET /v1/media/skills) is newest first and does not move builds. A revision while a round runs is version_conflict.