The budget formula
A monthly estimate needs one line of arithmetic once you have three inputs. Write it down in a spreadsheet and update it every time your traffic changes.
cost_per_request = input_tokens * input_rate / 1,000,000
+ output_tokens * output_rate / 1,000,000
monthly_cost = requests_per_day * 30 * cost_per_request
For Claude models, take the input and output rates from Anthropic's current pricing page. We do not quote them because they change. For the service behind this site, the rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens, and every example below uses those. If you want to price the same workloads elsewhere, only the two rates change.
Where do requests per day and tokens per request come from? From your logs. If you have none yet, run twenty real requests, read the usage block on each response and average it. The number you guess before measuring is usually too low, mostly because of conversation history.
Three small-app budgets
Here are three plausible apps, each priced over 30 days with the formula above.
| App | Requests per day | Tokens per request (in / out) | Per request | Per month |
|---|---|---|---|---|
| Support bot for a small shop | 300 | 2,500 / 350 | $0.00055 | $4.95 |
| Writing helper in a note app | 2,000 | 1,000 / 250 | $0.000275 | $16.50 |
| Roleplay platform | 10,000 | 4,000 / 500 | $0.00085 | $255.00 |
The arithmetic for the first row: 2,500 x 0.15 / 1,000,000 = $0.000375 and 350 x 0.50 / 1,000,000 = $0.000175, so $0.00055 per request. Then 300 x 30 = 9,000 requests, and 9,000 x $0.00055 = $4.95.
The last row: 4,000 x 0.15 / 1,000,000 = $0.0006 and 500 x 0.50 / 1,000,000 = $0.00025, so $0.00085. With 300,000 requests a month, the bill is $255.00.
Add headroom for what averages hide
A budget built on averages fails on bad days. Three things push real spend above the estimate.
History growth
Chat apps resend previous turns, so late messages in a session cost more than early ones. Measure tokens on long sessions, not on first messages, or put a cap on history length and summarise the rest.
Traffic spikes
If a post goes viral, requests per day can double overnight. A 50% margin on the estimate is a reasonable starting point.
Retries
Client retries after timeouts add duplicate requests. Failed or refused requests are not charged on this service, but a retry that succeeds after a slow first try is charged once, as normal.
Also check the limits against your peaks. Ten thousand requests a day is about 7 per minute on average (10,000 / 1,440). A full key allows 300 requests per minute and 8 concurrent, so the average is far inside the limit. A burst of 50 users at the same moment is not, and you should queue requests rather than fail them. A trial key allows 2 concurrent and 60 per minute, which is for testing only.
Cap the spend with prepaid top-ups
With pay-as-you-go prepaid credit, the budget is also a ceiling. You add credit, the API deducts it per token, and when it is gone requests stop. There is no invoice at the end of the month and no overage. Credit never expires, so a top-up that is bigger than one month's need is not wasted.
Top-ups are any whole amount from $20 to $500, paid in crypto only: USDT on TRC20 or USDC on Base. Bonuses apply on larger amounts:
- $50 gives +5%, so $52.50 of credit.
- $100 gives +10%, so $110.
- $200 gives +15%, so $230.
- $500 also earns the +15% tier, so $575.
Match that to the budgets above: the support bot at $4.95 a month is covered for about four months by a $20 top-up (20 / 4.95 is about 4.0). The writing helper at $16.50 fits in a $50 top-up for three months, since $52.50 / $16.50 is about 3.2. The roleplay platform at $255.00 is above even a $200 top-up of $230, so it needs a top-up of around $250 or two smaller ones. At that scale, watch the balance closely.
Monitor the balance from code
Every response carries an X-Balance-USD header. You can read it in the OpenAI Python SDK with the raw response wrapper and warn yourself before the money runs out.
from openai import OpenAI
client = OpenAI(
base_url="https://api.claudeapicosts.com/v1",
api_key="YOUR_KEY",
)
raw = client.chat.completions.with_raw_response.create(
model="uncensored",
messages=[{"role": "user", "content": "Reply with the word ready."}],
max_tokens=10,
)
resp = raw.parse()
balance = float(raw.headers.get("X-Balance-USD", "0"))
print(resp.choices[0].message.content, balance)
if balance < 5:
print("Balance is low: top up soon")
You can also poll GET /v1/balance, or the OpenAI-style GET /v1/dashboard/billing/credit_grants, with the same bearer token:
curl https://api.claudeapicosts.com/v1/balance \
-H "Authorization: Bearer YOUR_KEY"
Hook the check into a daily job and send yourself a message when the balance falls below two weeks of expected spend. That keeps the ceiling from turning into an outage.
What happens if traffic doubles
Test your plan against growth before it happens. Doubling the requests doubles the bill, since cost is linear in requests. The three apps above would cost $9.90, $33.00 and $510.00 a month. If tokens per request also grow by half, because users write longer messages or sessions run longer, multiply again by 1.5.
Plan the decision points in advance. For example, decide that above a monthly spend you choose, you will trim history, shorten the system prompt or cap output length before adding credit. Having the rule written down before a spike keeps you from paying for a leaky prompt.
Ways to bring the monthly number down
- Trim history. Cut the oldest turns or replace them with a short summary. Input tokens are most of the bill for chat.
- Cap output. A
max_tokenssetting and a prompt that asks for concise answers lower the more expensive meter. - Shorten the system prompt. It is sent with every request, so trimming 500 tokens saves 500 x 0.15 / 1,000,000 = $0.000075 per request. At 300,000 requests a month, that is $22.50.
- Cache your own answers. If many users ask the same thing, store the reply.
Before you scale, test with the free trial: after sign-up, claim $0.50 on the API key page with no card, valid for 7 days, one per person. The pricing page has the latest rates and bonus tiers, the docs explain streaming, tool calling and JSON mode, and our article on the true cost of uncensored LLMs goes deeper on cost drivers. This service is independent and is not Anthropic's API. It is text only, with a 100,000-token context window.
