Back to home

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:

  1. Open the upload: send {"fileName","contentType","size"} to POST /api/clips/upload/start and keep the sourceId, token, partSize and partCount it gives back.
  2. Send each chunk: for chunk 1, 2, 3 and so on, ask POST /api/clips/upload/part with {"token","partNumber"} for a signed url plus headers, then PUT exactly partSize bytes there (the final chunk may be shorter) inside 15 minutes. Note the ETag header of each PUT response.
  3. Close it: POST /api/clips/upload/complete takes {"sourceId","token","parts":[{"partNumber","etag"}]}. We probe the stored video, sample stills from start to end for the automated image-safety screen, and answer with id, fileName, kind, seconds, width and height. 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"}'
FieldMeaning
sourceIdsRequired. 1 to 5 prepared uploads, in recording order.
rightsRequired, true: the footage is yours or you hold permission for it, from everyone who appears in it as well.
instructionWhat the edit should do, in plain words. Default: cut retakes, filler words and long pauses. Screened by the text check.
titleOptional title (and title card), screened by the text check.
aspectvertical (9:16), landscape (16:9) or square (1:1).
musicnone, desk-lamp, morning-pages, tape-hiss, quick-cut or long-take: an original bed, ducked under the voice.
captionsfalse to leave captions off the picture (the SRT file comes either way).
localeThe 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 with id, sourceId, start, end, text, keep and, for a cut line, reason (retake, brief or user), plus crop for narrow shapes;
  • plan.chapters[] and plan.inserts[] hold chapters and cutaways from your other files, if the ask wanted them;
  • editSeconds is the length of the edit, tightened what tightening takes out, chat[] the conversation, turnsLeft the chat messages left today and renderCredits what the next render costs (0 for 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/chat with {"message":"add chapters and drop the intro"} asks the agent; it rewrites the plan and answers in chat[]. 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's chatCredits says what the next message costs.
  • PUT /api/reels/projects/$PROJECT_ID with {"plan":{…}} saves your own edit: send the plan back with lines' keep and crop changed, or with another aspect, music, captions, tighten or title. 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

StatusMeaning
400A field is absent or malformed; message names it.
401Missing, unknown or revoked API key.
402Not enough credits. Nothing was charged.
403pro_required: the batch desk needs the Cutting Desk plan.
404That upload, project or render is not on this account.
422The safety screen turned down a video, a sheet or your text.
429Too 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.