2026-10-22 · 5 min read
How to Add Captions to YouTube Shorts with an API
Most Shorts are watched with the sound off at least part of the time, and YouTube's own auto-captions are easy for viewers to miss. Burned-in captions ride inside the video itself, so they show up in every feed, embed, and reupload. This guide adds word-timed captions to a Short with the caption.sh API: one POST to create a job, a poll loop for status, and a download of the finished MP4.
The workflow
caption.sh is an async job API. You create a job by uploading a file or pointing at a public URL, the API transcribes the audio and renders the captions into the video, and you download the result. If your Short is already on a public URL, the whole thing is one call and a poll.
curl -X POST https://api.caption.sh/v1/videos \
-H "Authorization: Bearer $CAPTION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_url": "https://cdn.example.com/my-short.mp4",
"options": {
"size": "large",
"position": "center",
"max_words": 3
}
}'
# -> 202 { "job_id": "..." }Poll until done
A source_url job moves from queued to running to done. Poll the job endpoint every few seconds, then fetch the result, which redirects to a signed download URL.
JOB_ID=<from the create call>
while true; do
STATUS=$(curl -s https://api.caption.sh/v1/jobs/$JOB_ID \
-H "Authorization: Bearer $CAPTION_API_KEY" | jq -r .status)
[ "$STATUS" = "done" ] && break
[ "$STATUS" = "error" ] && exit 1
sleep 5
done
curl -L https://api.caption.sh/v1/jobs/$JOB_ID/result \
-H "Authorization: Bearer $CAPTION_API_KEY" \
-o my-short-captioned.mp4Styling for the Shorts player
The Shorts player paints your channel name, the video title, and the action rail over the bottom and right side of the frame. Captions in the bottom third get covered. Two habits avoid most collisions:
- Use position center for punchy clips, or a fractional position like 0.3 to sit above the title zone without covering faces.
- Keep max_words low, one to three words per group, so the caption block stays compact and reads like karaoke.
- Pick a heavy font with the outline decoration (the defaults) so the text survives busy backgrounds at small sizes.
Every styling option is optional. The defaults produce a clean large centered caption with an outline, so the simplest call is enough for a first test.
Cost and batching
Pricing is $0.10 per minute of video, so a 45 second Short costs about $0.08. For a backlog of Shorts, loop over your URLs and create one job per video; jobs run independently and you can list them all with GET /v1/jobs.
If you also post to TikTok and Reels, the same captioned MP4 works everywhere. Burn the captions once, upload to every platform, and skip each app's built-in caption tool entirely.