Video

Render video from a prompt or reference images.

Generate a video

POST/api/v1/videos/generationsPer render

Send a prompt and get a finished video back. Add a start frame, reference images, or a reference clip to guide the render. The call waits until the video is done, up to five minutes.

Request body

modelstringrequiredA video model id from the media menu, or clawhunter/smart to let Smart Router pick.
promptstringrequiredThe scene to render.
image_urlstringOne start frame, as an https URL or a data URL. The model animates from it.
end_image_urlstringThe last frame, as an https URL or a data URL. It needs image_url, on models whose image_to_video lists end_frame.
middle_image_urlsstring[]Frames between the start and the last frame, in order, on models whose image_to_video lists middle_frames. Send up to that many. Not on clawhunter/smart.
input_imagesstring[]Two or more reference images to guide the render, on models with reference_to_video.
video_urlstringOne reference clip as an https URL, on models whose menu entry lists video_reference. It can run up to that entry's max_seconds, and where the entry lists fit, its size and frame rate must fall inside it. Not on clawhunter/smart.
duration_secondsnumberThe length, within the model's range on the menu. Some models take set lengths only. seconds works too.
resolutionstringThe resolution tier, on models that list one. Not on clawhunter/smart.480p · 720p · 1080p · 4k
aspect_ratiostringThe shape, on models that list aspect ratios. It doesn't change the price.
audiobooleanRender a soundtrack, on operations marked audio. Where the menu lists audio_off_price_multiplier, false lowers the price.
qualitystringOn clawhunter/smart only. Picks the routing tier. Defaults to medium.low · medium · high
savebooleanCalls with a key also save what they make to your My Media, under the API filter. Send false to skip that.

What you send picks the operation. A prompt alone runs text_to_video. One image runs image_to_video. Several images or a clip run reference_to_video.

Example request

const res = await fetch("https://mystudios.fun/api/v1/videos/generations", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.CLAWHUNTER_API_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    model: "clawhunter/smart",    prompt: "A paper boat drifting down a rainy street, tracking shot",  }),});const video = await res.json();

Response

The finished render with a billing block. Each result's urlis a path on mystudios.fun that needs no key. Download the video soon, since the link doesn't last. A call with a key also saves it to your My Media.

Response
{  "status": "succeeded",  "results": [    { "url": "/api/v1/media/artifacts/…/video.mp4" }  ],  "billing": {    "model": "minimax-h3-max-turbo",    "operation": "text_to_video",    "requested_model": "clawhunter/smart",    "jobs": 1,    "usd": 0.06,    "usage_usd": 0.06,    "quote_usd": 0.65,    "note": "routed to MiniMax H3 Max Turbo"  }}

Billing and limits

  • Billed per render at the model's price, listed on Models.
  • Price scales with length. Twice the model's default length costs twice as much.
  • A resolution tier scales the price by its multiplier on the menu.
  • The call reserves the list price for your settings. With credits, you pay what the render cost, never above list.
  • With x402, you pay that reserve as the price.
  • On clawhunter/smart, the routed model uses the settings it supports and drops the rest. You pay for what ran.
  • clawhunter/smart needs an API key.
  • A render that fails or times out is not charged. Neither is a rejected request.

Recast a character

POST/api/v1/videos/recastPer render

Put your character into a clip. Pick a preset or send your own clip, add one image per performer, and get the finished video back. A character headshot or sheet from Make a character works well.

Request body

presetstringA preset id from the Recast presets. Send this or video_url.
video_urlstringYour own clip, as an https link to an mp4, mov, or webm. Send this or preset.
image_urlsstring[]requiredOne image per performer, up to 4. For a preset, in its order. For your own clip, from the most prominent performer down.
directionstringExtra direction for the clip, up to 500 characters.
resolutionstringOne of the preset's resolutions. Defaults to the preset's own.

Example request

const headers = {  Authorization: `Bearer ${process.env.CLAWHUNTER_API_KEY}`,  "Content-Type": "application/json",};​const start = await fetch("https://mystudios.fun/api/v1/videos/recast", {  method: "POST",  headers,  body: JSON.stringify({    preset: "recast-mascot-dance-wan",    image_urls: ["https://example.com/my-character.png"],  }),});const { id } = await start.json();​let job;do {  await new Promise((r) => setTimeout(r, 15000));  job = await (await fetch(`https://mystudios.fun/api/v1/videos/recast/${id}`, { headers })).json();} while (job.status === "running");

Response

The start call answers right away with a job id. Poll GET /api/v1/videos/recast/{id} with the same key until status is succeeded or failed. video_url is the clip at full quality and preview_url a lighter copy for playing in a page. Both links expire, so download the clip soon.

Response
{  "id": "ff8ca540-3fe9-41f2-abb6-306da2e5e9c0",  "status": "succeeded",  "video_url": "https://…/recast.mp4.orig",  "preview_url": "https://…/recast.mp4",  "poster_url": "https://…/recast.poster.webp",  "media_id": "3c1d6f0a-8b2e-4f5a-9c7d-1e2f3a4b5c6d",  "charged_usd": 2.415}

Billing and limits

  • A preset bills at its price for the resolution. Your own clip bills by its length, at the own_clip rate on the presets list.
  • Both bill from prepaid credits. It needs an API key and takes no x402 payment.
  • Your clip is checked before anything is charged. A clip over the length limit uses its first part.
  • The price is held when the job starts. A job that fails is refunded.
  • A render usually takes a few minutes and can take longer.
  • The video link expires, so download it soon. The clip is also saved to your My Media.
  • Send an Idempotency-Key header with a preset so a retried start doesn't charge twice.

List Recast presets

GET/api/v1/videos/recast/presetsFree

Every Recast preset with its performers, length, and price at each resolution. Each has an example_video and example_imagefor your own picker. They're for display only, so send the id. The own_clip entry has the per-second price and length limit for recasting your own clip.