Developer documentation
Build a video editing workflow with the Anjin REST API or connect an agent through MCP.
Upload footage or provide a source URL. Anjin transcribes the recording and identifies each speaker.
Send a brief with the length and format you need. Anjin returns an edit plan with source timecodes you can review before rendering.
Choose an integration
Both routes use the same footage, edit plans and renders. Choose the one that fits your workflow.
From your application
Use REST to run edits from your backend. Create a source group, wait for it to become ready, then send a brief. Review the plan, request renders and collect the signed URLs. The quickstart walks through the four steps, and the API overview explains how the API fits into your application.
From an agent
Use MCP when an agent is doing the work. The server is mounted at https://anjin-media-api.fly.dev/mcp over streamable HTTP and exposes 55 tools covering the same workflow, with per-tool scope checks against the same bearer key. See MCP & agents for the tool list and the canonical agent loop, or the MCP overview for what an agent can do with it.
Base URL and authentication
Send REST requests to this host.
https://anjin-media-api.fly.dev
Authenticate with a bearer token. Keys are prefixed mk_live_ followed by 48 hexadecimal characters, and carry any combination of the read, write and admin scopes:
curl
curl -sS https://anjin-media-api.fly.dev/v1/source-groups \ -H "authorization: Bearer $ANJIN_API_KEY"
A key that does not resolve gets 401 invalid_api_key; a key that resolves but lacks the scope a route needs gets 403 insufficient_scope. Every authenticated response - success or failure - carries an x-ratelimit-remaining header. Read Authentication for scopes, key hygiene and the rate limits.
Errors are RFC 9457 problem documents with the content type application/problem+json. Each one carries a stable code you can switch on, and never a nested error object.
How jobs run
Nothing that costs time blocks. Ingest, planning and rendering all happen in workers, so the call that starts them returns immediately with a status you can track:
| Call | Status | What happens |
|---|---|---|
POST /v1/source-groups | 201 | Creates the group and returns a signed upload URL for every file you named with filename. A file given a source_url starts ingesting straight away. |
POST /v1/source-groups/:id/files/:fileId/complete | 202 | Confirms one upload. The group moves to ingesting and the transcode, transcription and diarization jobs are queued. |
POST /v1/cuts | 202 | Returns { "id": …, "status": "planning" } while the planner reads your transcripts and writes a cut plan. |
POST /v1/cuts/:id/revise | 202 | Sends a plain-language instruction and puts the cut back into planning for a new plan version. |
POST /v1/cuts/:id/renders | 202 | Queues one render per aspect you asked for and returns their ids immediately. |
Each of the three long-running objects has its own status enum, and a GET on the object tells you where it got to:
| Object | States | Progression |
|---|---|---|
source group | 5 states | uploading → ingesting → perceiving → ready, or failed. Only a ready group can be used in a cut. |
cut | 5 states | planning → planned → rendering → complete, or failed. A revision returns a cut to planning. |
render | 4 states | queued → processing → complete, or failed. One render row per aspect. |
Poll, or be told
Poll the relevant endpoint to check a job’s status. To receive updates automatically, register an HTTPS endpoint for these six events.
source.readysource.failedcut.plannedcut.failedrender.completedrender.failed
Deliveries are signed with an anjin-signature header and retried with backoff. Webhooks covers registration, verification and delivery behaviour.
Documentation guides
Where to go next, in reading order.
Get started
- Quickstart - Account to first rendered edit, fastest path.
- Authentication - API keys, environments, secret handling.
Working with media
- Uploading video - Uploads, source URLs, limits, persistent assets.
- Creating a composition - Prompt, source selection, duration, aspect, output.
- Composition results - Job states, output URLs, segments, transcript, provenance.
- Thumbnails - Output covers, brand styles, three-format autosave, approval and private downloads.
- Webhooks - Signed completion, failure and retry events.
- Working with an archive - Enterprise indexing, library queries, cross-video composition.
Agents & reference
- MCP & agents - Connection, tools, permissions, example agent prompts.
- Errors & limits - Status codes, rate limits, retries, idempotency.
- Security & data handling - Retention, training policy, data boundaries.
- API reference - Complete endpoint and schema reference.
The shape of the work is the same whichever path you take: brief, plan, review, render. Structural edits to a plan - PATCH /v1/cuts/:id/plan to remove, reorder, pin or unpin entries - run synchronously with no planner call and are free; a revision re-runs the planner for a new version; a render produces the finished file.
If you are still deciding whether this fits your work rather than how to wire it up, the API overview and the MCP overview make the case in fewer words, and pricing is where the commercial model lives.
