ScenariosBy Péter Nagy

YouTube transcripts for a RAG app at scale: credits, auto top-up and budgets

A developer ingests 10,000 YouTube videos into a RAG app. See the cost, the rate limit math, and how auto top-up and budgets keep the spend predictable.

Summarize a YouTube video now

Paste a link and get the key points with clickable timestamps.

If your RAG or AI app needs YouTube transcripts at scale, the practical setup is a pay-as-you-go transcript API with prepaid credits, an auto top-up so a long ingestion job never stalls, and a monthly budget so a bug cannot run up a bill. This walkthrough follows one developer through that setup with the sum.video Transcript API.

The situation

Maya builds a research assistant that answers questions about conference talks. Her index should cover about 10,000 YouTube videos from a few hundred channels, and then grow by roughly 300 new videos a month. She runs the ingestion from a small server, and she does not want to babysit it or be surprised by an invoice.

Her constraints are plain: predictable cost, no manual refills in the middle of a job, and clean handling of videos that have no transcript.

What she needs out of it

  • Plain text for each video, ready to chunk and embed.
  • Timestamps, so an answer can link to the exact moment in the video.
  • A cost she can estimate before she starts.
  • A hard ceiling on spend.

Summarize a YouTube video now

Paste a link and get the key points with clickable timestamps.

Step by step

1. Estimate the cost first

One transcript costs 2 credits, and requests that return no transcript cost nothing. For 10,000 videos that is at most 20,000 credits. With the 5,000 credit pack at $74.99 ($0.030 per transcript), 10,000 transcripts cost about $300 in total, and a bit less if some videos have no captions. The smaller packs cost more per transcript: $0.090 for 100 credits, $0.056 for 500, $0.038 for 2,000. The pricing page has the current details.

Credits are bought once and never expire, so there is no subscription clock running while she builds.

2. Test with the free credits

Her first API key comes with 10 free credits, which is 5 transcripts. She uses them to check the response for a few videos in json format (segments with offset and duration in seconds) and in text format. If you want the request details, the guide how to get a YouTube transcript with an API has working curl, Python and JavaScript examples.

3. Set auto top-up

In the API dashboard she turns on auto top-up. The rule: when the balance falls below a chosen level, the saved card is charged for another pack. The ingestion job keeps running overnight with no manual refill.

4. Set the budgets

Two limits protect her:

  • A monthly top-up budget, which caps how much auto top-up can spend in a month.
  • A monthly credit limit. When it is reached, further requests return 402 budget_exceeded.

She also turns on email alerts for low balance, for 80% of the monthly limit, and for failed top-ups. The alerts tell her about a problem while there is still time to act.

5. Respect the rate limit

Each key allows 60 requests per minute. At that pace, 10,000 requests take roughly 167 minutes, under three hours on a single key. She runs a simple queue that sends one request per second, so she stays under the limit without bursts. She could create up to 5 active keys, for example one for ingestion and one for the app's live lookups, so a backfill never blocks a user request.

6. Handle the videos with no transcript

The API returns existing YouTube captions only. Live streams, private or removed videos, and videos with no captions return 404 no_transcript. In her queue that status means mark as skipped and move on, never retry. Because those requests cost nothing, a channel full of uncaptioned videos does not burn her budget.

Her loop, in pseudocode:

  1. Take the next video ID from the queue.
  2. Call the API with format=json.
  3. On success: split the segments into chunks of about a minute, store each chunk with its start offset, and embed it.
  4. On 404 no_transcript: store a "no transcript" flag.
  5. On 402 budget_exceeded: pause the queue and alert herself.
  6. On a server error: retry after a delay.

7. Check the balance in code

Before each large batch she calls GET /api/v1/credits. If the balance is lower than the batch needs and auto top-up is off, the job refuses to start. It is a cheap guard against a half-finished import.

What she ends up with

After the first night, the index holds the transcripts of nearly all 10,000 videos, each chunk carrying its start time. When a user asks a question, the assistant cites a talk and a timestamp, and the link opens the video at that moment. The ongoing cost is small: 300 new videos a month is at most 600 credits, about $18 at the 5,000 pack rate of $0.030 per transcript.

If Maya subscribed to Pro, she would also get 100 bonus credits each month, which covers some of that growth.

Where this falls short

  • No captions, no transcript. The API does not transcribe audio. For videos without captions you need a different source, such as a speech-to-text service, and you pay for it separately. Some other transcript APIs offer an audio fallback, see the comparison of YouTube transcript APIs.
  • Auto-generated captions have errors. Names and jargon are the usual casualties. The response says whether a track is auto-generated, so you can weight or flag those chunks.
  • The language is the caption track's language. The response reports the real language, so do not assume it matches what you requested.
  • Throughput is capped per key. A very large backfill is a matter of hours, not seconds.
  • It only returns transcripts. Chunking, embedding and retrieval are your job. If you only need the summary of one video, use the YouTube summarizer.

Sources

Frequently asked questions

How much does it cost to get 10,000 YouTube transcripts?

At most 20,000 credits, since each transcript is 2 credits. With the 5,000 credit pack at $74.99 ($0.030 per transcript), that is about $300. Videos without a transcript cost nothing, so the real total can be lower.

What happens when my balance runs out during a long job?

With auto top-up on, the saved card is charged for another pack once the balance drops below the level you chose, so the job keeps running. Without it, requests stop when credits run out.

How do I stop a bug from running up my bill?

Set a monthly top-up budget and a monthly credit limit. When the credit limit is reached, requests return 402 budget_exceeded. You can also get email alerts at low balance, at 80% of the monthly limit, and on failed top-ups.

What is the rate limit?

60 requests per minute per key, with up to 5 active keys. At one request per second, 10,000 videos take under three hours on a single key.

What about videos without captions?

They return 404 no_transcript and cost nothing. The API does not transcribe audio, so you need another source for those videos.

Summarize a YouTube video now

Paste a link and get the key points with clickable timestamps.

ragyoutube transcript apiai appauto top-upapi budget

Related reading

Latest posts

Summarize any YouTube video in seconds

Try sum.video