$0.003 per request: count tokens before sending
01 / A $0.003 request is a calculation, not a quote
Before sending an AI request, estimate two things: how much text goes in and how much text can come out. That gives you a spending estimate you can compare with your budget.
Suppose a model costs $1 per million input tokens and $4 per million output tokens. Sending 1,000 input tokens and receiving 500 output tokens would cost $0.001 + $0.002 = $0.003. Those are illustrative rates, not CheapRelay prices. Substitute the current rates for your chosen model before making a decision.
At that example cost, 100 identical requests would total $0.30. Longer answers, growing conversation history, and extra agent calls can change that total quickly.
02 / Use characters for a free first estimate
Tokens are pieces of text. A token might represent a word, part of a word, punctuation, or whitespace. Different models can split the same text differently.
For ordinary English prose, one token per four characters is a useful rough estimate. Another common approximation is about 750 words per 1,000 tokens. Neither is a billing rule.
- ■ A 2,000-character English prompt might be around 500 tokens.
- ■ A 1,500-word document might be around 2,000 tokens.
- ■ Code, long identifiers, tables, emoji, and other languages can depart substantially from these estimates.
Your editor's character count is enough for this first pass. Count spaces too. If a request is close to your spending limit or the model's context limit, use a more suitable counter before sending it.
03 / Choose a counter that matches the model
Start with the model provider's official tokenizer or token-counting endpoint, where available. Check whether the tool supports the exact model you plan to use and whether the counting endpoint has a charge. A web counter may measure pasted text without including the surrounding API message structure.
For local counting, tiktoken is a free, open-source Python library that supports specific OpenAI token encodings. It is useful when you have confirmed the correct encoding. Its result is not a universal count for every model available through an OpenAI-compatible API.
If you cannot find an exact counter, use the character estimate and leave room in your budget. For private documents, prefer a local tool or a trusted provider's counting endpoint over an unfamiliar paste-in website.
04 / Count the whole request, including yesterday's chat
The text you just typed may be only a small part of the input. Count the instructions, previous messages, retrieved documents, tool definitions, and tool results that your application actually sends.
For example, a 300-token question plus 4,000 tokens of conversation history and 700 tokens of instructions already makes roughly 5,000 input tokens before any additional message overhead. Counting only the question would badly understate the cost.
Images, audio, and other non-text inputs need the model's own accounting rules. A character count cannot estimate those reliably. Coding agents can also make several API calls for one task, so one prompt does not necessarily mean one billable request.
05 / Reserve output money before pressing send
Calculate input tokens multiplied by the input rate, plus your output allowance multiplied by the output rate. Divide each token count by one million when rates are quoted per million tokens.
Set the model's supported output limit and ask for a concise response. The limit is a ceiling, not a promise that the model will use every token. Some models also bill reasoning tokens, so check how their limits and usage fields work.
CheapRelay offers pay-as-you-go access with no monthly fee or subscription. Billing follows real token usage, including cache reads and writes; use the applicable rates when checking your estimate. Sign up for CheapRelay when you are ready to test a small request.
06 / Compare one receipt before running 100 requests
After your first request, inspect the returned usage data and billing record. Compare actual input and output counts with your estimate. Investigate large differences before repeating the request.
Keep a simple record of the model, token counts, and actual charge. That first receipt gives you a firmer basis for a tiny budget than a character estimate alone.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-28 | Spend less | EN | $0.0012 for a Tool Loop—With Assumed Rates A beginner’s guide to function calling, tool schemas, repeated context, and keeping a two-request AI workflow within a tiny budget. |
| 2026-10-28 | Spend less | EN | $2.78 for 10,000 Documents: A Lean API Budget A beginner walkthrough for processing 10,000 documents cheaply, with transparent token math, local extraction, a small pilot, and retry controls. |
| 2026-10-28 | Spend less | EN | A $5 Telegram AI Bot With Pay-Per-Token Billing Build a Telegram AI bot on a tiny budget using CheapRelay, an OpenAI-compatible API, and per-token billing. |
| 2026-10-28 | Spend less | EN | $1 for 1,000 Ticket Summaries: Check the Token Math A beginner’s $1 planning budget for support-ticket summaries: estimate tokens, test a small model, and control retries before processing the queue. |
| 2026-10-28 | Spend less | EN | 8 Million Fewer Tokens From One Prompt Trim Trim a repeated system prompt on a tiny budget, calculate the savings, and check that shorter instructions still produce useful answers. |
| 2026-10-28 | Spend less | EN | A $5 AI Budget Starts With a $0.96 Estimate Estimate a small monthly AI bill with token math, repeat calls, and a spending buffer before you write any code. |