$0.04 for 100 AI calls: an illustrative receipt
01 / A four-cent receipt, not a pricing promise
You do not need a subscription or a complicated application to try an AI API. You need an account, an API key, a small script or compatible tool, and a spending limit. The important question is not simply whether a request works. It is what each useful result costs.
Start with this illustrative receipt. These rates are invented for teaching the calculation, not quoted CheapRelay prices. Check the current rates for your chosen model before sending requests.
- ■ Requests: 100.
- ■ Input per request: 1,000 tokens.
- ■ Output per request: 250 tokens.
- ■ Example input rate: $0.20 per million tokens.
- ■ Example output rate: $0.80 per million tokens.
- ■ Input subtotal: 100,000 ÷ 1,000,000 × $0.20 = $0.02.
- ■ Output subtotal: 25,000 ÷ 1,000,000 × $0.80 = $0.02.
- ■ Illustrative token charge: $0.04 for 100 requests.
That is $0.0004 per request under these assumptions. It is not a minimum deposit, a guaranteed bill, or a claim that every model costs four cents per hundred calls.
02 / The two quantities behind your first bill
An API is a way for software to send a request and receive a response. Instead of typing into a chat website, your script sends text to a service. The service returns generated text that your script can display, save, or process.
Tokens are the pieces of text the model processes. They are not exactly words or characters. Your instructions, pasted document, and included conversation history all contribute to input usage. The generated answer contributes to output usage.
For a basic request without caching or other billable categories, the calculation is input tokens multiplied by the input rate, plus output tokens multiplied by the output rate. Convert per-million rates before multiplying. A tiny decimal mistake can make a cheap experiment look expensive, or the reverse.
03 / Connect one key before building anything larger
CheapRelay is a low-priced, pay-as-you-go AI API relay: one key gives access to multiple model providers. It has no monthly fee and no subscription. Billing follows real token usage, including cache reads and writes, so inspect those categories rather than assuming repeated text is free.
Sign up for CheapRelay, create an API key, and check the current price and exact API identifier for a model such as Gemini 2.5 Flash.
- ■ Store your key in an environment variable rather than inside source code. Never place it in browser-side JavaScript or a public repository.
- ■ For an OpenAI SDK client, set the base URL to https://api.cheapapirelay.com/v1 and supply your CheapRelay key.
- ■ Use the exact model identifier from the service documentation; do not assume the display name is accepted by the API.
- ■ Send one short request, such as asking for three bullet points from a paragraph you provide.
- ■ Set a modest output-token limit using the parameter supported by that model and client.
The service also provides Gemini-native routes under /v1beta. For your first experiment, choose one interface and follow its documentation instead of mixing request formats.
04 / Turn ten test requests into a usable budget
Run ten representative requests before planning a thousand. Record input tokens, output tokens, any cache usage, and the corresponding charges. If the task includes long documents, test long documents; a one-sentence greeting will not predict their cost.
Using the illustrative receipt above, ten identical requests would cost $0.004. One thousand would cost $0.40. If output doubled to 500 tokens while input stayed unchanged, those thousand requests would instead cost $0.60. These are arithmetic projections, not measured performance results.
Keep conversation history short when earlier messages are unnecessary. Cap retries, because a failed workflow can still include billable model calls. Check whether your client retries automatically, and avoid running an unattended loop until you understand its behavior.
05 / Your first success is a reconciled receipt
After the test, compare your local usage records with the billing dashboard. Investigate differences in token counts, cache categories, or displayed rounding. A useful first milestone is simple: one working request, an understood charge, and a repeatable task. Scale only after all three agree.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-27 | Cheap how-tos | EN | $0 monthly fee: your first curl chat request Send an OpenAI-compatible chat request with curl, read the response, and keep a tiny API budget under control. |
| 2026-10-27 | Cheap how-tos | EN | A $140 API Bill Cut to $40 by Sending Less An illustrative token receipt shows how removing unnecessary user data saves $100 across 10,000 requests without shrinking useful answers. |
| 2026-10-27 | Cheap how-tos | EN | $660.27 for a Prompt Style Guide: The Receipt A six-person team's illustrative prompt style guide budget, token bill, maintenance cost, and break-even math—with assumptions exposed. |
| 2026-10-27 | Cheap how-tos | EN | $8.46 a Month to Retire a Hobby App’s Free Tiers A worked hobby-app budget covering compute, storage, traffic and AI tokens, with clear assumptions and practical spending controls. |
| 2026-10-27 | Cheap how-tos | EN | A $8.40 Receipt for One Developer's AI Notebook A realistic receipt-style budget for building a personal knowledge chatbot with token-level billing and no monthly subscription. |
| 2026-10-27 | Cheap how-tos | EN | $0.036 for 200 Textbook Flashcards: A Sample Receipt A transparent token budget for turning textbook excerpts into 200 flashcards, with review costs, pricing assumptions, and quality checks. |