To use Grok as a Janitor AI proxy, add a configuration with xAI's address https://api.x.ai/v1/chat/completions, an xAI API key and the model grok-4.7. None of it is free: xAI bills the API apart from a Grok subscription, and 100 messages of 16,000 tokens cost $3.38 on grok-4.7. Its reasoning tokens bill on top, at the output price.
Two routes to Grok in Janitor AI
| Route | What you need | Who bills you |
|---|---|---|
| xAI direct | An xAI API key and credits | xAI, per token |
| OpenRouter | An OpenRouter key and credits | OpenRouter, per token |
xAI and OpenRouter documentation and Janitor's help center, read November 24, 2026
Route one: xAI's own key
Janitor's own quickstart sets up a proxy in five steps:
- Sign in to the xAI Console at console.x.ai, add credits, and create an API key.
- In a Janitor chat, open the gear icon, then API Settings, then Add Configuration.
- Fill in the five fields below.
- Press Add, then Save Settings, and refresh the page.
- Send a test message. A reply means the setup works; an error points to the section on errors below.
For Grok on xAI's own key, the fields read:
Config Name Grok (any name you like)
Model Name grok-4.7
Proxy URL https://api.x.ai/v1/chat/completions
API Key your xAI API key
Custom Prompt leave it empty for the first test
Other models grok-4.3
grok-4.20-0309-non-reasoning
grok-4.6
grok-4.5
Your Grok login works in the console too. xAI's account FAQ says "the account is shared between Grok and xAI API", but the billing is separate, so a Grok subscription pays for no API call. Its billing FAQ charges prepaid credits when you buy them and refunds none of them "unless in regions required by law".
xAI's quickstart points its code at https://api.x.ai/v1 and uses its newer Responses API. Its Chat Completions page says "Chat Completions is offered as a legacy endpoint", and it still answers. Janitor's quickstart gives a full chat completions address in its own example, so paste the whole address, ending in /chat/completions.
We sent a made-up key on November 24, 2026. xAI's chat address answered HTTP 400, "Incorrect API key provided", with a pointer to console.x.ai. The base address alone answered 404: "The requested resource was not found". The same key on OpenRouter's address drew a 401, "Missing Authentication header".
Route two: OpenRouter
OpenRouter serves Grok next to its other models, under one key and one balance:
Config Name Grok via OpenRouter (any name you like)
Model Name x-ai/grok-4.7
Proxy URL https://openrouter.ai/api/v1/chat/completions
API Key your OpenRouter key
Custom Prompt leave it empty for the first test
Other models x-ai/grok-4.3
x-ai/grok-4.20
On November 24, 2026, OpenRouter's public model list held 9 Grok ids, and none ended in :free. Its prices for x-ai/grok-4.7 and x-ai/grok-4.3 matched xAI's own. OpenRouter describes x-ai/grok-4.20 as a reasoning model, so the 4.20 model without reasoning is a direct-route id. Its limits page says a paid model "has no platform-level request cap", and it warns of errors on a negative balance. Our OpenRouter guide covers the account.
Janitor's own Router is a third way in. Its announcement of July 30, 2026, says it reaches third-party models "without copying API keys or configuring an external proxy". It is for janitor+ subscribers on the web. The announcement lists no models, so check Router's list in your API settings for Grok and its price.
What 100 messages cost
Every message resends the context. Janitor's token guide says the permanent tokens "show up every single time the AI processes a message", and the recent chat goes with them. You pay the input price for all of it and the output price for the reply.
At xAI's prices of November 24, 2026, grok-4.7 costs $2 per million input tokens and $6 per million output. Grok 4.3 costs $1.25 and $2.50. A request of 200,000 prompt tokens or more pays double, for every token in it.
Two things move the real bill away from the chart. The first raises it. xAI's reasoning page says grok-4.7, grok-4.6 and grok-4.5 think at high effort by default, and "Reasoning cannot be disabled." Those tokens are "billed as part of your total consumption", at the output price. The five fields of Janitor's quickstart leave no place to set the effort. Every 1,000 reasoning tokens add 0.6 cents to a grok-4.7 message, or $0.60 per 100. How many a Janitor reply uses, we could not measure without an account.
The second lowers it. When consecutive requests start with the same messages, xAI caches that start on its own. The cached part costs $0.50 per million on grok-4.7, a quarter of the input price, and $0.20 on grok-4.3. With 12,000 of a message's 16,000 tokens from the cache, 100 grok-4.7 messages would cost $1.58.
The cache comes without a promise. xAI says caching "is not 100% guaranteed", and that "A change to an earlier message breaks the cache from that message onward". Janitor's token guide says older chat messages "get pushed out as new messages come in". xAI's way to more cache hits is a cache key or an x-grok-conv-id header, and Janitor's quickstart has a field for neither.
Which Grok model, by cost
Grok models for Janitor AI, by reasoning and cache price
| Model | Reasoning by default | Cached input |
|---|---|---|
| Grok 4.7 | High, always on | $0.50 per million |
| Grok 4.5 | High, always on | $0.30 per million |
| Grok 4.3 | Low | $0.20 per million |
| Grok 4.20, no reasoning | None | $0.20 per million |
xAI's models page, reasoning page and model pages, read November 24, 2026
xAI's models page names grok-4.7 for chat and calls it "the most capable model we've built". It is also the most expensive Grok per message, and grok-4.6 costs the same. Grok 4.3 costs about 39 percent less per message, reasons at low effort by default, and holds one million tokens of context. The full id of the last row is grok-4.20-0309-non-reasoning. It costs the same as grok-4.3 and does not reason, so the chart shows its whole bill before cache hits.
Which model writes the roleplay you like is a matter of taste that no price list settles. A few dollars of credit and the same scene sent to two models will settle it for you.
The fast Grok models people search for are off the API. xAI's pricing page says Grok 4.7 Fast runs only in Cursor and Grok Build and "is not available on the public xAI API". On November 24, 2026, neither xAI's model list nor OpenRouter's held a fast Grok, and the x-ai/grok-4.1-fast id in older Janitor guides was gone from OpenRouter's list.
What Grok will refuse, and what no route changes
The usage policy. xAI's Acceptable Use Policy, effective August 14, 2026, bans "Jailbreaking, adversarial prompting, or prompt injection". It also bans sexual depictions of real people, sexualizing children, and circumventing safeguards. Unlike Anthropic's usage policy, it has no section against sexually explicit content in general. Inside those lines, what Grok writes is the model's own call.
The moderation controls. Today a request can only make Grok stricter. xAI's moderation controls let a request add a decline for nsfw, violence or profanity, and decline is the only behavior on offer. Categories a request leaves out keep the model's default behavior. Janitor's quickstart has no field for these controls.
The limits. xAI's rate limits are set per team and per model, in requests per second and tokens per minute. They rise with what the team has spent, and they follow the key. Our 429 page covers the general rule.
The regions. xAI's terms, last updated October 27, 2026, bind users to export controls and sanctions laws. We give no steps around them.
When Grok answers with an error
- 400 that names the key. "Incorrect API key provided" means xAI does not know the key. Create a new one in the xAI Console and paste it whole. Our network error and 401 guide covers the general checks.
- 404. The address is cut short or misspelled. The base address alone answered 404 in our test, so the Proxy URL needs the full path.
- 401 on OpenRouter. Check that the configuration holds an OpenRouter key. Our made-up xAI key drew a 401 there.
- An error about a setting. xAI says presence penalties, frequency penalties and stop sequences "cannot be used with reasoning models". If an error names one of them, switch to grok-4.20-0309-non-reasoning, which does not reason.
- 429. A rate limit on your key, covered on the 429 page.
Where a network proxy fits
Nothing on this page needs one. Janitor's website security policy, read on November 24, 2026, names neither api.x.ai nor OpenRouter's chat address. So on the website the request to the Proxy URL leaves from Janitor's servers, and xAI sees Janitor's address. Price, limits and refusals follow your key and the model.
HProxy's lines fit a narrower case: a network that must leave through a fixed, known address, such as a company network. For that, our static ISP proxies cost $2.70 per IP a month, from one address, and residential proxies start at $0.23 per GB. Our proxies for Grok post covers grok.com, the Grok apps and Grok Build.
Sources
Read on November 24, 2026, with the date each page gives:
- xAI: Models, Pricing, Quickstart and Chat Completions (Legacy).
- xAI: Reasoning and the model pages for Grok 4.3 and Grok 4.20 (Non-Reasoning).
- xAI: Prompt caching, with its pages on how it works, what breaks caching and usage and pricing.
- xAI: Custom Moderation Controls, Rate limits, and the FAQ on accounts and billing.
- xAI: Acceptable Use Policy, effective August 14, 2026, and Terms of Service, last updated October 27, 2026, read in Internet Archive copies of November 24 and November 22, 2026.
- OpenRouter: the public model list and Limits.
- Anthropic: Pricing and Usage Policy, effective November 12, 2026. Mistral: Pricing. DeepSeek: Models and Pricing.
- Janitor help center: TL;DR Quickstart Proxy Instructions, August 1, 2025, and Tokens, August 11, 2026.
- Janitor: Introducing janitor+ Router, July 30, 2026.
- Our own measurement: a made-up key on both routes, and the security policy header of janitorai.com, read for our network error guide.





