Skip to content
AXMDOCS

Get started

AXM API

Make videos from your code through one authenticated, asynchronous API.

AXM plans a video, writes every scene as code and renders the MP4. You send a prompt (or a web page), choose a model if you want one, then poll or get a webhook when it’s done. Every video stays editable: change one scene and only that scene renders again.

Get started

Quickstart

  1. Create a test key (free, rules only) and export it as AXM_API_KEY.
  2. Send one request. It returns at once with a video id.
  3. Poll GET /videos/:id until status is done, then download url.
curl https://mcp.axm.lol/v1/videos \
  -H "Authorization: Bearer $AXM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-0001" \
  -d '{"prompt": "A 30 second launch video for a budgeting app", "duration": 30, "model": "astron-6"}'

Get started

Authentication

Send a key as Authorization: Bearer axm_live_… to https://mcp.axm.lol/v1. Each key is shown once and stored only as a hash. Test keys (axm_test_) plan with rules, cost nothing and never export, so you can wire up a flow before spending credits.

Scopes
ScopeAllows
videos:createStart and cancel videos
videos:readRead videos and their jobs
projects:readRead projects, scenes, versions, quotes and exports
projects:writeCreate and edit projects and scenes, render previews, export
assets:writeUpload and delete images, video and audio
usage:readRead credit usage and request logs

Managing keys and webhooks needs a signed-in account; API keys can’t create other keys.

Get started

How the API works

  1. 01queuedAccepted and charged for writing.
  2. 02planningThe model storyboards and writes each scene.
  3. 03renderingScenes render; finals are assembled.
  4. 04doneThe MP4 is at url. Every scene stays editable.

A failed video gives its credits back. cancelled is the fifth end state, after POST /videos/:id/cancel.

Core concepts

Make a video

One request plans the video, renders every scene and assembles the MP4. Poll the video until its status is done:

{
  "id": "g_…",
  "object": "video",
  "status": "planning",        // queued · planning · rendering · done · failed · cancelled
  "stage": "storyboard",
  "project": "p_…",
  "mode": "studio",
  "model": "astron-6",         // null when AXM picked
  "credits": 15,
  "url": null,                 // the MP4 once status is "done"
  "error": null
}
Video fields
FieldWhat it does
promptWhat the video is about (up to 4,000 characters).
urlA public https page to turn into a video; its brand becomes a brand kit.
modelA model id from GET /models. Leave it out and AXM picks one for the mode.
modefast, studio (default) or cinematic. Without a model: 2, 5 or 10 credits to write.
duration6–120 seconds (default 30).
aspect16:9, 9:16, 1:1 or 4:5.
brand_kit, assetsA saved brand kit, and uploads or URLs to use.
narration, captionsA voice-over, and captions: normal, highlight, karaoke or social.
exportfalse stops at free previews.

Core concepts

Models and pricing

Pick who writes your video with model. The model plans, writes every scene and repairs it; nothing else is swapped in. A video costs, in credits:

ceil(seconds × model credits per second)   writing, when the video starts
+ ceil(seconds × 4)                        the final render, when you export

A 30-second video with Astron 6 is 15 + 120 = 135 credits, about $3.86 with Studio credits. The same video with Claude Opus 5.5 is 210 credits. Previews while you edit are free (10 a day, then 1 credit each). If the model can’t answer and the rules write the video instead, you pay the mode’s flat fee and get the rest back.

curl https://mcp.axm.lol/v1/models
# {"object": "list", "render_credits_per_second": 4, "data": [
#   {"id": "astron-6", "name": "Astron 6", "credits_per_second": 0.5,
#    "total_credits_per_second": 4.5, "usd_per_second": 0.1286, "available": true}, …]}
Models and their price per second
ModelidWritingTotal / sFrom
Astron 6.1astron-6.13 cr7 cr$0.200
Astron 6astron-60.5 cr4.5 cr$0.129
Astron 5astron-50.5 cr4.5 cr$0.129
Astron 1astron-10.25 cr4.25 cr$0.121
Zenith Flashzenith-flash0.5 cr4.5 cr$0.129
Claude Opus 5.5claude-opus-5.53 cr7 cr$0.200
Claude Opus 5claude-opus-53 cr7 cr$0.200
Claude Opus 4.8claude-opus-4.83 cr7 cr$0.200
Claude Opus 4.7claude-opus-4.73 cr7 cr$0.200
Claude Opus 4.6claude-opus-4.63 cr7 cr$0.200
Claude Mythos Previewclaude-mythos-preview3 cr7 cr$0.200
Claude Fable 5.1claude-fable-5.16 cr10 cr$0.286
Claude Fable 5claude-fable-56 cr10 cr$0.286
Claude Sonnet 5claude-sonnet-51.5 cr5.5 cr$0.157
GPT-5.6 Solgpt-5.6-sol3 cr7 cr$0.200
GPT-5.6 Terragpt-5.6-terra1.5 cr5.5 cr$0.157
GPT-5.6 Lunagpt-5.6-luna0.25 cr4.25 cr$0.121
GPT-5.5 Progpt-5.5-pro3 cr7 cr$0.200
GPT-5.5gpt-5.53 cr7 cr$0.200
Gemini 4 Argongemini-4-argon1.5 cr5.5 cr$0.157
Gemini 3.1 Progemini-3.1-pro1.5 cr5.5 cr$0.157
Gemini 3.7 Flashgemini-3.7-flash0.5 cr4.5 cr$0.129
Gemini 3.6 Flashgemini-3.6-flash1 cr5 cr$0.143
Gemma 2 2Bgemma-2-2b0.1 cr4.1 cr$0.117
Grok 4.6grok-4.61 cr5 cr$0.143
Grok 4.5grok-4.51 cr5 cr$0.143
Kimi K3kimi-k32 cr6 cr$0.171
Kimi K2.6kimi-k2.60.5 cr4.5 cr$0.129
DeepSeek V4 Pro Maxdeepseek-v4-pro-max0.75 cr4.75 cr$0.136
DeepSeek V4 Prodeepseek-v4-pro0.25 cr4.25 cr$0.121
DeepSeek V4 Flashdeepseek-v4-flash0.1 cr4.1 cr$0.117
Qwen 3.8 Maxqwen3.8-max0.75 cr4.75 cr$0.136
Qwen 3.7 Maxqwen3.7-max0.75 cr4.75 cr$0.136
Qwen 3.8 27Bqwen3.8-27b0.25 cr4.25 cr$0.121
Seed 2.1 Proseed-2.1-pro0.5 cr4.5 cr$0.129
Seed 2.1 Turboseed-2.1-turbo0.5 cr4.5 cr$0.129
Muse Spark 1.1muse-spark-1.10.75 cr4.75 cr$0.136

Core concepts

Edit one scene

Every video is a project of scenes. Change a scene with a sentence, patch ops or a whole spec; the scene gets a new version and only it renders again. Exporting reuses every other scene’s final as is.

curl -X PATCH https://mcp.axm.lol/v1/projects/p_…/scenes/s_4 \
  -H "Authorization: Bearer $AXM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"instruction": "make the headline shorter and use the brand green"}'

Core concepts

Idempotent requests

Send Idempotency-Key (8–128 letters, digits or . _ : -) on POST /videos, /projects and /exports. For 24 hours the same key and body replays the first response with Idempotent-Replayed: true, the same key with a different body is a 422, and a key whose first request is still running is a 409.

Core concepts

Webhooks

Add an HTTPS endpoint on the Webhooks page and pick events. We POST JSON with AXM-Event, AXM-Delivery and AXM-Signature: t=…,v1=…, an HMAC-SHA256 of {t}.{raw body} with the webhook’s secret. Reply with any 2xx within 10 seconds; failures retry with backoff and redirects aren’t followed. Rotating a secret shows the new one once; for the next 24 hours each delivery carries a second v1 signed with the old one, so accept a match on any v1.

video.queuedvideo.planningvideo.renderingvideo.completedvideo.failedproject.updatedexport.completedexport.failed

import { createHmac, timingSafeEqual } from "node:crypto";

// header: AXM-Signature: t=1761480000,v1=<hex>[,v1=<hex>]  (two v1 while a secret is being rotated)
export function verify(secret: string, header: string, rawBody: string): boolean {
  const t = /(?:^|,)t=(\d+)/.exec(header)?.[1];
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const want = Buffer.from(createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"));
  return [...header.matchAll(/v1=([a-f0-9]{64})/g)].some(([, v]) => {
    const got = Buffer.from(v);
    return want.length === got.length && timingSafeEqual(want, got);
  });
}

Core concepts

Errors and limits

Errors are {"error": {"code", "message"}}. Each key gets 120 requests and 10 video or export creations per minute, and an account’s keys together get twice that.

Status codes
StatusCodeMeaning
400invalid_requestThe body or a parameter is wrong, or the model id is unknown. The message says which.
401unauthenticatedMissing, revoked or unknown key.
402insufficient_creditsNot enough credits for this video or export.
403forbidden / test_modeThe key lacks a scope, or a test key tried to export or generate media.
404not_foundNo such resource for this account.
409idempotency_pending / cannot_cancelA request with the same key is still running, or the video already finished.
422idempotency_conflictThe Idempotency-Key was used with a different body.
429rate_limitedSlow down. Retry-After says how many seconds.
503model_unavailableThat model isn't live right now. Pick another, or leave model out.
5xxinternalOur side. Safe to retry GETs and requests with an Idempotency-Key.

Reference

Endpoints

Base URL https://mcp.axm.lol/v1.

Videos and models

Videos and models
RequestScopeWhat it does
POST/videosvideos:createPlan and render a video from a prompt or URL, optionally with a model. Returns 202 with a video to poll.
GET/videosvideos:readYour recent videos, newest first.
GET/videos/:idvideos:readStatus, stage, progress, model, credits and the final URL.
POST/videos/:id/cancelvideos:createStop a video that is still planning or rendering.
GET/modelsnoneEvery model with its price per second and whether it is live. No key needed.

Projects and scenes

Projects and scenes
RequestScopeWhat it does
POST/projectsprojects:writeCreate a project, optionally with scenes.
GET/projectsprojects:readYour projects.
GET/projects/:idprojects:readA project with its scenes and their render state.
PATCH/projects/:idprojects:writeRename, change brand kit or settings.
DELETE/projects/:idprojects:writeDelete a project and its renders.
POST/projects/:id/scenesprojects:writeAdd scenes.
PATCH/projects/:id/scenes/:sceneprojects:writeChange one scene by spec, patch ops or an instruction. Only that scene re-renders.
GET/projects/:id/scenes/:scene/versionsprojects:readEvery version of a scene.
POST/projects/:id/scenes/:scene/revertprojects:writeMake an earlier version current.
DELETE/projects/:id/scenes/:sceneprojects:writeRemove a scene.
POST/projects/:id/renderprojects:writeRender draft previews (free) for stale scenes.
GET/projects/:id/quoteprojects:readCredits an export would cost right now.
POST/projects/:id/exportsprojects:writeRender missing finals and assemble the video. Live keys only.
GET/exports/:idprojects:readExport status and the final URL.

Brand kits and assets

Brand kits and assets
RequestScopeWhat it does
GET/brand-kitsprojects:readSaved brand kits.
POST/brand-kitsprojects:writeSave a brand kit (colors, fonts, logo, voice).
DELETE/brand-kits/:idprojects:writeDelete a brand kit.
POST/assetsassets:writeUpload a file (raw body with its Content-Type). Returns asset:a_…
GET/assetsassets:writeYour uploads.
DELETE/assets/:idassets:writeDelete an upload that no render uses.

Usage

Usage
RequestScopeWhat it does
GET/usageusage:readBalance, free previews left today and 30-day totals.
GET/logsusage:readRecent requests made with your keys.

Reference

SDK

@axm/sdk wraps every endpoint, adds an Idempotency-Key to creates, retries 429s and 5xx safely and throws AXMError with the status and code.

import { AXM } from "@axm/sdk";

const axm = new AXM({ apiKey: process.env.AXM_API_KEY! });
const { data: models } = await axm.models.list();
const video = await axm.videos.create({ prompt: "Chart announcement: revenue up 42%", mode: "fast", model: "zenith-flash" });
const done = await axm.videos.wait(video.id);
console.log(done.url);