EN ▾

Open-weight LLM API with zero content filters.

Janitor AI API Key: How to Set Up via Proxy

To use the Janitor AI API key from another service, Janitor AI needs three pieces of data: the endpoint address, the API key, and the model name. Here is the setup order and fixes for common errors.

Cost Analysis and Trade-offs of Using an Uncensored AI

Updated

Small theater stage with masks and glowing speech balloons connected to a server, Janitor AI theme

Key points

  1. Three fields: endpoint address, API key, and uncensored model name.

  2. Test the key with curl first to know if the problem is with the key or the Janitor AI settings.

  3. 404 error is usually a wrong address, 401 is a wrong key, 429 is too many requests.

  4. A larger context window makes each message more expensive, so limit it according to your needs.

Summary: three values to fill in

Janitor AI provides an option to connect your own model source via an OpenAI-compatible endpoint. So, for the Janitor AI API key from this service, you just need to fill in three values:

  • Endpoint address: https://api.apitanpasensor.com/v1/chat/completions
  • API key: your key from the API key page
  • Model name: uncensored

The column names and menu layout in Janitor AI may change, so this article explains the settings in general. If the interface differs from what you see, follow the official Janitor AI guide for that section, then return to the three values above.

Step 1: get the key and test with curl

Before touching Janitor AI, make sure your key works. This way, if you get an error later, you know the problem is not with the key. New users can claim $0.50 free trial credit on the API key page without a card required, enough for a few hundred test messages.

curl https://api.apitanpasensor.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "Kamu adalah karakter fiksi bernama Laras, seorang penjaga mercusuar."},
      {"role": "user", "content": "Selamat malam, boleh saya masuk?"}
    ],
    "max_tokens": 200
  }'

If you receive JSON with an answer in choices[0].message.content, the key and model are correct. Also check the X-Balance-USD header to see the remaining balance.

Step 2: fill in proxy settings in Janitor AI

In Janitor AI, model settings are usually in the API settings menu on the chat screen. Look for the option to use a proxy or custom model source, then fill it in like this:

  1. Select the proxy or custom API option, not the built-in model.
  2. Enter the proxy address as https://api.apitanpasensor.com/v1/chat/completions. Many community guides say this field needs the full address up to the chat completions section. If the connection fails, try with and without that ending part.
  3. Paste your API key into the key field.
  4. Enter the model name as uncensored. The letters must match exactly.
  5. Save settings, then reload the page and send a test message.

Do not put the word "Bearer" in the key field. OpenAI-compatible apps add it themselves, and adding it twice causes an authentication error.

If you are unsure about a step, open the Janitor AI documentation. The settings there are the most up-to-date reference for its interface. For the API side, the reference is in our documentation.

Common errors and how to fix them

SymptomMost likely causeFix
401 error or authentication failedKey is wrong, cut off, or has spaces at the start or endCopy the key again, make sure it has no "Bearer" word, then test again with curl
404 errorWrong endpoint URL, for example a typo or missing /v1 partUse the exact address above and try variations with or without /chat/completions
Model errorModel name mismatchWrite uncensored, all lowercase
Error 429 with code concurrencyToo many parallel requestsClose other chat tabs that are still generating responses
Error 429 with code rate_limitedExceeded requests per minute limitWait a moment, then resend
Response stopped or failed completelyBalance depleted or context too largeCheck balance via X-Balance-USD header or GET /v1/balance, and reduce context size

For trial keys, the limit is 2 parallel requests and 60 per minute. For full keys, it is 8 parallel requests and 300 per minute. When the API is busy, it may also return 429 with the Retry-After: 5 header, meaning try again in five seconds. One still-streaming response still occupies one slot until it finishes.

If all steps are correct but it still fails, send the request ID from the X-Request-Id header to Support for faster tracing.

If the response is slow or interrupted

Some issues are not caused by the key, but by how the chat is running. Check the following in order:

  • Multiple active tabs: each streaming response uses one parallel request slot. With a trial key there are only 2 slots, so three tabs at once easily trigger 429.
  • Response too long: long responses do take more time. Limit response length in Janitor AI settings.
  • Context too large: very long prompts make the initial response slower and the bill higher.
  • Your network: try running curl from the same computer. If curl works but Janitor AI does not, the issue is in Janitor AI settings, not the API.

If retrying often succeeds, this is usually a symptom of a temporary limit or congestion. Wait a few seconds and resend the message; do not press send multiple times because each attempt uses a slot.

Configuring context and cost per message

Every time you send a message, Janitor AI sends part of the chat history to the API. The larger the context you allow, the more input tokens are billed. The maximum context window here is 100,000 tokens (prompt plus response), but almost no chat needs that much.

Example calculation with a rate of $0.15 per 1 million input tokens and $0.50 per 1 million output tokens:

  • Context 8,000 tokens and response 400 tokens: 8,000 x 0.15 / 1,000,000 = $0.0012, plus 400 x 0.50 / 1,000,000 = $0.0002. So $0.0014 per message.
  • One hundred such messages: 100 x $0.0014 = $0.14.
  • With a context of 2,000 tokens and the same response, the cost is $0.0003 + $0.0002 = $0.0005 per message, or $0.05 for one hundred messages.

For characters with a long backstory, a medium context size (a few thousand tokens) is usually sufficient. Increase only when the character starts forgetting important details. A more detailed cost discussion is on the pricing page.

Useful generation settings

The API passes standard sampling parameters, so settings in Janitor AI will reach the model: temperature, top_p, stop, seed, and repetition penalty. Some initial tips:

  • Temperature: start from a medium value. Increase slightly if the response feels stiff, decrease if the character starts rambling.
  • Repetition penalty: increase slightly if the model repeats the same phrase in every response.
  • Response length: limit with max tokens if the response is too long. This setting also helps costs, because output tokens are more expensive.
  • Seed: useful if you want to reproduce the same result when testing character prompts.

Change one setting at a time, then compare several responses. Changing three things at once makes it hard to know which one had an effect.

Character description, dialogue examples, and opening message are resent with almost every message, so their length directly affects cost. A character with a 3,000-token description adds 3,000 x 0.15 / 1,000,000 = $0.00045 to each message. For one thousand messages that is $0.45, a small amount, but you can save money by writing more concisely.

  • Write facts that are actually used in the story: name, traits, relationships, and world rules. Remove background paragraphs that never appear.
  • Use short, concrete sentences. The model grasps "Laras is quiet, knows ship names, fears storms" better than three paragraphs of metaphor.
  • Give one or two dialogue examples that show speech style, not ten.
  • Write story boundaries at the start, such as genre and point of view, so the model does not drift.

Simple testing method: create a short and a long version of the same character, send five identical messages to both, then compare responses and usage figures. Often the short version feels just as good.

Content and limits in effect

The models here are set to answer without content rejection for lawful adult use, such as fiction, roleplay, and companion apps for adults. However, there is a hard limit: sexual content involving minors is prohibited without exception, regardless of the story packaging.

This service is text-only. If a character card in Janitor AI uses images, those images are not generated by this API. Regarding data, your prompts are not used to train the model, as explained on the privacy page.

Other guides

Frequently asked questions

Do I need a card to try?

No. New users can claim a $0.50 trial credit with one click on the API key page, no card needed. The credit is valid for 7 days.

What model name should I fill in on Janitor AI?

Enter uncensored, exactly like that. There is only one model, so there are no other choices in the list.

Why do I get a 404 error after entering the address?

Usually the address doesn't match. Use https://api.apitanpasensor.com/v1/chat/completions, or try without the chat/completions part if Janitor AI adds it automatically.

What does error 429 mean?

You exceeded the limit. The concurrency code means too many parallel requests, rate_limited means too many per minute. Wait a moment and try again.

How do I pay after the free trial credit runs out?

Top-up starts from $20 up to $500 with USDT on TRC20 or USDC on Base. Credit never expires.

Your key only requires one step

Create an account, copy your key, change the Base URL. That's it for the setup process.