Janitor AI integration

Janitor AI proxy setup with Plan2API

Janitor AI works with Plan2API as a proxy in 3 steps: open API Settings in a chat, add a Proxy configuration with the full URL https://api.plan2api.com/v1/chat/completions, a Model Name such as claude/claude-sonnet-5 and your p2a_ key, then save and refresh the page. The Free plan covers 50 requests a day.

Proxy URL ends with
/v1/chat/completions
Model Name example
claude/claude-sonnet-5
API key prefix
p2a_
Free plan
50 requests a day

Updated

Janitor AI proxy settings at a glance

When you set up a Janitor AI custom proxy, the configuration form asks for five fields. The table below shows each field and the exact value to enter.

The Proxy URL must be the full https://api.plan2api.com/v1/chat/completions URL, because a URL that stops at /v1 fails.

Janitor AI proxy configuration for Plan2API
FieldWhat to enter
Config NameAny label, for example Plan2API
Model Nameclaude/claude-sonnet-5 or another exact id
Proxy URLhttps://api.plan2api.com/v1/chat/completions
API KeyYour p2a_ key, no spaces before or after
Custom PromptLeave blank at first

Add Plan2API as a proxy in Janitor AI

  1. Sign up at Plan2API with a Google account, connect a Claude, ChatGPT, Google AI or Kimi subscription, and copy your p2a_ API key.
  2. Open any chat in Janitor AI.
  3. Click the gear icon at the top right of the chat and open API Settings (some Janitor AI versions show a menu icon at the top right instead of a gear).
  4. Select Proxy and click Add Configuration.
  5. Fill in the five fields from the table above, pasting the Model Name and API Key with no extra spaces.
  6. Click Add, then click Save Settings.
  7. Refresh the whole page (F5 on a computer, or pull down on a phone), because Janitor AI only picks up a new proxy after a page refresh.
  8. Send a short test message in the chat.

Once active, the proxy replaces Janitor AI's free default JanitorLLM (JLLM) model and sends your chats to the external model instead.

Pick a model name

The prefix in the Model Name tells the API which connected subscription to route your chat through:

  • claude/claude-sonnet-5: needs a Claude Pro or Max subscription and has a 1M-token context window with up to 128K output tokens.
  • claude/claude-opus-5-5: needs a Claude Pro or Max subscription and gives you a 1M-token context window with up to 128K output tokens (the anthropic/ prefix and dotted names like claude-opus-5.5 work too).
  • gemini/gemini-3.8-flash-high: runs through a Google AI Pro or Ultra subscription and has a 1,048,576-token context window.
  • kimi/k3: needs a Kimi Code membership and has a 1,048,576-token context window (it starts on the 256K window and moves to the 1M window when a conversation passes about 192K tokens).
  • openai/gpt-6.1-sol: uses a ChatGPT plan through Codex, so pick a Codex model your ChatGPT plan includes (codex/<model> works too).

Janitor AI's guides say to copy-paste the Model Name exactly, so paste it without typos, or query GET /v1/models to list every valid id your key can use.

Test your key outside Janitor AI

Run the curl request below in a terminal with your p2a_ key stored in the PLAN2API_KEY environment variable and the exact same model id you typed into Janitor AI. If the command returns a reply, your key, model id and connected subscription all work, and any remaining issue is in your Janitor AI configuration. Getting an HTTP 401 invalid_api_key error here means the key itself is missing or wrong.

curl
curl https://api.plan2api.com/v1/chat/completions \
  -H "Authorization: Bearer $PLAN2API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude/claude-sonnet-5",
    "messages": [{"role": "user", "content": "Say hi in five words."}]
  }'

What works and what doesn't

  • Janitor AI sends proxy requests directly from your browser tab, and they work without an extra proxy because Plan2API sends Access-Control-Allow-Origin: * CORS headers.
  • Janitor AI's Temperature setting only takes effect on Gemini models, because Claude and Codex models ignore temperature and top_p while Kimi fixes temperature at 1 and top_p at 0.95.
  • Every reply you generate counts as one request, so the Free plan's 50 chat requests a day go quickly during a long chat.
  • Each provider's own content filters still apply, and an empty reply (pgshag2) or a reply cut off mid-sentence usually means a content filter, most often on Gemini models.
  • One p2a_ key can hold several connected subscriptions across different providers, so switching from Claude to Gemini or Kimi only takes changing the Model Name field.
  • Plan2API adds no token quota of its own, though your underlying subscription's usage limits still apply.

Fix Janitor AI proxy errors

Before troubleshooting specific error codes, run through Janitor AI's Fix-It First routine:

  1. Open your proxy configuration and check that it says Active (if it doesn't, click it to activate).
  2. Click Save Settings even if you didn't change anything.
  3. Refresh the entire Janitor AI page.
  4. Re-open the configuration and click Test.

If the chat still fails after a reload, match what you see on screen to the symptom and fix in the table below.

On a desktop browser, right-click in the bot chat, click Inspect Element, open the Network tab, send a message, and click the /completions, /proxy or /generateAlpha entry to read the real error in its Response tab.

Janitor AI proxy errors with Plan2API
SymptomLikely causeFix
Failed to fetchNo refresh, bad URL or an extensionRefresh, re-paste the URL, try a private window
Every message fails after setupProxy URL stops at /v1Use the full /v1/chat/completions URL
401 invalid_api_keyWrong or partial keyRe-copy the p2a_ key
403 no_credentialsNo subscription for that providerConnect it or change the model
400 model_not_foundTypo in Model NameCopy an id from GET /v1/models
non ISO-8859-1 code pointHidden character in the keyRetype the key by hand
429 daily_requests51st request on the Free planWait for 00:00 UTC or upgrade
pgshag2 or an empty replyProvider content filterReword, or switch bot or model

Use your Claude or ChatGPT plan in Janitor AI

Plan2API turns a Claude Pro or Max, ChatGPT, Google AI Pro or Ultra, or Kimi subscription you already pay for into one OpenAI-compatible p2a_ key. You keep paying your provider for your subscription, and Plan2API never bills per token.

Your subscription's own usage limits apply alongside your plan's request limits. If you connect more than one account from the same provider, a request that hits a limit moves to the next connected account before any output is sent.

  • Free: $0, 1 connected subscription, 50 chat requests a day (resets at 00:00 UTC), 1 request per second with bursts up to 20, 4 requests at once, no card needed.
  • Pro: $12 a month or $99 a year (about $8.25 a month, 31% less than monthly), 3 connected subscriptions, no daily request cap, 10 requests per second with bursts up to 600, 16 requests at once.
  • Scale: $29 a month or $249 a year (about $20.75 a month, 28% less), 25 connected subscriptions, no daily request cap, 10 requests per second with bursts up to 600, 32 requests at once; see pricing for full details.

Use the AI subscriptions you already pay for as one OpenAI-compatible API key.

  • Free: 1 subscription, 50 requests a day, no card
  • Pro: $12 a month

FAQ

What proxy URL do I use for Plan2API in Janitor AI?

Enter https://api.plan2api.com/v1/chat/completions as the Janitor AI proxy URL. Janitor AI needs the full chat completions endpoint URL, so a URL that stops at /v1 fails.

Can I use my Claude Pro subscription on Janitor AI?

Yes. Connect your Claude Pro or Max account to Plan2API and set the Model Name to claude/claude-sonnet-5 or another Claude model id. Your Claude subscription's own usage limits apply.

Why does Janitor AI say Failed to fetch?

Failed to fetch (or NetworkError when attempting to fetch resource in Firefox and Load failed in Safari) means the browser got no usable answer from the request. Usually you haven't refreshed the page after saving the proxy, the Proxy URL has a typo or a stray space, or an ad blocker or privacy extension blocked the call (try once in a private window to rule out extensions). Plan2API sends CORS headers for browser requests, so CORS isn't the cause.

Do I have to refresh Janitor AI after changing the proxy?

Yes. Click Save Settings and then reload the entire Janitor AI tab (F5 on desktop or pull down on mobile), because Janitor AI only loads a new proxy configuration after a page refresh.

Does Janitor AI's temperature setting work with Plan2API?

It works only on Gemini models, which pass temperature and top_p through. Claude and Codex models ignore temperature and top_p, and Kimi fixes temperature at 1 and top_p at 0.95.

Sources

  1. Janitor AI help: TL;DR quickstart proxy instructionshelp.janitorai.com
  2. Janitor AI help: beginner's guide to proxies, part twohelp.janitorai.com
  3. Janitor AI help: OpenRouter error guidehelp.janitorai.com
  4. Janitor AI help: a guide to DevToolshelp.janitorai.com
  5. UnsavedAI: Failed to fetch in JanitorAIunsavedai.com
  6. LiteRouter: Janitor AI setup and errorsdocs.literouter.com
  7. WanAPIs: JanitorAI proxy setupwanapi.ai
  8. Janitor AI help: beginner's guide to proxies, part onehelp.janitorai.com