EN ▾
Get API key

API Settings for Janitor AI: Custom Endpoint Setup

The api settings janitor ai asks for are three values: an endpoint URL, a key and a model name. Here is what to put in each field for an OpenAI-compatible uncensored API, how to test it first, and what a long chat costs.

Updated

Three glowing settings slabs linked by a cable to a chat bubble, picturing endpoint, key and model fields

Key points

  • Janitor AI needs a proxy or custom endpoint, a key and a model name. Use the base URL, your key and the model ID uncensored.
  • Test the key with curl before touching Janitor AI, so you know whether a failure is the API or the settings.
  • A message with a large context costs a fraction of a cent: about $0.002 at 12,000 input and 400 output tokens.
  • Errors with code rate_limited or concurrency are HTTP 429 and clear on their own once you slow down.

What Janitor AI needs from an API

Janitor AI is a character chat front end. It builds the prompt (character definition text, persona, chat history), sends it to a language model, and shows the reply. The model itself can be the one built into the site or one you point it at. When you pick the custom route, the settings screen wants the same three things any OpenAI client wants.

  • An endpoint. The address of the API. Janitor AI usually calls this a proxy URL or a custom API URL.
  • A key. The secret sent as Authorization: Bearer <key>.
  • A model name. A string the server uses to pick the model.

Menu labels and the exact place of these fields change from time to time, so look for the option that mentions a proxy, a custom endpoint or an OpenAI-compatible API. Everything below is about the values, which stay the same wherever the field sits.

Our API is OpenAI-compatible, which is why it fits. It exposes POST /v1/chat/completions and GET /v1/models, accepts a Bearer key, and serves a single model, uncensored. It is an open-weight model run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the official API of any big vendor, and it is text only.

The values to enter

Create your key on the API key page first. Then fill the Janitor AI fields like this:

Field in Janitor AIValue
Proxy / API URLhttps://api.uncensoredstory.cc/v1/chat/completions
API keythe key from your account
Model nameuncensored

The URL is the one part people get wrong. Some clients want only the base URL and add the path themselves. Janitor AI's proxy field has generally wanted the full chat completions address. If the first attempt returns a 404 or a "not found" message, switch to the other form. The base URL is https://api.uncensoredstory.cc/v1, and the full address is that plus /chat/completions.

Two small traps. Paste the key without spaces or a trailing newline, and do not type the word Bearer into the key field, because the client adds it. And keep the model name lowercase, exactly as shown. The server serves one model, so there is nothing else to choose.

Test the endpoint with curl first

A chat front end hides the real error behind a generic "something went wrong" banner. A thirty-second test from a terminal tells you whether the key, the URL and the balance are fine before you debug anything inside Janitor AI.

curl https://api.uncensoredstory.cc/v1/chat/completions   -H "Authorization: Bearer $API_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "You are Mara, a dry-witted ship engineer."},
      {"role": "user", "content": "Status report?"}
    ],
    "max_tokens": 120
  }'

A JSON reply with a choices array means the endpoint works. You can also list models with GET /v1/models; the response should show uncensored. The response headers include X-Balance-USD, which is a quick way to see what credit is left, and X-Request-Id, which is what you quote if you contact support.

If curl works and Janitor AI does not, the problem is in the field values, most often the URL form described above. If curl fails, read the status code: 401 is a bad or missing key, and 429 is a limit (more on that below).

Generation settings that matter for roleplay

Janitor AI exposes a few sampling controls next to the endpoint fields. The API passes temperature, top_p, stop, seed and the frequency and presence penalties through to the model, so these sliders do what you expect. Start from a calm baseline and move one thing at a time.

  • Temperature. Around 0.8 to 1.0 gives varied prose. If characters start to ramble or contradict the character definition, lower it to 0.7.
  • Top_p. Leave it near 0.9 to 1.0 and tune temperature instead. Changing both at once makes it hard to see which one helped.
  • Max tokens. Optional on our side. Set a ceiling (300 to 600) if you want short replies, or leave it empty and let the character write as much as the scene calls for.
  • Penalties. Small positive frequency or presence penalties, such as 0.2 to 0.5, reduce the looping phrases that show up in long chats. Large values make the text odd.

The context size is the other setting that decides quality. The window is 100,000 tokens for prompt plus completion, which is far larger than a typical chat needs. If Janitor AI offers a context limit field, a value in the tens of thousands keeps the whole character definition and a long history in view. A bigger context costs more per message, as the next section shows, so raise it because a story needs the memory, not by default.

What a roleplay message costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit. Every message in a chat resends the whole prompt, so input tokens dominate. Take a long-running chat with a 12,000-token prompt and a 400-token reply:

  • Input: 12,000 x $0.15 / 1,000,000 = $0.0018
  • Output: 400 x $0.50 / 1,000,000 = $0.0002
  • Total per message: $0.0020

A thousand messages like that cost $2.00, and the $0.50 trial credit covers about 250 of them. With a shorter 6,000-token prompt and a 300-token reply, a message costs $0.0009 + $0.00015 = $0.00105, so a thousand come to $1.05. Failed or refused requests are not charged.

Top-ups are any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. Payment is by crypto (USDT on TRC20, USDC on Base). Credit never expires, so a $20 balance can sit unused for as long as you like. The pricing page has the current table.

Fixing common errors

401 or "invalid key"

The key was pasted with a space, a quote mark or a missing character. Copy it again from the key page and test with curl.

429 with rate_limited or concurrency

A full key allows 300 requests per minute and 8 at once. A trial key allows 60 per minute and 2 at once. The error code tells you which limit you hit: rate_limited is requests per minute, concurrency is too many requests in flight. A streamed reply holds its slot until the stream ends, so rapid regenerate clicks on a trial key can hit the limit of 2. Wait a few seconds and retry. During temporary overload the API also returns 429 with a Retry-After: 5 header, which means exactly what it says.

404 or "model not found"

Either the URL form is wrong (see above) or the model name is not uncensored.

Replies cut off or empty

Check that max tokens is not set very low. If a reply stops mid sentence, raise it. An empty reply on a very long chat is worth checking against the window: prompt plus completion must fit in 100,000 tokens, and the body limit is 8 MB.

Balance reached zero

Requests will fail once credit runs out. The X-Balance-USD header shows what remains, and you can top up from your account at any time.

Who this setup is for

It suits adults who write fiction and character chats and want to pay for what they use instead of a monthly plan. The content rule is simple: lawful adult use only, and sexual content involving minors is never allowed. Prompts are not used for training.

It is not a fit if you need images, voice, embeddings or fine-tuning, because the service is text only. If you want to go beyond Janitor AI and call the API from your own scripts, the quickstart docs show the same call in Python and Node, and the checklist for uncensored model APIs lists what to compare before you pay anyone.

Questions and answers

What do I enter as the model name?

Enter uncensored, in lowercase. The API serves one model, so there is no list to pick from.

Should the URL end in /v1 or /v1/chat/completions?

Janitor AI's proxy field has generally wanted the full address, https://api.uncensoredstory.cc/v1/chat/completions. If you get a not found error, try the base URL https://api.uncensoredstory.cc/v1 instead.

Does the trial key work in Janitor AI?

Yes, it is a normal key with lower limits: 2 concurrent requests and 60 requests per minute. You claim $0.50 with one click on the API key page after sign-up, and it is valid for 7 days.

Why do I get 429 errors when I regenerate quickly?

Streamed requests keep their concurrency slot until the stream ends, so several quick regenerations can pass the limit. Wait a few seconds between attempts.

Is there a monthly fee?

No. You pay per token from prepaid credit, and the credit does not expire.

Your key is one form away

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