Summary
- Every API bill is input tokens times the input rate plus output tokens times the output rate.
- Here the rates are $0.15 per 1M input and $0.50 per 1M output, paid from prepaid credit.
- A typical short chat request costs a fraction of a cent, and 20,000 such requests a day come to about $198.00 a month.
- Use the same formula with xAI's published rates to compare, and check their current pricing first.
The formula behind any token price
Language model APIs bill by tokens, not by request. A token is a chunk of text, roughly three quarters of an English word on average. Your prompt is counted as input tokens, the reply as output tokens, and the two have separate rates because generating text costs more than reading it.
The cost of one request is:
cost = prompt_tokens / 1_000_000 * input_rate + completion_tokens / 1_000_000 * output_rate
That is all the arithmetic you need. Rates are quoted per 1M tokens, so divide your token counts by a million first. The hard part is knowing your real token counts, because chat history, system prompts and retrieved documents all count as input on every call.
We are an independent hosted service, not the official xAI API, so we do not quote Grok's rates here. Open xAI's pricing page, copy the current input and output numbers, and drop them into the formula above to see your own comparison.
What one request costs at $0.15 and $0.50
Our rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Here are four request shapes, computed exactly.
| Request type | Input | Output | Cost |
|---|---|---|---|
| Short chat turn | 500 | 200 | $0.000175 |
| Chat with history | 3,000 | 400 | $0.00065 |
| Retrieval answer | 6,000 | 500 | $0.00115 |
| Long document summary | 90,000 | 2,000 | $0.0145 |
Take the last row. 90,000 input tokens is 0.09 of a million, so 0.09 x $0.15 = $0.0135. 2,000 output tokens is 0.002 of a million, so 0.002 x $0.50 = $0.001. The sum is $0.0145, under two cents for a document that fills most of the 100,000-token context window.
The window counts prompt plus completion together, which is why the example stops at 92,000 tokens in total and leaves room to spare.
From requests to a monthly bill
Per-request numbers look tiny, so scale them with your own traffic. Two scenarios show the range.
A busy chat app
Say 20,000 requests a day, each with 1,200 input and 300 output tokens. Daily input is 24M tokens, which is 24 x $0.15 = $3.60. Daily output is 6M tokens, which is 6 x $0.50 = $3.00. That is $6.60 a day, or $198.00 over 30 days.
A one-off batch job
You summarize 100,000 articles, each 3,000 tokens in and 400 tokens out. Input is 300M tokens, so 300 x $0.15 = $45.00. Output is 40M tokens, so 40 x $0.50 = $20.00. The whole job costs $65.00, and you pay only while it runs.
Notice that in the batch job the output is only 12 percent of the tokens but nearly a third of the bill. Output is more expensive per token, so long replies move the total faster than long prompts.
Measure your own tokens with a calculator
Guessing token counts is the main source of bad estimates. Every response carries a usage block, so log it and compute the real figure. This Python snippet sends a request and prints what it cost.
from openai import OpenAI
RATE_IN = 0.15 # USD per 1M input tokens
RATE_OUT = 0.50 # USD per 1M output tokens
client = OpenAI(base_url="https://api.grockapi.com/v1", api_key="YOUR_KEY")
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarize the plot of Hamlet in 5 lines."}],
)
u = r.usage
usd = u.prompt_tokens / 1e6 * RATE_IN + u.completion_tokens / 1e6 * RATE_OUT
print(u.prompt_tokens, u.completion_tokens, round(usd, 6))
Run it on ten representative prompts from your product, average the results, and multiply by expected volume. You will get a better forecast than any rule of thumb. The response also carries an X-Balance-USD header, so you can watch the real balance fall and check your math against it.
Hidden multipliers that inflate a bill
Most estimates miss because they count each request as if it were alone. In a chat, every turn resends the whole conversation, so input grows with each message while output stays flat.
Work through a 10-turn chat. The system prompt is 400 tokens. Each user message is 100 tokens and each reply is 200 tokens, so every turn adds 300 tokens of history. The input at turn k is 400 + 300 x (k - 1) + 100, which is 200 + 300k. Summed over the ten turns, that is 2,000 + 300 x 55 = 18,500 input tokens. Output is 10 x 200 = 2,000 tokens.
- Input: 0.0185M x $0.15 = $0.002775
- Output: 0.002M x $0.50 = $0.001
- Total: $0.003775 for the whole conversation
A naive estimate of 500 input tokens per turn would have given 5,000 input tokens in total. The real figure is 3.7 times higher. Other multipliers to watch are tool-calling round trips, where each tool result triggers another request that carries the full history again, and retry loops in your own code that resend large prompts after a timeout.
Comparing against Grok's bill
To compare fairly, use the same token mix on both sides. Take the profile you measured above, pull xAI's current input and output rates, and compute the monthly figure the same way as in the chat-app example. Check whether their pricing page lists any extra line items for your usage pattern, such as discounts or surcharges, and include them.
Price is one input. The two services run different models, so the cheaper bill is only a win if the answers fit your use. If you need xAI's own models, their API is the only way to get them. If you need a model tuned to answer without content refusals for lawful adult use, a hosted open-weight model such as ours is the relevant comparison. For background on that choice, see our guide to uncensored Grok-style models.
Five ways to cut token spend
- Trim history. Re-sending a 20-turn chat on every call multiplies input cost. Keep a rolling window or a short summary of older turns.
- Cap replies. Set
max_tokenswhen you know the answer should be short. It is optional here, but it stops a runaway reply from costing 5,000 tokens. - Use stop sequences. A
stopstring ends generation as soon as the format is complete. - Cache retrieval. If many users ask the same question, store the answer in your own database.
- Shorten the system prompt. A 1,500-token prompt on 100,000 requests is 150M input tokens, or $22.50, before any user text.
Failed or refused requests are not charged, so retries after an error do not add to the bill.
How you pay
Billing is pay as you go from prepaid credit. There is no subscription, and credit never expires. You top up any whole amount from $20 to $500, with a bonus of 5% from $50, 10% from $100 and 15% from $200. A $100 top-up therefore gives $110.00 of credit. Payment is in crypto, USDT on TRC20 or USDC on Base.
At $0.00065 per chat-with-history request from the table, $20 of credit covers more than 30,000 requests. See the pricing page for the current top-up tiers, read the API docs for the endpoints, or get an API key and claim the $0.50 trial credit to test your own numbers.
Sizing your first deposit
- Pick a unit. One conversation, one document or one user action.
- Measure it. Log
usagefor 50 real units and take the average input and output counts. - Multiply by volume. Use the expected number of units per day, and the busiest day, not the average one.
- Add headroom. A margin of 25 percent covers growth and prompts that get longer over time.
- Top up to match. Size the deposit to the budget, not the other way round.
Apply the steps to the chat app above. The base figure is $198.00 a month. With 25 percent headroom it becomes 198 x 1.25 = $247.50. A $200 top-up carries a 15% bonus, so it adds $230.00 of credit, which covers $6.60 a day for almost 35 days. Two deposits a month cover the full budget with a little to spare, and since credit never expires, leftover balance simply rolls into the next month.
More guides
Frequently Asked Questions
Is grock uncensored the same as Grok? No. Grock uncensored is an independent open-weight model. It is not produced by xAI or any other major vendor. It is tuned for uncensored output but runs on its own architecture.
Can I use this API for commercial projects? Yes. You can use the output for any lawful purpose. There are no restrictions on commercial use. The model does not claim ownership of your generated text.
How do I top up my credit? Go to the dashboard. Select crypto payment. Choose USDT on TRC20 or USDC on Base. Send the desired amount between $20 and $500. Credit is added immediately. Bonus credits apply automatically based on the amount.
What happens if I make a mistake? Credit is not refunded. It never expires. If you are double-charged, use the Support page to resolve the issue. The support team will review the transaction.
