API
Everything the site does, as HTTP: upload a clip, read and correct its transcript, set the look, render, download. JSON in and out, one key per account, the same credits as the site.
Sign in with your e-mail address and the key appears here. Keys are tied to the account and spend its credits.
Sign inAuthentication
Send the key as a bearer token on every request. Cookies are ignored under /api/v1.
curl https://videocaption.io/api/v1/account \ -H "Authorization: Bearer vc_live_…"
A missing or revoked key answers 401. Keep the key on your server; it can spend your credits.
The flow
- 01Upload a clip. Transcription starts by itself; the video goes
uploaded→transcribing→ready. - 02Read the words, fix the text if needed, trim the window.
- 03Set the look once per account, or check a still of any look on the real frame, free.
- 04Render: 5 credits per started 2 minutes of the trimmed clip (the video's
creditssays the exact number), taken when the render starts and returned if it fails on our side.queued→rendering→done. - 05Download within 48 hours; then the file is gone. The row itself is removed 7 days after the upload.
Videos
curl -X POST https://videocaption.io/api/v1/videos \ -H "Authorization: Bearer vc_live_…" \ -F file=@clip.mp4
MP4 or MOV, up to 20 minutes each, one file per request. Answers 201 with the video document.
curl https://videocaption.io/api/v1/videos -H "Authorization: Bearer vc_live_…" curl https://videocaption.io/api/v1/videos/vid_… -H "Authorization: Bearer vc_live_…"
Reading also brings the status up to date, so poll the video until it is ready, and after a render until it is done. Every few seconds is plenty.
The video document
{
"id": "vid_…", "filename": "clip.mp4", "status": "ready",
"seconds": 32.9, "width": 1080, "height": 1920, "size": 41234567,
"trimStart": 0, "trimEnd": null,
"wordCount": 70, "text": "Meet the new …",
"words": [{ "text": "Meet", "start": 0.21, "end": 0.48 }, …],
"previewReady": false, "error": null,
"credits": 5, "creditsCharged": 0, "expiresAt": null, "downloadUrl": null,
"subtitlesUnlocked": false, "subtitlesUrl": null,
"createdAt": "…", "updatedAt": "…"
} Statuses: uploaded, transcribing, ready, previewing, queued, rendering, done, failed. A failed video carries the reason in error and costs nothing.
curl -X PATCH https://videocaption.io/api/v1/videos/vid_… \
-H "Authorization: Bearer vc_live_…" -H "Content-Type: application/json" \
-d '{ "text": "Meet the new collection.", "trimStart": 1.5, "trimEnd": 20 }' Send any of the three. The corrected text keeps the old timings word for word when the count matches, and spreads them otherwise. trimEnd: null means the end of the clip.
curl -X POST https://videocaption.io/api/v1/videos/vid_…/render -H "Authorization: Bearer vc_live_…"
Uses the account's style and costs the video's credits. Answers 202 with the video, or 402 with needed and available when the credits are short. Rendering a finished video again costs the same again; a failed one is put back in line first.
curl -L -o captioned.mp4 https://videocaption.io/api/v1/videos/vid_…/download -H "Authorization: Bearer vc_live_…"
The MP4, with range requests. ?sample=1 gives the free twenty-second sample once previewReady is true; ask for one with POST …/sample.
curl -L -o clip.srt https://videocaption.io/api/v1/videos/vid_…/subtitles -H "Authorization: Bearer vc_live_…" curl -L -o clip.vtt "https://videocaption.io/api/v1/videos/vid_…/subtitles?format=vtt" -H "Authorization: Bearer vc_live_…"
The subtitle file of the trimmed clip, its cues grouped as the captions are. A finished render includes it; on its own it costs 5 credits, whatever the length: POST …/subtitles pays once, then subtitlesUnlocked is true and the GET answers. Before that the GET answers 402 with subtitles_locked.
curl -X DELETE https://videocaption.io/api/v1/videos/vid_… -H "Authorization: Bearer vc_live_…"
Style
One style per account, used by every render. Read it with GET /style, replace it with PUT /style:
curl -X PUT https://videocaption.io/api/v1/style \
-H "Authorization: Bearer vc_live_…" -H "Content-Type: application/json" \
-d '{ "style": "punch", "placement": "bottom", "size": "normal",
"highlight": true, "highlightColor": "#cde73f",
"highlightShape": "color", "mode": "line" }' curl -o still.jpg "https://videocaption.io/api/v1/videos/vid_…/still?style=mono&shape=underline&color=%235ec8ff" \ -H "Authorization: Bearer vc_live_…"
One frame of the clip with its caption drawn by the render itself, in the account's style or the one in the query (style, placement, size, highlight, color, shape, mode, case). Free, about a second. The headers X-Caption-At and X-Caption-Line say which second and which words.
Account
curl https://videocaption.io/api/v1/account -H "Authorization: Bearer vc_live_…"
Your e-mail, the balance, the pricing rule (creditStep per blockSeconds) and the current style. Credits are bought on the site; there is no endpoint for that.
Errors
Every failure is JSON: { "error": { "code": "…", "message": "…" } }.
Limits
Clips up to 20 minutes. Uploads count against the same allowances as the site. There is no fixed rate limit today; keep polling to every few seconds and batch what you can. The terms apply to the API as they do to the site.