What is the cheapest LLM API for my workload?
Find the cheapest LLM for your real input, output and cache mix with live TokenRex prices instead of choosing by input price alone.
Estimated monthly cost — Short assistant requests
Calculated live from current TokenRex prices.
| Model | Input / 1M | Output / 1M | Per month |
|---|---|---|---|
| GPT-6 Luna | $0.10 | $0.50 | $13.50 |
| Claude Haiku 4.5 | $1.00 | $5.00 | $135.00 |
| Gemini 3.8 Flash | $0.75 | $3.75 | $101.25 |
| Gemini 3.1 Flash Lite | $0.25 | $1.50 | $37.50 |
| Claude Sonnet 5 | $2.00 | $10.00 | $270.00 |
| GPT-6 Astra | $10.00 | $50.00 | $1.4k |
Price the whole request
The cheapest input price is not automatically the cheapest model. Add input, output, cached input where supported and the number of extra requests needed to finish a task.
For short classification, input usually dominates. For writing, output can matter more. For agents, repeated context and tool rounds often matter most.
A practical selection process
- Write 20 to 50 real prompts with expected results.
- Run the cheapest likely model first and record failures.
- Escalate only failed or high-value requests to a stronger model.
- Compare cost per accepted result, not cost per successful HTTP response.
Use live comparisons
The table above uses current enabled TokenRex prices for one example workload. Change the token counts in the cost calculator for your own traffic.
Compare specific models on the Models & Pricing page and head-to-head comparison pages before switching production traffic.
Sources
Example
from openai import OpenAI
client = OpenAI(api_key="YOUR_TOKENREX_KEY", base_url="https://tokenrex.ai/api/public")
resp = client.chat.completions.create(
model="gpt-6-luna",
messages=[{"role": "user", "content": "Classify this ticket as billing, technical or account"}],
max_tokens=20,
)
print(resp.choices[0].message.content)Questions
- Is there one permanently cheapest LLM?
- No. Prices and suitable models change, and your token mix decides the result.
- Does TokenRex automatically switch to the cheapest model?
- No. Your application chooses the exact model ID.
Related
- How should I compare cheap and premium LLMs before choosing one?
- How to reduce LLM API costs
- What is prompt caching?
- How much does an AI chatbot cost per month?
- How do I generate a transparent AI image with GPT Image?
- Should AI images be PNG, JPEG or WebP?
- How do I choose Gemini image resolution: 1K, 2K or 4K?