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.

ModelInput / 1MOutput / 1MPer 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

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)
Get API keyCost calculatorDocs

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