Back to home

API reference

The Auto Captions REST API: authenticate with a key, add a video, start a caption job, fix words, re-render and download SRT or VTT subtitles.

Last updated: 2026-11-25

Everything the Auto Captions studio does is also available over HTTPS. A job started by the API costs the same credits, follows the same limits and gets the same automatic refund on failure. The base address is https://autocaptions.net.

Getting a key

Make a key at Settings → API keys. It starts with sk_ and is shown only once. Send it with every request:

Authorization: Bearer sk_…

A key can spend your credits, so keep it on your server and out of public repositories. Revoke it on the same page if it leaks.

The envelope

Successful JSON answers look like this, with the result in data:

{ "code": 0, "message": "ok", "data": { … } }

On an error, the HTTP status tells you what happened (see Errors) and message explains it.

Typical flow

  1. Add a video and keep its id.
  2. Start a job with that id as sourceId.
  3. Poll the job until phase is done, then download the MP4 and subtitles.
  4. Optionally fetch the words, fix some and re-render.

POST /api/captions/sources

curl -s https://autocaptions.net/api/captions/sources \
  -H "Authorization: Bearer $AUTO CAPTIONS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/episode-12.mp4","fileName":"episode-12.mp4"}'
FieldNotes
urlRequired. A public https link straight to an MP4 or MOV file.
fileNameOptional. The name shown in your history.

The file is copied into storage and measured. The answer holds id, fileName, seconds, width and height. Videos longer than 10 minutes are refused. GET /api/captions/sources lists the videos you have added.

Upload a file in parts

For a file on disk, the browser studio uses a multipart upload, and you can too:

  • POST /api/captions/upload/start with {"fileName","contentType","size"}. Returns sourceId, token, partSize and partCount.
  • PUT /api/captions/upload/part?n=N for each part, numbered from 1, with the raw bytes as the body and the token in an X-Upload-Token header. Each answer gives the part's partNumber and etag.
  • POST /api/captions/upload/complete with {"sourceId","token","parts":[{"partNumber","etag"}]}. Returns the measured video, like the link call.
  • POST /api/captions/upload/abort with {"sourceId","token"} gives up an unfinished upload. Calling it twice is harmless.

Start a caption job

POST /api/captions/jobs

curl -s https://autocaptions.net/api/captions/jobs \
  -H "Authorization: Bearer $AUTO CAPTIONS_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: episode-12-first" \
  -d '{"sourceId":"…","look":{"style":"karaoke","position":"lower","size":"m"}}'
FieldValues
sourceIdRequired. The id of an added video.
look.stylepop (Bold Pop), karaoke, clean (Clean Bar), keyword, rounded or headline. Default pop.
look.positionlower, middle or top. Default lower.
look.sizes, m or l. Default m.

look can be left out entirely to use the defaults. The job is charged when it starts: 2 credits per second of video plus 6 credits per video. A repeated Idempotency-Key gives back the original job and charges nothing more.

The answer is a job object:

FieldMeaning
idThe job id.
statusThe raw job state, pending, processing, success or failed.
phaseaudio, transcribe, render, then done or failed.
creditsCredits charged.
refundedCredits returned; all of them when the job failed.
outputLink to the captioned MP4, once it is ready.
hasTranscripttrue when the words can be edited and subtitles downloaded.
errorA short code such as no_speech when the job failed.

Check on jobs

  • GET /api/captions/jobs/{id} returns one job. Poll it every 10 to 20 seconds until phase is done or failed.
  • GET /api/captions/jobs returns your balance, your added videos and your recent jobs.

The output link serves the finished MP4 at up to 720p.

Download subtitles

GET /api/captions/jobs/{id}/subtitles?format=srt or ?format=vtt returns the transcript as a subtitle file, ready to save. Without format, you get SRT.

Fix words and re-render

GET /api/captions/jobs/{id}/words returns {"words":[{"text","start","end"}]}, with times in seconds.

POST /api/captions/jobs/{id}/restyle re-renders a finished job without transcribing again:

curl -s https://autocaptions.net/api/captions/jobs/$JOB_ID/restyle \
  -H "Authorization: Bearer $AUTO CAPTIONS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"look":{"style":"headline","position":"top","size":"l"},"words":["Welcome","back","to","the","show", "…"]}'
  • look (optional) works like it does on a new job.
  • words (optional) is an array of strings with exactly as many entries as the job has words, in the same order. Each entry replaces the word at its position. An empty string "" drops that word. Each word can be up to 40 characters.

The answer is a new job, charged like the first run. Typed words are screened by an automated safety check before rendering; text it rejects gets a 422 and nothing is charged.

Delete a job

DELETE /api/captions/jobs/{id} removes a finished job and its stored files. A job that is still running answers 409; wait for it to finish first.

Errors

StatusWhen
401No key, or the key is unknown or revoked.
402Not enough credits. Top up on the pricing page.
403A team member reached the spending limit the team set.
404The video or job doesn't exist, or isn't yours.
409The job is still running, or has no words yet.
410The job's stored words have expired.
413The file is larger than allowed.
422The request was refused, for example typed words that failed the safety check.
429Too many requests, or too many jobs at once (one on a free account, three on a plan). Wait and retry.

MCP server

AI assistants that speak the Model Context Protocol can connect to https://autocaptions.net/mcp and work with your account, signing in with OAuth or an API key. They spend the same credits as the API.

Retention

Added videos are deleted 30 days after upload. Finished videos and transcripts are deleted 30 days after the job. Download what you need to keep.