Our LLM API bill is eating our margin

Short answerMove the workloads that fit to open models. Lyceum serves Kimi, GLM, DeepSeek and Qwen through one OpenAI-compatible API, billed per token with no base fee, and you can reserve a dedicated endpoint once traffic is steady. A gateway and a FinOps review show which feature drives the bill. Free savings on top: trim prompts, cache repeated context and batch the jobs that can wait.

01

Move the workloads that fit to open models on Lyceum

Lyceum serves open models such as Kimi, GLM, DeepSeek and Qwen through one OpenAI-compatible API, billed per token with no base fee. In the OpenAI client you already use, you set the base URL, your API key and a model ID. Run a sample of your real tasks next to your current model and move only the tasks where the output holds up.

Good if a large share of your calls are routine tasks like extraction, tagging or summaries

Skip if your product depends on something only your current model does well

Serverless and dedicated inference · Model library and inference pricing

Tool
Cost€
EffortMedium
HelpsThis week
02

Put steady traffic on a dedicated endpoint

Once a workload runs at a steady volume, Lyceum can serve it from a dedicated endpoint: GPUs reserved for your endpoint and planned around your production workload, with the model configuration agreed before launch. You keep the same OpenAI-compatible API, so the code does not change. Start on serverless and switch when the traffic pattern is clear.

Good if one feature sends a large, predictable volume of calls every day

Skip if your traffic still jumps around from week to week

Lyceum

Service
Cost€€
EffortMedium
HelpsThis month
03

Put a gateway in front of your LLM calls

A gateway sits between your app and the providers and tracks spend per key, user and team. LiteLLM is an open-source gateway you host yourself. It can also enforce budgets per key, user or team. Budgets only work with a connected database, without one they cap nothing.

Good if several teams, features or customers share one provider account

Skip if you have a single feature and one key

Open Source AI Gateway (GitHub) · Spend Tracking · Budgets, Rate Limits

Tool
CostFree
EffortMedium
HelpsThis week
04

Bring in someone with FinOps experience

A FinOps practitioner handles AI spend in a fixed order: allocate it to use cases, right-size models, use tokens efficiently, and commit to capacity once usage is stable. Ask for cost per user and per successful outcome, reported as a range. The FinOps Foundation explains this order in its FinOps for AI guide and runs a FinOps for AI certification, so you can ask for it.

Good if AI spend is a big line in your budget and nobody owns it

FinOps Foundation

Expert
Cost€€
EffortMedium
HelpsThis month
05

Measure cost per user and per task first

Pull your provider's usage report and split it. OpenAI's Usage API groups usage by project and API key, and Anthropic's Usage and Cost API filters by API key and workspace. Give each feature its own key so the split means something. Then divide the spend by active users and by finished tasks.

Good if you know the total bill but not what drives it

OpenAI · Usage and Cost API · API key best practices, keep your keys safe and secure · FinOps Foundation

Do it yourself
CostFree
EffortLow
HelpsToday
06

Trim prompts and cap output length

Cut repeated instructions, unused examples and context the task does not need. Ask the model for short answers by number of sentences or paragraphs, which works better than a word count. Set a hard output limit, such as max_tokens on Anthropic's API. Replies that hit the limit get cut off mid-sentence, so leave some room.

Good if answers come back longer than your users read

OpenAI · Anthropic

Do it yourself
CostFree
EffortLow
HelpsToday
07

Route simple tasks to a smaller model

Sort your calls by task. Classification, extraction and short replies often run fine on a smaller, cheaper model. Anthropic suggests starting with a fast, cost-effective model such as Claude Haiku and upgrading only where tests show a gap. Run the same sample of real requests through both models and compare before you switch.

Good if one premium model handles every request

OpenAI · Anthropic

Do it yourself
CostFree
EffortMedium
HelpsThis week
08

Cache the context that repeats

Put stable content first: system instructions, tool definitions, reference documents. Put anything that changes per request, like timestamps or the user's message, at the end. OpenAI caches a matching prefix automatically on supported models, from 1,024 tokens on GPT-5.6 and later. On Anthropic you turn it on with cache_control, and cache reads cost a tenth of the normal input price or less.

Good if every request repeats the same long system prompt or documents

Skip if your prompts are short and different every time

OpenAI · Anthropic

Do it yourself
CostFree
EffortMedium
HelpsThis week
09

Batch the jobs that can wait

Reports, backfills, evaluations and nightly data enrichment rarely need an answer within seconds. OpenAI's Batch API and Anthropic's Message Batches API both cost 50% less than normal calls and return results within 24 hours. OpenAI's flex processing, in beta, bills normal requests at batch rates in exchange for slower responses.

Good if part of your traffic runs on a schedule, not in front of a user

Skip if every call has a user waiting for the answer

Batch API · Anthropic · Flex processing

Do it yourself
CostFree
EffortMedium
HelpsThis week

When it's bigger than a quick fix

Get outside help when the bill still grows faster than revenue per user after these fixes, or when nobody on the team can say which feature or customer drives the spend. A FinOps practitioner can set up allocation and unit costs per use case.

If spend jumps with no new traffic, treat it as a leaked key or a runaway script. Deactivate the key, create a new one and set a spend limit with your provider today.

FinOps Foundation · Anthropic

Questions people ask

How do I lower my LLM API costs?

Measure cost per user and per task first. Then cut tokens with shorter prompts, capped output and smaller models for simple tasks, cache repeated context and batch work that can wait.

Does prompt caching really save money?

Yes, when many requests start with the same long block of text. OpenAI discounts cached input tokens by up to 95%, and Anthropic bills cache reads at a tenth of the input price or less.

Is the Batch API slower?

Yes. Batch jobs come back within 24 hours instead of seconds, at half the price. Anthropic says most of its batches finish within an hour.

Which LLM provider is the cheapest?

It depends on the model, and prices change often. Compare the same model on each provider's own pricing page on the day you decide, and test it on a sample of your real tasks before you switch.

Is self-hosting an LLM cheaper than paying per token?

Only if you keep the hardware busy. Per-token billing follows your traffic, while reserved GPU capacity costs the same busy or idle, so it pays off with steady, high traffic.

Sources

  1. Lyceum: Serverless and dedicated inference
  2. Lyceum: Model library and inference pricing
  3. LiteLLM: Open Source AI Gateway (GitHub)
  4. LiteLLM: Spend Tracking
  5. LiteLLM: Budgets, Rate Limits
  6. FinOps Foundation: FinOps for AI Overview
  7. OpenAI: Usage API reference
  8. Anthropic: Usage and Cost API
  9. Anthropic: API key best practices, keep your keys safe and secure
  10. OpenAI: Cost optimization
  11. Anthropic: Reducing latency
  12. Anthropic: Choosing the right model
  13. OpenAI: Prompt caching
  14. Anthropic: Prompt caching
  15. OpenAI: Batch API
  16. Anthropic: Batch processing
  17. OpenAI: Flex processing