EN ▾
Get API key

Grok AI API Pricing and a Prepaid Alternative

Isometric scale weighing blocks of tokens against coins to illustrate per-token API pricing

If you are comparing grok ai api pricing before you commit to a stack, the useful number is cost per request, not the headline rate. This page shows how to compute it and what an independent, prepaid alternative costs.

Updated

Key points

Mistral models include built-in content filters that may block lawful adult content, requiring workarounds.

Token costs for long-context Mistral usage can exceed those of flat-rate uncensored alternatives.

A single API key works across all Mistral endpoints, debunking the need for separate NSFW keys.

For pure text generation without refusals, a dedicated uncensored API often provides better value and reliability.

On this page

The short answer on Grok API costs

Grok is the model family from xAI, and xAI sells API access to it with per-token billing. Their rates change, and different Grok models carry different rates, so any number copied into a blog post goes stale. For the official figures, open xAI's own pricing page and check their current pricing there. This article does not quote it, because guessing would be worse than useless.

What does not change is the shape of the bill. Almost every hosted LLM API, official or independent, charges for tokens in and tokens out, with output costing more than input. Once you know the two rates for a provider, you can price any workload with the same arithmetic, which is what the rest of this page does using the rates of this service.

One clarification matters here. This site is not xAI and does not resell Grok. It is an independent, OpenAI-compatible API for one open-weight model, tuned to answer without content refusals for lawful adult use. People search for Grok-flavoured terms because they want a model that does not lecture them, and this is one way to get that behaviour. If you need the real Grok models, you need xAI's API.

How per-token billing works

A token is a chunk of text, roughly three quarters of an English word on average, though code and non-English text tend to use more tokens per word. Every request has two sides. The prompt you send, including the system message and the whole chat history, counts as input tokens. The text the model writes back counts as output tokens.

That split is where budgets go wrong. A chat that looks cheap per message becomes more expensive as it grows, because each new turn re-sends the earlier turns as input. A 30-turn conversation does not cost 30 times one turn; it costs closer to the sum of a growing series. Output is the smaller part for most chat apps, but input dominates when you attach long documents or keep a big history.

The formula is simple:

The API also returns usage numbers with each response, and with streaming the usage arrives at the end of the stream. You can log those and compute real cost per user instead of estimating.

Worked examples at $0.15 and $0.50 per 1M

Here are the rates on this service applied to four workloads. Each line shows the multiplication so you can check it.

WorkloadInput costOutput costTotal
One chat turn: 1,000 in, 300 out1,000 x $0.15 / 1M = $0.00015300 x $0.50 / 1M = $0.00015$0.0003
Long document: 50,000 in, 1,000 out50,000 x $0.15 / 1M = $0.00751,000 x $0.50 / 1M = $0.0005$0.008
Full window: 90,000 in, 10,000 out90,000 x $0.15 / 1M = $0.013510,000 x $0.50 / 1M = $0.005$0.0185
Batch of 100,000 requests at 2,000 in, 500 out200M x $0.15 / 1M = $3050M x $0.50 / 1M = $25$55

Read the table in terms of volume. At $0.0003 a turn, 1,000 chat turns cost $0.30 and 10,000 turns cost $3. Even a request that fills the entire 100,000-token context window with 90,000 tokens of prompt costs under two cents.

A longer conversation, step by step

Take a 40-turn conversation where, on average, each request sends 6,000 tokens of history and prompt and gets 400 tokens back. Input is 40 x 6,000 = 240,000 tokens, which costs 240,000 x $0.15 / 1M = $0.036. Output is 40 x 400 = 16,000 tokens, which costs 16,000 x $0.50 / 1M = $0.008. The whole session costs $0.044, a little over four cents.

What $0.50 of trial credit and a $20 top-up buy

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It is one per person, it is valid for 7 days, and it needs no payment details. Sign-up works with Google or with email and password. The trial key has lower limits than a full key: 2 concurrent requests and 60 requests per minute.

At the typical chat turn of $0.0003, $0.50 covers about 1,666 turns, since 0.50 / 0.0003 is 1,666.7. That is enough to test a prompt, a streaming UI, tool calling and JSON mode properly before spending anything. It will not run a product, and it expires in a week, so plan the evaluation rather than letting it lapse.

After that you top up with prepaid credit. Any whole amount from $20 to $500 works. Larger top-ups carry a bonus: +5% from $50, +10% from $100 and +15% from $200. In dollars, $50 becomes $52.50 of credit, $100 becomes $110, and $200 becomes $230. A $20 top-up at $0.0003 per turn covers 66,666 turns. Credit never expires, so a top-up you do not use this month is still there next month.

Payment is in crypto only, with USDT on TRC20 or USDC on Base. See the pricing page for the current top-up flow and the bonus table.

Is there a free unlimited tier?

No. Say it plainly, because search results for this kind of query are full of pages promising free unlimited access, and they set the wrong expectation. Running a large model costs real money, and nobody provides it without limit for nothing. The only free thing here is the one-time $0.50 trial credit. Beyond that you pay per token from prepaid credit.

Prepaid billing has a useful side effect for budgeting. There is no subscription to forget about and no surprise invoice at the end of the month. Your spend cannot exceed what you loaded. The response header X-Balance-USD shows your remaining balance on each call, so you can show it in your own dashboard or alert when it gets low. Failed or refused requests are not charged.

If your workload is bursty, such as a hobby bot, a weekend project or a prototype, prepaid fits well. If you need a negotiated enterprise contract, invoices or a guaranteed support plan, this service is not set up for that, and an official vendor API may suit you better.

Checking cost in your own code

Do not trust an estimate when the API gives you the real counts. This snippet sends one request and prices it from the returned usage using the two rates above.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.nsfwgrok.top/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarize the plot of Hamlet in 5 lines."}],
)

u = resp.usage
cost = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(u.prompt_tokens, u.completion_tokens, f"${cost:.6f}")

Store that figure per user or per conversation and you will know your unit economics within a day of launch. If you want the raw balance too, read the X-Balance-USD response header. The API docs list every header and parameter.

Choosing between an official Grok API and this one

Pick the official xAI API when you specifically need Grok models, their newest releases or vendor-backed features. This service cannot give you that, and it does not pretend to. Pick an independent endpoint like this one when your main requirement is a model that answers without content refusals for lawful adult use, you want predictable prepaid costs, and you are happy with a single text model at a 100,000-token context window.

A few practical limits to weigh before you switch. The service is text only, with no image, audio or video generation, no embeddings and no fine-tuning. A full key allows 8 concurrent requests and 300 requests per minute, and the maximum request body is 8 MB. There is one hard content rule: no sexual content involving minors, ever. Prompts are not used for training.

Because the API is OpenAI-compatible, trying it costs almost nothing in engineering time. Change the base URL and key in your client, set the model to uncensored, and run your existing test prompts. Create a key on the API key page, run the trial, and compare outputs and cost on your own prompts. For background on how this compares with another vendor's API, the page on Mistral versus uncensored alternatives covers a similar decision.

Questions and answers

How much does the Grok API cost?

Check xAI's current pricing page, as rates differ by model and change over time. This site is an independent API and charges $0.15 per 1M input tokens and $0.50 per 1M output tokens.

Is there a free Grok API?

Not unlimited. On this service, new users can claim $0.50 of trial credit once, valid for 7 days, with no payment details needed. After that you pay per token from prepaid credit.

Does this API use Grok models?

No. It runs one open-weight model run by an independent provider and is not the official API of xAI or any other vendor. The model ID is uncensored.

How do I pay?

Top up any whole amount from $20 to $500 using crypto: USDT on TRC20 or USDC on Base. Bonuses are +5% from $50, +10% from $100 and +15% from $200.

Do unused credits expire?

No. Credit never expires. Only the $0.50 trial credit has a time limit of 7 days.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.