Skip to content
ByteMath

How much does it cost to classify a million texts with an LLM?

Classifying 1 million short texts a month at 200 input and 5 output tokens costs about $16.50 with a small model at example prices and the batch discount.

Last updated:

Inputs

Cost per month

$16.50

Cost per request
$0.00002
Cost per 1,000 requests
$0.02
Cost per year
$198
Tokens per month
205 M tokens
Share from output tokens
9 %

Results are engineering estimates for planning. Final designs must follow your local code and be checked by a qualified professional.

This scenario at a glance

Input
Requests33,333 per day
Input tokens per request200 tokens
Output tokens per request5 tokens
Input price per 1M tokens0.15 $/1M
Output price per 1M tokens0.6 $/1M
Share of input served from cache0 %
Discount on cached input90 %
Batch API (50 % off)Yes (asynchronous)
Calculated
Cost per month$16.50
Cost per request$0.00002
Cost per 1,000 requests$0.02
Cost per year$198
Tokens per month205 M tokens
Share from output tokens9 %

Engineering notes for this workload

Classification is one of the cheapest LLM tasks because the output is tiny: a label, a score or a short code. This scenario classifies about one million short texts a month, 33,333 a day, such as reviews, support tickets or search queries. Each request has about 200 input tokens (instructions plus the text) and returns 5 output tokens.

With example small-model prices of $0.15 per million input tokens and $0.60 per million output tokens, and the 50 % batch discount, the monthly cost is about $16.50, or $0.0000165 per item. Input is about 91 % of the cost, so shortening the instructions is the main lever: a 200-token prompt reduced to 120 tokens saves about 36 % of the bill.

Put the fixed instructions first and the variable text last. That ordering lets providers cache the shared prefix where caching is available, and it keeps the label set and examples consistent across requests. For very high volumes, packing several texts into one request with numbered outputs can reduce per-item overhead, but it complicates error handling and may reduce accuracy.

Constrain the output. Ask for a single label from a fixed list, or use the provider's structured output or JSON schema feature, so the model cannot add explanations that cost output tokens and break parsers. Set the maximum output tokens to a small number as a safety net.

At this price point, the main costs are elsewhere: building a labeled evaluation set, monitoring drift and handling ambiguous items. Compare against a fine-tuned small classifier or an embedding-plus-logistic-regression model, which can be even cheaper at scale and faster, once you have enough labeled data.

Log a random sample of predictions for human review every week to catch silent quality drops.

Track cost and accuracy together, because a cheaper prompt that misclassifies more items costs more in manual review than it saves in tokens.

Reference table

Typical token counts by LLM workload
WorkloadInput tokensOutput tokensNotes
Chat turn with system prompt500–2,000150–600History grows each turn
RAG answer3,000–10,000300–800Retrieved chunks dominate
Document summary2,000–20,000200–500Batch-friendly
Classification / tagging100–5001–20Ideal for small models
Coding assistant10,000–50,000500–3,000Large cached context
Agent tool step5,000–50,000200–2,000Many steps per task

Rule of thumb for English: 1 token ≈ 4 characters ≈ 0.75 words. Other languages and code usually need more tokens per word.

Questions about this scenario

How much does LLM text classification cost?

With a small model and batch pricing, about $16.50 per million short texts in this example.

How can I reduce classification costs further?

Shorten the shared instructions, cache the prefix, constrain output to a single label and use batch processing.

Is an LLM better than a traditional classifier?

LLMs need no training data to start and handle new labels easily; trained classifiers can be cheaper and faster once you have labeled data.