LumiChat AI

Janitor AI model setup

Janitor AI + Grok API Guide (2026): Setup, Cost & Fixes

Connect Janitor AI to the official xAI Grok API, choose a current model, estimate token cost, fix 401 or 429 errors and protect your API key.

Author: LumiChat AI TeamPublished:

12 min read

Quick answer

What this guide explains

Grok in the consumer app and Grok through the xAI API are separate products. To use an xAI model through Janitor AI’s current custom proxy controls, you need an xAI developer API key, the full Chat Completions endpoint `https://api.x.ai/v1/chat/completions` and an active model ID such as grok-4.6 or grok-4.3. API use is token-billed, not covered by a free Grok consumer allowance. Verify Janitor AI’s live field labels before saving because its interface can change.

  • What “Grok on Janitor AI” actually means
  • A six-step direct xAI API setup
  • Which Grok model should you choose?

Featured companions

Three characters refresh on each visit. Cards play a promo video when available and otherwise show the character image.

Ginza club queen

Sato Akari

An elegant Tokyo Ginza club character with warm, ritual-rich replies for users who want refined emotional companionship.

ElegantRitualCompanion
Start chat
Seraphina Blake

Gothic maid

Seraphina Blake

Formal devotion and haunted-house elegance make her a fit for ritual-rich, controlled roleplay.

GothicDevotedRitual
Start chat

Pro esports player

Baoer

A Chengdu AG pro who is focused in matches and softer in private, ideal for users who want a cool, attentive companion with a competitive spark.

EsportsCoolFocused
Start chat
Real LumiChat character library used to compare hosted chat with a Janitor AI Grok API setup

People searching Janitor AI Grok are usually not comparing Grok Ani with Janitor AI. They want a working model route: which URL to enter, which Grok model ID to choose, whether a consumer subscription pays for API calls and why the first test returns 401, 404 or 429. This guide owns that setup intent. The separate Grok Ani vs JanitorAI comparison covers the platform decision, while the Janitor AI Advanced Prompts guide covers persistent behavior rules rather than provider access.

What “Grok on Janitor AI” actually means

The xAI developer API exposes Grok models through an OpenAI-compatible base URL and Chat Completions endpoint. Janitor AI can act as the character-card and conversation frontend while xAI produces the reply, if the current Janitor interface accepts a compatible custom provider. That does not merge the two accounts. A Grok web or app subscription does not automatically create a developer key, pay Janitor requests or move a character card into Grok. Treat provider, frontend and card as three separate layers.

RouteWhat it gives youWhat it does not give you
Grok consumer appGrok chat with consumer-plan limitsAn API key for Janitor AI
Direct xAI APIOfficial OpenAI-compatible endpoint and usage billingA free unlimited model
Third-party model gatewayOne key for several model providersThe same privacy, price or uptime as direct xAI
LumiChatHosted character discovery and managed chatJanitor AI proxy controls or xAI account access

A six-step direct xAI API setup

Create a dedicated xAI developer key and add it only to the provider control in Janitor AI. The official xAI base URL is https://api.x.ai/v1 and the Chat Completions path is /v1/chat/completions, so a field requesting the full proxy URL needs the combined endpoint shown below. Janitor AI’s labels and menus can change, and its public documentation is not always centralized; verify the live screen instead of copying coordinates from an old video. Start with one temporary adult fictional character and no private chat history.

  1. Create an API key in the xAI developer console; never paste a consumer account password.
  2. Open the current Janitor AI chat model or proxy settings.
  3. Choose the OpenAI-compatible or custom endpoint path exposed by the current interface.
  4. Enter the full Chat Completions endpoint: https://api.x.ai/v1/chat/completions.
  5. Enter an active model ID and the API key.
  6. Save, refresh the chat if required, then test a disposable fictional character.

Which Grok model should you choose?

Use an exact model ID that the xAI developer console currently exposes. xAI released grok-4.6 on August 12, 2026 with a 500K context window and lists grok-4.3 with a 1M context window. The biggest context number is not automatically the best roleplay choice: a long character definition, examples, lore and full transcript all consume input tokens and cost money. Test voice consistency, correction handling, repetition and latency on the same ten turns before committing to one model.

ModelContext listed by xAIInput / 1M tokensOutput / 1M tokensPractical note
grok-4.6500K$2.00$6.00Current frontier model; prices increase above 200K prompt tokens
grok-4.5500K$2.00$6.00Current model, but 4.6 is newer
grok-4.31M$1.25$2.50Lower listed token price and larger context

What a Janitor AI Grok chat can cost

xAI bills API input and output tokens. A consumer “free to start” allowance is not API credit. The estimates below apply the official listed base token rates and ignore cached-input discounts, tools, taxes, regional differences and requests above the 200K prompt threshold. They are examples, not a bill forecast. Read the usage object or xAI console for real cost; a long-running Janitor chat can resend a growing context, so input commonly costs more than the latest user message suggests.

Example requestgrok-4.6 estimated token chargegrok-4.3 estimated token charge
5K input + 300 outputabout $0.0118about $0.0070
20K input + 300 outputabout $0.0418about $0.0258
50K input + 500 outputabout $0.1030about $0.0638

Fix 401, 404, 429 and bad replies by layer

Debug one layer at a time. First test the endpoint and key, then the model ID, then one short request, then the character card and prompt stack. Do not solve an authentication error by adding more prompt text. Do not call a model “bad at memory” when the request never reached xAI. Also avoid public reverse proxies that ask for your xAI key without a clear operator, privacy policy and billing path. If a gateway is necessary, compare its model slug, markup, data policy and logs with direct xAI.

SymptomMost likely layerFirst check
401 / unauthorizedAPI keyCreate or copy an active xAI developer key
404 / model not foundURL or model IDVerify the full endpoint and current model slug
429 / rate limitxAI account tier or request volumeWait, reduce requests and check console limits
Blank or generic replyCard, prompt or contextTest one small card and inspect prompt conflicts
Cost climbs over timeGrowing chat contextCompare input-token usage and summarize only when needed
Works in Grok app, fails in JanitorConsumer access is not API accessVerify console billing, key and endpoint separately

Prompt and memory checks after the connection works

After connection succeeds, keep stable identity in the card, changing scene facts in Janitor AI Chat Memory, world facts in the appropriate lore layer and response behavior in the Advanced Prompt. Retest one variable at a time. If Grok writes for the user, shorten conflicting examples and add one observable player-agency rule. If cost grows, inspect context rather than deleting essential identity. If replies become repetitive, compare a fresh chat using the same card before rewriting every layer.

Direct API, a gateway or LumiChat?

Choose direct xAI when you want the official provider route, clear console billing and control over the exact model. Choose a reputable gateway only when consolidated models or payment access is worth another processor in the data path. Choose Janitor AI when card authoring and provider control are the hobby. If the desired outcome is simply to discover a hosted character and begin chatting without API keys, open the LumiChat character library. LumiChat is a separate service; it does not provide an xAI key or unlock Janitor AI features.

FAQ

Can Janitor AI use Grok?

It can use an OpenAI-compatible xAI model route when the current Janitor AI provider controls accept the endpoint, key and model ID.

What is the Grok proxy URL for Janitor AI?

The official xAI Chat Completions endpoint is https://api.x.ai/v1/chat/completions. Verify whether the current field wants the full endpoint or base URL.

Is Grok free on Janitor AI?

No blanket free claim is accurate. The xAI developer API uses token billing, separate from consumer Grok access.

Which Grok model is best for Janitor AI?

Start with grok-4.6 for the current frontier route or compare grok-4.3 for lower listed token rates and larger context. Test the same card.

Why do I get a 401 error?

The API key is missing, invalid, revoked or not accepted by the xAI developer API. Consumer login credentials are not an API key.

Why do I get a 429 error?

The account or model rate limit was reached. Check the xAI console, reduce request frequency and retry with backoff.

Does Janitor AI send my chat to xAI?

When xAI is the active model route, the prompt needed for generation is sent to xAI. Do not include secrets or unnecessary identifying information.

Can I use LumiChat instead of configuring an API?

Yes, when you prefer managed browser character chat. It is a separate platform and does not expose Janitor AI proxy controls.

Cassian Vale

Continue in LumiChat

Turn this guide into a real conversation

Browse active characters, choose a personality that fits, and start chatting in seconds.

Enter chat