API reference · v0.2

A transcript API that returns structure, not a wall of text

One POST. Back comes timestamped segments, chapter boundaries, a summary and keywords — as JSON, or as a CSV that opens straight in Excel. No proxy to configure, no Whisper weights to download.

The hosted endpoint is in early access. Everything below is the shipped contract, but data-centre IPs are currently blocked by YouTube, so the public /v1 routes only run on machines with a residential egress. Request access at hi@vidtext.app and we run your links on the runner. Self-hosting is also supported — see why not DIY for what you'd be rebuilding.

Quickstart

Three calls. The first gives you a free key — 60 minutes a month, no card. Keep it in an env var, not in your source tree.

1 · get a key
# same email returns the same key — safe to retry
curl -s https://vidtext.kodevex.devhttps://vidtext.kodevex.dev/v1/keys \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com"}'
2 · transcribe one link
curl -s https://vidtext.kodevex.devhttps://vidtext.kodevex.dev/v1/transcribe \
  -H "Authorization: Bearer $VIDTEXT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "features": ["transcript", "chapters", "summary", "keywords"],
    "lang": "en"
  }'
3 · or get a spreadsheet
# one row per segment, Excel-ready (UTF-8 BOM, so CJK doesn't turn to mush)
curl -s "https://vidtext.kodevex.devhttps://vidtext.kodevex.dev/v1/transcribe?format=csv" \
  -H "Authorization: Bearer $VIDTEXT_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw"}' \
  -o transcript.csv

Leave features at its default and you only pay for the transcript — captions come back in about a second. Chapters, summary and keywords cost one extra model call, so they're opt-in rather than quietly bundled.

Request

POST /v1/transcribe — the only endpoint you need for the happy path.

FieldTypeNotes
urlstring Required. Must start with http. YouTube (incl. Shorts), Bilibili (BV/av, multi-part), Douyin, TikTok, X, Instagram, Vimeo and podcast feeds.
featuresstring[] Any of transcript, chapters, summary, keywords. Defaults to ["transcript"]. Unknown values are dropped, not rejected.
langstring Preferred caption language, or auto. Also picks the CSV header language.
webhookstring? Accepted on batch jobs. Single-link calls return synchronously, so it goes unused.

Headers: Authorization: Bearer <key>, Content-Type: application/json.

Response

This is a real, unedited body — the first video ever uploaded to YouTube, four features on. Segments and chapters are trimmed here for readability; the live call returns all of them.

200 · application/json
{
  "source": {
    "platform": "youtube",
    "video_id": "jNQXAC9IVRw",
    "title": "Me at the zoo",
    "duration_seconds": 19,
    "author": "jawed"
  },
  "transcript": {
    "language": "en",
    "source": "caption",
    "confidence": 0.95,
    "segments": [
      { "start": 1.2, "end": 3.36,
        "text": "All right, so here we are, in front of the elephants",
        "speaker": null },
      { "start": 5.32, "end": 7.97,
        "text": "the cool thing about these guys is that they have really...",
        "speaker": null }
    ],
    "text": "All right, so here we are, in front of the elephants ..."
  },
  "chapters": [
    { "start": 1, "title": "Introduction to the Elephants",
      "summary": "The speaker introduces the scene while standing in front of elephants." }
  ],
  "summary": {
    "one_line": "A brief narration highlights elephants' very long trunks...",
    "paragraph": "The transcript is a short, informal commentary filmed...",
    "bullets": ["The speaker introduces elephants in front of the camera."]
  },
  "keywords": ["elephants", "trunks", "long trunks"],
  "quality": {
    "transcript": "caption",
    "chapters": "llm",
    "summary": "llm",
    "keywords": "llm"
  },
  "usage": { "audio_minutes": 0.32, "minutes_used": 0.32, "minutes_limit": 60 },
  "id": "tr_9f3c1a72bundle"
}

Why quality is in the payload

quality.transcript is either caption (platform captions — fast and near-free) or whisper (speech recognition fallback). chapters, summary and keywords say llm when a model produced them and rule when a deterministic fallback did. A rule-written chapter set reads differently from a model-written one, and you should be able to tell which you got without guessing. No field claims more than it can back up.

CSV export

Add ?format=csv to the same endpoint. You get one row per segment: title, URL, start second, HH:MM:SS, text. The file starts with a UTF-8 BOM, so double-clicking it in Excel doesn't mangle Chinese or accented headers.

transcript.csv
Title,URL,Start (s),Time,Text
Me at the zoo,https://www.youtube.com/watch?v=jNQXAC9IVRw,1.20,00:00:01,"All right, so here we are, in front of the elephants"
Me at the zoo,https://www.youtube.com/watch?v=jNQXAC9IVRw,5.32,00:00:05,"the cool thing about these guys is that they have really..."

Pass "lang": "zh" and the header switches to 标题、链接、起始秒、时间、文本. For a whole playlist or a competitor channel, the console takes a pasted list and gives you one merged file.

Error codes

Every error is {"code", "message"}, and some carry a retryable flag so your retry loop doesn't have to pattern-match on English prose.

StatuscodeMeansRetry
401unauthorizedNo Authorization: Bearer header.no
401invalid_keyKey unknown or revoked. hint points at /v1/keys.no
402quota_exceededMonthly minutes used up. Body carries used_minutes, limit_minutes, upgrade_url.no
413too_longVideo exceeds the per-call duration cap (30 min on the hosted runner; higher when self-hosted).no
422login_requiredThe platform wants a signed-in session — in practice, a data-centre IP was blocked.yes
422private_or_removedLink is private, deleted or region-locked.no
422unsupported_platformHost isn't in the supported list.no
429too_many_signupsThis IP opened its hourly quota of keys. retry_after is in seconds.yes
429signup_pausedDaily signup cap hit; email us and we open it by hand.no
503rate_limitedUpstream platform is throttling. Usually clears in seconds.yes
503networkTransient fetch failure.yes
504timeoutDidn't finish inside the function budget. Retry, or send long videos to the runner.yes

Batch semantics: on multi-link jobs each item is independent. One failure costs you that row only, with the reason in plain language, and retryable errors are retried once automatically. You never lose 99 good rows to one dead video.

Pricing

Billed per minute of audio, not per file. A 30-second Short and a two-hour podcast differ in cost by 240× — charging per file would make the Short a terrible deal for you.

PlanPriceMinutes / moEffective
Free$060no card, one concurrent job
Starter$191,000≈ $0.019 / min · batches of 200
Pro$795,000≈ $0.016 / min · webhooks, 10 concurrent

So a 10-minute interview costs about $0.19 on Starter, and a 100-link playlist of 8-minute videos about $15. Check where you stand at any time with GET /v1/usage — it returns minutes_used, minutes_remaining and the request count for the current month.

vs. yt-dlp + Whisper

The honest version: if you need a handful of transcripts once, run yt-dlp --write-auto-sub yourself and keep the $19. The build only starts to hurt when you need it to keep working.

  • Captions aren't always there. Maybe 10–20% of videos have none, so you need an ASR fallback, which means model weights, a GPU or a long wait, and a queue.
  • Anti-bot changes monthly. The Sign in to confirm you're not a bot wall arrives without notice and breaks every pipeline at once; keeping up is a standing cost, not a one-time setup.
  • You still have to shape the output. Raw VTT is not something a content team can paste into a spreadsheet — segmenting, chaptering and CSV export are the actual work.

If you'd rather own that, self-hosting is supported: the same code runs locally with SQLite and a process-local queue. This page documents the hosted shape because that's what most people ask for.

FAQ

Is there a free tier I can test with?

Yes — 60 minutes a month, no card, one concurrent job. That's enough to run a few real videos and judge the output yourself, which is the only review that matters.

Do you store the video or audio?

No. We read publicly accessible text and metadata, and store the resulting transcript against your key. Audio and video are never persisted, hosted or redistributed.

What happens when captions are missing?

We fall back to Whisper large-v3. It's slower and costs the same minutes, but you get a transcript instead of an empty result — and quality.transcript tells you which path ran.

Can I get the timestamps in SRT or VTT?

The JSON already carries start and end per segment, so SRT is a short format string away. CSV is built in because spreadsheets are what content teams actually ask for. If you need SRT as a first-class export, say so by email — it's the most requested addition.

Can I use this for someone else's video?

For research, quoting, accessibility and internal analysis, generally yes. Republishing someone's content wholesale is a rights problem regardless of how the text was produced. We only touch public material; what you do with the output is between you and the rights holder.

Get a key, run three links

60 minutes free. No card, no sales call.

Open the console