vidagent.net API reference: AI video agent REST endpoints
vidagent.net REST API: authenticate with a key, start an edit of your uploads with an ask, change the edit plan, and render the MP4 with captions and chapters.
Last updated: 2026-12-01
Anything the studio does, the API does too, billed and refunded the same way: send up your footage, open an edit with one ask, read the cut list and adjust it, then render. Requests and responses are JSON, served from https://vidagent.net over HTTPS only.
Authentication with an API key
Create a key at Settings → API keys and send it with every call:
Authorization: Bearer sk_…
Treat the key like your password: it acts as you and can spend your balance. Store it server-side, never in front-end code or a git history, and delete it from the same settings page the moment it is exposed. Requests without a working key are answered with 401.
Reply envelope
Responses share a single wrapper. code: 0 means it worked and data carries the result; a non-zero code means it did not, and message tells you why.
{ "code": 0, "message": "ok", "data": { … } }
The three requests that cost credits (/api/reels/projects, /api/reels/renders and /api/reels/batch) take an optional Idempotency-Key header. Send a retry with the same value and the first response comes back again, with no second charge.
1. Upload your videos
A project takes up to 5 videos, MP4 or MOV, each up to 30 minutes and 1,024 MB, 30 minutes in all. Links are not accepted, only the files. A file travels in chunks, in three steps:
- Open the upload: send
{"fileName","contentType","size"}toPOST /api/clips/upload/startand keep thesourceId,token,partSizeandpartCountit gives back. - Send each chunk: for chunk 1, 2, 3 and so on, ask
POST /api/clips/upload/partwith{"token","partNumber"}for a signedurlplusheaders, thenPUTexactlypartSizebytes there (the final chunk may be shorter) inside 15 minutes. Note theETagheader of eachPUTresponse. - Close it:
POST /api/clips/upload/completetakes{"sourceId","token","parts":[{"partNumber","etag"}]}. We probe the stored video, sample stills from start to end for the automated image-safety screen, and answer withid,fileName,kind,seconds,widthandheight. When the screen says no, or cannot decide, the video is removed at no charge.
To cancel half-way, send {"sourceId","token"} to POST /api/clips/upload/abort. GET /api/clips/sources returns the uploads that passed the screen. Every upload is erased a week after it lands.
2. Preview sheets
An upload is editable once its preview sheets exist. A sheet is a 1024×576 JPEG (600 KiB at most) with a 4×4 grid of frames taken 2 seconds apart; alongside the sheets goes a loudness reading per second, scaled 0 to 1. Every sheet is screened like the upload, so no stretch of the video escapes the check. The studio builds the sheets in the browser, sends them by presigned PUT (purpose sheet) and registers them:
POST /api/reels/sheets
{"sourceId":"…","keys":["first sheet key","second sheet key","…"],"loudness":[0.08,0.35,…]}
Because presigned sheet uploads need a browser session, most API users drop their files into the studio once (it uploads, screens and prepares them) and script everything after that. In GET /api/reels/projects, each upload carries a prepared flag; edits accept prepared uploads only.
3. Start an edit
curl -s https://vidagent.net/api/reels/projects \
-H "Authorization: Bearer $VIDAGENT_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: pour-over-take-3" \
-d '{"sourceIds":["…","…"],"rights":true,"instruction":"cut the retakes, keep it under 3 minutes","aspect":"vertical","music":"desk-lamp"}'
| Field | Meaning |
|---|---|
sourceIds | Required. 1 to 5 prepared uploads, in recording order. |
rights | Required, true: the footage is yours or you hold permission for it, from everyone who appears in it as well. |
instruction | What the edit should do, in plain words. Default: cut retakes, filler words and long pauses. Screened by the text check. |
title | Optional title (and title card), screened by the text check. |
aspect | vertical (9:16), landscape (16:9) or square (1:1). |
music | none, desk-lamp, morning-pages, tape-hiss, quick-cut or long-take: an original bed, ducked under the voice. |
captions | false to leave captions off the picture (the SRT file comes either way). |
locale | The language being spoken (en, zh and so on), if you want to tell the transcriber up front. |
The edit pass costs 20 credits per project plus 23 credits per started minute of footage, each file rounded up, minimum 1 minute. It includes the transcript, the agent's plan, 3 chat messages and the first render. It is charged when it starts, and an edit with no speech in it is refunded.
Check GET /api/reels/projects/$PROJECT_ID about twice a minute. phase goes from analyzing (with progress from 0 to 1) through planning to ready or failed. When it is ready:
plan.sentences[]is every spoken line withid,sourceId,start,end,text,keepand, for a cut line,reason(retake,brieforuser), pluscropfor narrow shapes;plan.chapters[]andplan.inserts[]hold chapters and cutaways from your other files, if the ask wanted them;editSecondsis the length of the edit,tightenedwhat tightening takes out,chat[]the conversation,turnsLeftthe chat messages left today andrenderCreditswhat the next render costs (0for the included one).
GET /api/reels/projects returns your studio state: plan entitlements, batch access, balance, uploads (with prepared), projects and renders. DELETE /api/reels/projects/$PROJECT_ID removes a finished project and its working files.
4. Change the plan
POST /api/reels/projects/$PROJECT_ID/chatwith{"message":"add chapters and drop the intro"}asks the agent; it rewrites the plan and answers inchat[]. After the 3 included chat messages on a project, each message costs 4 credits plus 1 credit per started 8 minutes of the project's footage. So a message costs 5 credits up to 8 minutes of footage, 6 up to 16, 7 up to 24 and 8 up to 30. The next message's price shows before you send it. The credits are taken before the agent answers and refunded if it cannot answer. Up to 20 chat messages a day per project; checklist edits are free. The project'schatCreditssays what the next message costs.PUT /api/reels/projects/$PROJECT_IDwith{"plan":{…}}saves your own edit: send the plan back with lines'keepandcropchanged, or with anotheraspect,music,captions,tightenortitle. Chapters and cutaways can be renamed or dropped this way, not added; ask the agent for new ones. Send the whole plan: a chapter or cutaway left out is removed.
Neither call costs credits.
5. Render
curl -s https://vidagent.net/api/reels/renders \
-H "Authorization: Bearer $VIDAGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId":"…"}'
The saved plan is rendered at 720p, up to 10 minutes. The first render of a project is included in the edit pass. After a change: a re-render costs 17 credits per started minute of changed lines plus 12 credits per started minute of the finished edit, with no minimum. Unchanged lines are reused, and a failed render is refunded.
Follow GET /api/reels/renders/$RENDER_ID until status is success or failed; along the way phase reads cutting, then joining, finishing and checking. When it succeeds, output is the MP4 URL, srt the captions file and chapters the 0:00 chapter list. Every edit passes the output check before it is shown; a render that fails or is refused is refunded in full. List every render of a project with GET /api/reels/renders?projectId=…; DELETE /api/reels/renders/$RENDER_ID deletes a render and its MP4.
6. Batch desk (Cutting Desk plan)
POST /api/reels/batch
{"rights":true,"instruction":"cut the retakes","aspect":"vertical","music":"none",
"items":[{"sourceIds":["…"],"title":"Episode 1"},{"sourceIds":["…","…"],"title":"Episode 2"}]}
Up to 20 items, each edited with the same ask, shape and music and rendered once (the included render). Each item is charged and refunded on its own. You get back {batchId, items}: per item, a project when it started, or an error with its status when it did not. Without an active Cutting Desk plan the call answers 403 with pro_required.
Errors and limits
| Status | Meaning |
|---|---|
400 | A field is absent or malformed; message names it. |
401 | Missing, unknown or revoked API key. |
402 | Not enough credits. Nothing was charged. |
403 | pro_required: the batch desk needs the Cutting Desk plan. |
404 | That upload, project or render is not on this account. |
422 | The safety screen turned down a video, a sheet or your text. |
429 | Too many calls, the day's chat messages are used, or every running-job slot is busy. Retry later. |
Concurrency: a free account runs one job at a time; any purchase, plan or pack, raises that to three.
MCP instead of HTTP
Would rather drive edits from a chat assistant? Point Claude, ChatGPT, Cursor or VS Code at the MCP server; it exposes these steps as tools and accepts the same API key.