1. Use the smallest model that passes your tests
Prices span two orders of magnitude, and a fast tier handles classification, extraction and short answers as well as a flagship. Run a sample of real prompts through two or three tiers and keep the cheapest one whose answers you'd ship. The cheapest LLM APIs page ranks every model on one workload.
2. Cache what repeats
Put the parts of the prompt that never change first, and they're billed at the cached price on the next request, often a tenth of the input price. How prompt caching works.
3. Cap the output, and the thinking
Output costs several times more than input, and a reasoning model's thinking is billed as output. Set max_tokens, ask for short answers, and set reasoning_effort to the lowest level that still gets the task right.
4. Send less context
Long chats re-send everything said so far. Summarize old turns, retrieve fewer and shorter passages, and drop tool definitions a request doesn't need.
5. Route by difficulty
Most traffic is easy. Send everyday requests to a fast model and only the hard ones to a flagship. Zurelay Auto does this per request and bills the price of the model that answered.
6. Stop paying for retries
Malformed JSON and refused formats cost a second request. Structured output with a JSON schema gets the shape right the first time. On Zurelay, attempts that fail on a route move to another and aren't billed.
7. Pay less for the same tokens
The same model costs less below list price. On Zurelay, chat models run 18–90% below each lab's list price, through the OpenAI and Anthropic SDKs. Try your numbers in the cost calculator.
Measure first
Every response carries its usage: prompt, cached and completion tokens, and reasoning tokens where the model reports them. Log them per feature for a week before you change anything, so you cut where the money actually goes.