Get API key

Janitor AI API Key Not Working: Step-by-Step Fix

If your Janitor AI API key is not working, the fault is nearly always in one of five fields or in the account behind the key. Work through the steps below in order and you will find it without guessing.

Updated

Chat bubble linked to a glowing key by a cable with a broken link being repaired
Chat bubbles passing through layered filter panels toward a terminal, showing where content filters sit

Step 1: confirm the key works

Take Janitor AI out of the equation. Run this in a terminal, replacing YOUR_KEY:

curl -i https://api.nofilterapi.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}]}'

A 200 status and a choices array mean the key, URL and model name are all correct. The X-Balance-USD header shows your remaining credit. If this works, skip to step 3, because the problem is in how Janitor AI is configured. If it fails, the status code tells you what to fix, and the table in step 2 matches codes to causes.

No terminal handy? Any API testing tool that can send a POST with headers does the same job.

Step 2: read the status code

Status or messageMeaningFix
401Key not acceptedRe-copy the key from the key page; remove spaces; check that the header says Bearer followed by the key
404URL path does not existUse exactly https://api.nofilterapi.com/v1/chat/completions, with no extra segments
Model errorName not recognizedSet the model to uncensored
Balance or payment errorNo credit left, or trial endedTop up from $20, or claim the trial if you have not
429 rate_limitedOver the per-minute limitWait a minute; trial 60 per minute, full key 300
429 concurrencyToo many requests at onceClose extra tabs and chats; trial 2, full key 8
429 with Retry-After: 5Temporary overloadWait five seconds and press regenerate

Failed or refused requests are not charged, so testing costs nothing. Change one thing at a time between tests. If you alter the URL, the key and the model name together and it starts working, you will not know which one was wrong, and you will make the same mistake again next time.

Step 3: enter the settings in Janitor AI

In a chat, open the API settings and choose the proxy option, which is how Janitor AI connects to your own OpenAI-compatible endpoint. Menu names move around between versions, so match by purpose. You need three values.

  1. Model name: uncensored
  2. Proxy URL: https://api.nofilterapi.com/v1/chat/completions. Janitor AI's proxy field generally expects the full endpoint rather than the base alone. If a tool of yours asks for a base URL instead, use https://api.nofilterapi.com/v1.
  3. API key: your key, pasted with no spaces before or after.

Save the settings, then reload the page. A common cause of "it still fails" is that the new values were never saved, or the chat is still using the previous connection. Start a fresh message after reloading, not a regenerate on an old failed one.

Typical mistakes, in order of frequency

  • Base URL where the full endpoint is needed. Without /chat/completions, the request hits a path that does not exist and returns 404.
  • Doubled path. Pasting /v1/chat/completions after a URL that already ends in /v1 gives /v1/v1/....
  • Another service's model name. Names such as gpt-4 do not exist here. The only ID is uncensored.
  • Key from the wrong place. Keys from other services will not work. Use the key from the API key page for this one.
  • Hidden characters. Copying from a chat app or document can add a trailing space or line break. Paste into a plain text field first, and check.
  • Extra quotes. Do not wrap the key or URL in quotation marks.

When it works once and then fails

Intermittent errors usually point to limits or balance, not to the key.

Concurrency. A trial key allows two requests at once and 60 per minute. A full key allows eight and 300. If you regenerate a reply while the previous one is still streaming, or have the character open in two tabs, you can hit concurrency. A streamed request holds its slot until the stream finishes.

Context size. The window is 100,000 tokens, prompt plus completion. Janitor AI has its own context setting, and long chats with big character cards can fill it. If replies cut off or the request errors only in long chats, lower the context setting or summarize the history.

Balance. The trial is $0.50, valid for 7 days. When it runs out or expires, requests fail until you add credit. A typical roleplay turn with 6,000 input tokens and 400 output tokens costs 6,000 / 1,000,000 x $0.15 + 400 / 1,000,000 x $0.50, which is $0.0009 plus $0.0002, or $0.0011. The trial covers about 450 turns if nothing else interferes.

Settings to adjust once it connects

After the first reply arrives, a few settings improve results and avoid new errors.

  • Max new tokens. Set a reply cap that fits the chat style, for example 300 to 600 tokens. It is optional on the API side, but a cap keeps replies from running on and keeps the output cost down at $0.50 per 1M tokens.
  • Temperature. Values around 0.7 to 1.0 suit roleplay. If replies turn incoherent, lower it. The API passes temperature, top_p, stop, seed and the repetition penalties through.
  • Context size. Match it to your needs. The window allows up to 100,000 tokens, but sending far more than the story needs only raises cost on every turn.
  • Streaming. If your replies appear all at once or the stream stalls, try toggling streaming. The API supports server-sent events.

If the character still refuses a scene, the cause is usually the character card or a system prompt written for a stricter model, not the key. Review what the card tells the model to do. The model itself is tuned to answer without content refusals for lawful adult use, with one fixed limit: nothing involving minors.

Adding credit and getting a fresh key

Open the pricing page to top up: any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. You can pay by card (Visa, Mastercard, Apple Pay, Google Pay) or crypto (USDT on TRC20, USDC on Base). Credit never expires.

No account yet? Sign up with Google, or with email and password, then claim the free trial on the API key page. It is one per person and needs no card. If you suspect your key leaked, for example you posted a screenshot, create a new one instead of debugging the old one.

Still stuck: test with a script

This script prints the real error, which is more informative than a generic message in a web interface:

from openai import OpenAI, APIStatusError

client = OpenAI(base_url="https://api.nofilterapi.com/v1", api_key="YOUR_KEY")
try:
    r = client.chat.completions.create(
        model="uncensored",
        messages=[{"role": "user", "content": "Say hello as a pirate captain."}],
    )
    print(r.choices[0].message.content)
except APIStatusError as e:
    print(e.status_code, e.response.text)
    print("request id:", e.response.headers.get("X-Request-Id"))

If this succeeds, the account is healthy and the issue is purely a Janitor AI field. If it fails, the status code maps to the table above. Keep the request ID when you write to support. The documentation lists all supported parameters. If you are curious how filtering works on Janitor AI itself, read whether Janitor AI has a filter. For more on the kind of model behind this key, see the no filter AI chatbot page. The API serves text only, and sexual content involving minors is never allowed.

Questions and answers

What proxy URL do I use in Janitor AI?

Use https://api.nofilterapi.com/v1/chat/completions if the field wants the full endpoint. A tool that asks for a base URL takes https://api.nofilterapi.com/v1.

What model name should I enter?

Enter uncensored in lowercase. It is the only model ID available.

Why do I get a 429 error?

You passed a limit. The code rate_limited means too many requests per minute, concurrency means too many at once, and a Retry-After of 5 means brief overload.

Do failed requests use 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.