ForHosting KIT · Audio & Voice

WebVTT captions

The HTML5 video tag was built expecting a specific caption format, and it isn't .srt — it's WebVTT. This endpoint transcribes an audio track and returns a .vtt file formatted to the web standard, ready to reference from a track tag without any conversion step in between.

● StablePer request + per minute$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

Why the web needed its own subtitle format

When browsers gained native video playback, they needed a caption format designed for the web rather than inherited from desktop subtitle rippers — one with a text-based structure, room for styling and positioning cues, and a spec maintained alongside HTML itself. WebVTT was built for exactly that role, and it's the format the track element expects by default when a page wants captions on an HTML5 video without a plugin or a third-party player.

What comes out of the endpoint

POST an audio file to /audio/subtitles-vtt and the task transcribes the speech, breaks it into readable caption lines at natural pauses, and writes the result as a valid WebVTT file — the WEBVTT header, correctly formatted timecodes, and cue text in the structure the spec requires. It's a file ready to sit next to a video and be linked directly, not raw text needing manual formatting.

Where WebVTT fits versus other formats

A native HTML5 video player reads a .vtt file directly through a track element with zero extra code; .srt still dominates in desktop editors and many upload workflows built around it. Because both formats describe the same underlying information — timed caption lines — most projects that need both simply generate an .srt for editing and delivery pipelines and a .vtt specifically for the web player, and this endpoint's sibling handles the .srt side.

How the captions get timed

Each caption line is timed against the actual audio track rather than split at arbitrary intervals, so text appears and clears in step with speech instead of lagging behind it or interrupting mid-sentence. Long recordings are chunked automatically during processing, with timing kept consistent across the seams so a caption near a chunk boundary still lands correctly in the final file.

Pricing and how failures are handled

The cost is a small base fee per request plus a per-minute rate scaled to audio length, the same transparent structure as plain transcription work. The task runs asynchronously — submit audio, receive a task_id right away, and get the .vtt file by signed webhook or a signed link valid for 24 hours; if generation fails it retries automatically up to three times and is never billed if it still doesn't complete.

Native HTML5 video captions

A publisher embeds a video tag with a track element pointing to the generated .vtt file, giving native captions with no external player library.

Web app video accessibility compliance

A SaaS product adds WebVTT captions to in-app tutorial videos to meet accessibility requirements for its embedded player.

Streaming platform caption pipeline

A video platform generates .vtt files automatically as part of its upload pipeline so every new video ships with captions by default.

Multilingual caption tracks

A course site generates a base .vtt track, translates the text, and offers multiple .vtt caption tracks on the same HTML5 video.

How do I generate a .vtt file from audio with this API?

POST an audio file to /audio/subtitles-vtt and the task returns a standards-compliant WebVTT file via webhook or a signed link, ready to reference from an HTML5 track element.

What's the difference between VTT and SRT here?

Both carry timed caption text, but WebVTT is the format HTML5 video natively expects; the sibling SRT subtitle endpoint produces the .srt version for editors and platforms that expect that format instead.

Is the WebVTT generator API free to use?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Does the output work directly with the HTML5 track tag?

Yes, the file follows the WebVTT spec exactly, so it can be referenced directly from a track element's src attribute with no reformatting.

Can I generate captions for many videos at once?

Yes, each audio file is submitted as its own asynchronous request, so a batch can be queued together and each .vtt file collected by webhook as it finishes.

How accurate is the caption timing?

Each caption line is timed against the actual audio and split at natural speech pauses, so text tracks what's being said rather than drifting or cutting mid-sentence.

What languages are supported?

The same broad language coverage as standard transcription applies, with automatic language detection or an explicit setting.

What happens if caption generation fails?

The task retries automatically up to three times before returning a clear error, and a failed request is never charged.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/audio/subtitles-vtt

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/audio/subtitles-vtt \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audio":"https://ejemplo.com/audio.mp3"}'
{
  "audio": "https://ejemplo.com/audio.mp3"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "audio.subtitles_vtt",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per minute$0.0055

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb200
max_minutes180
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →