EN ▾
Get API key

Janitor AI API Network Error: Causes and Fixes

A Janitor AI API network error with a custom OpenAI-compatible proxy almost always comes from one of five things: the URL, the key, the model name, a limit, or the context size. This page walks through them in the order that finds the fault fastest.

Two cubes joined by a cable with a broken segment being repaired, illustrating a connection error fix
Stream of glowing particles flowing from a key through a cloud node and back as chat bubbles

Updated

Key points

  • Test the endpoint with curl first; if curl works, the fault is in the settings, not the service.
  • Use the full chat completions URL, the exact model ID uncensored, and the key with no spaces.
  • A 429 means a limit: too many requests per minute, too many at once, or a brief overload.
  • Keep the context setting below the 100,000-token window, and lower still to save credit.

Step 0: find out which side is broken

"Network error" is a generic message. It tells you the app got no usable answer, not why. Before changing settings at random, send the same request yourself from a terminal. If it works there, the endpoint and your key are fine and the problem is in what Janitor sends. If it fails, you can read the real error code.

curl -i https://api.unrestrictedaimodels.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello."}],"max_tokens":20}'

Look at the first line of the output. A 200 and a JSON reply mean the service works. Any other number points to a section below. The -i flag also shows headers, including X-Balance-USD, which is your remaining credit. If you prefer clicking, the docs list the same request format.

Check the three fields you typed

In Janitor AI's API settings you choose a proxy or custom API option and fill in a few fields. Menu names change between versions, so match by meaning rather than by label.

FieldCorrect valueCommon mistake
Proxy / API URLhttps://api.unrestrictedaimodels.com/v1/chat/completionsOnly the base /v1, a missing https://, or a trailing space
API keyThe key from your dashboard, pasted as isExtra spaces, a line break, or the word "Bearer" typed in the key box
Model nameuncensoredTyping a name such as gpt-4 or a vendor model

Janitor usually wants the full chat completions URL in the proxy field, while other apps such as SillyTavern want only the base URL. If the field hint shows an example ending in /chat/completions, follow it. The base URL is https://api.unrestrictedaimodels.com/v1 and the path is added to it.

The model is not a router across vendors. There is one model, and its ID is uncensored. Any other name is the wrong value. Read the comparison of SillyTavern and Janitor AI if you want to see how the two apps differ in setup.

Read the status code

If curl returned something other than 200, use this table.

StatusMeaningFix
401Key missing or wrongCopy the key again from your dashboard. Check for a trailing space.
404Wrong pathCompare the URL to the one in the table above, character by character
400Bad request bodyUsually a wrong field in the request; check the model name and context settings
429A limit was reachedSee the next section
Connection error, no statusHost name typed wrong, or a network blockCheck spelling; try another network or turn off VPN and ad blockers

Failed requests are not charged, so retrying while you debug costs nothing. If you get a 200 in curl but Janitor still shows an error, go on to the context and limit sections.

429: rate limits and concurrency

HTTP 429 comes in three forms here. The body contains an error code that tells you which:

  • rate_limited: more than the allowed requests per minute. A full key allows 300; a trial key allows 60.
  • concurrency: too many requests at the same time. A full key allows 8; a trial key allows 2.
  • Temporary overload: a 429 with a Retry-After: 5 header. Wait five seconds and try again.

Roleplay apps trigger the concurrency limit more easily than you would think. Pressing regenerate quickly, having the chat open in two tabs, or running a second chat on your phone each opens another request. A streamed reply holds its slot until it finishes. On a trial key, two slots fill fast, so one stuck reply plus one regenerate is enough to cause an error. Wait a few seconds, close extra tabs, and try again.

If every call fails with 429 immediately and you are sure nothing else is running, make sure the same key is not also used in another app, a script or a friend's setup.

Context size: the quiet cause

Janitor builds the prompt from the character card, your persona, the chat history and the memory notes, up to a context size you set. This API accepts 100,000 tokens for prompt plus reply together. If the context setting is higher than that, or if you set a reply length so large that the total passes the window, the request can fail.

Set the context to something like 16,000 to 32,000 tokens and the reply length to a few hundred, and test again. Longer is not automatically better: the model sees more history, but every message resends all of it, and you pay for it.

A quick calculation. With 20,000 tokens of context and a 300-token reply, one message costs 20,000 x 0.15 / 1,000,000 + 300 x 0.50 / 1,000,000 = $0.003 + $0.00015 = $0.00315. A $20 top-up pays for about 6,300 messages at that size. At 8,000 tokens of context the same message costs $0.00135, which is more than twice as many messages per dollar. See the pricing page for rates and bonuses.

A starting set of safe settings

When you are not sure what is wrong, reset to a plain configuration, confirm it works, and then raise one setting at a time. That way the setting that breaks things shows itself.

  • Context size: 16,000 tokens.
  • Max reply length: 300 to 500 tokens.
  • Temperature: 0.8. Values above 1.2 give odd text, not network errors, but they are a common source of confusion.
  • Streaming: if the app has the option, try it both on and off. A proxy or ad blocker that breaks event streams will make the on setting fail while the off setting works.
  • Custom prompt or jailbreak box: leave empty for the test. A very long pasted prompt can eat most of the context before the chat history is added.

Keep a note of which change fixed it. Errors in roleplay apps tend to come back after an update or a new character card, and a written list of working values saves you from repeating this whole process. Never share your key in screenshots when you ask for help in a community, and replace it if you do.

Once a short message gets a reply, paste your real character card and persona back in. If the error returns at that point, the card or the memory notes are too large for the context you chose.

Balance, key status and other checks

If the key is correct and the URL is right but requests still fail, look at your account.

  1. Check the credit: curl https://api.unrestrictedaimodels.com/v1/balance -H "Authorization: Bearer YOUR_KEY". A balance of zero means the next top-up is due. Credit never expires, so unused money stays.
  2. Check that the trial credit has not run out. It is $0.50, valid for 7 days.
  3. Open the app in a private window with extensions off. Ad blockers and privacy extensions sometimes block calls to unfamiliar API hosts.
  4. Try a different device or network. A school, work or hotel network can block unfamiliar hosts, and a mobile hotspot is a fast way to rule that out.
  5. Save the X-Request-Id header from a failing curl call. If you contact support, that ID lets them find the exact request.

Payments work by crypto (USDT on TRC20, USDC on Base), from $20. If you have not made a key yet, create one here. For a general overview of chat setups with this model, see the chatbot guide.

Questions and answers

What URL do I put in Janitor AI's proxy field?

Use https://api.unrestrictedaimodels.com/v1/chat/completions. If the app asks only for a base URL, use https://api.unrestrictedaimodels.com/v1.

Which model name should I enter?

The model ID is uncensored. There is a single model, so other names will fail.

The test works in curl but Janitor shows an error. What now?

Lower the context size, set a modest reply length, close duplicate tabs, and try a private window without extensions. Then check the key for stray spaces.

Does a failed request use up my credit?

No. Failed or refused requests are not charged.

Your key is one form away

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

Get API key