EN ▾
Get API key

Janitor AI How to Integrate a Custom API

Janitor AI how to integrate your own model comes down to three values: a proxy URL, an API key and a model name. This guide shows what to enter, how to test it, and how to fix the errors people hit most often.

A cable plugging a chat window into a server stack, illustrating a custom API connection for a roleplay chat site

Updated:

What you need before you start

Janitor AI is a character chat site that lets you plug in your own model instead of using its built-in one. The site calls the external service for every message, so you need an endpoint that speaks the OpenAI chat completions format. This service does, and it accepts any client that can set a base URL and a bearer key.

Prepare three values first.

  • Base URL: https://api.unfilteredgrok.com/v1
  • Model: uncensored
  • Key: created on the API key page after you sign up with Google or with email and password.

New users can claim $0.50 of trial credit with one click on that page. It needs no payment method, lasts 7 days and is limited to one per person. That is enough to run a few hundred test messages before deciding whether to top up.

The service is text only and runs one open-weight model from an independent provider. It is not the official API of any larger vendor, and it is tuned to answer without content refusals for lawful adult use. Sexual content involving minors is never allowed.

Test the key outside Janitor first

Most failed integrations are really bad keys or typos in a URL, and the chat site gives vague errors. A one-line test removes that doubt before you touch any settings. Run this in a terminal.

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

A JSON response with a choices array means the key works. You can also check GET /v1/models with the same header, and read the X-Balance-USD response header to see how much credit remains. If you get a 401 here, the key is wrong or has a stray space. Fix that before moving on.

Setting it up in Janitor AI

Menu names change as the site updates, so treat the labels below as a guide and look for the equivalent in your current interface. The flow is the same each time.

  1. Open a chat with any character, then open the chat settings (the menu inside the chat window, not the account page).
  2. Find the API selection and choose the option for a proxy or a custom OpenAI-compatible API. Some versions label it as a proxy, others as an OpenAI-style custom endpoint.
  3. In the model field, type uncensored.
  4. In the URL field, paste the endpoint. Many users report that Janitor expects the full chat path, so use https://api.unfilteredgrok.com/v1/chat/completions. If the interface asks only for a base URL, use https://api.unfilteredgrok.com/v1 instead.
  5. Paste your key into the key field.
  6. Save the settings, reload the chat page, and send a short message.

Reloading matters. Settings sometimes apply only to a fresh page load, and a stale session will keep calling the previous model. If the character replies, the integration works.

Starting values for generation settings

Janitor exposes sampling controls. Good starting points for roleplay are a temperature around 0.8 to 1.0, top_p near 0.95, and a response length cap of a few hundred tokens. This service passes temperature, top_p, stop, seed and the penalties through, so changes you make there take effect. If the model repeats itself, nudge the frequency or presence penalty up a little rather than raising temperature all the way.

Fixing the common errors

Here is what the usual failures mean and how to deal with them.

SymptomLikely causeFix
Network error or 404URL points at the wrong pathSwitch between the base URL and the full /chat/completions URL
401 or unauthorizedKey mistyped or pasted with a spaceRe-copy the key and test it with curl
Model not foundModel name differs from uncensoredUse exactly uncensored, lowercase
429 rate_limitedMore than 60 requests a minute on a trial keyWait a few seconds, avoid rapid rerolls
429 concurrencyMore than 2 requests at once on a trial keyClose extra tabs using the same key
429 with a short waitTemporary overloadRetry after about 5 seconds

A trial key allows 2 concurrent requests and 60 per minute. A full key allows 8 concurrent requests and 300 per minute. If you run Janitor in two browser windows and spam the reroll button, you can reach the trial limits quickly. Failed requests are not charged, so retries cost nothing.

If the character answers but the reply cuts off mid-sentence, raise the maximum response length in the generation settings. Remember the context window is 100,000 tokens in total, prompt plus completion, so very long chats still fit comfortably.

Prompting for better roleplay

A model with no refusal behaviour does not mean you can skip prompt craft. The character definition is your system prompt, so the better it is written, the better the output. Keep the persona, setting and speech style in a few short paragraphs rather than a wall of text, because every token of that text is sent again with each message and billed as input.

Three habits improve results. State the format you want, such as third person, past tense, two paragraphs per reply. Put the hard boundaries of the story in the character definition itself, because the model follows them. And trim old chat history when you start a new scene, so the model is not carrying details that no longer matter.

All characters in your scenes must be adults. Content involving minors is blocked as a hard limit, and the service is for lawful adult use only. If a story drifts somewhere you did not intend, add a line to the definition that steers it back.

What a roleplay session costs

The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Janitor resends the character definition and recent history on each turn, so input dominates. Assume a turn sends 6,000 tokens and the model replies with 250.

  • Input: 6,000 x $0.15 / 1,000,000 = $0.0009
  • Output: 250 x $0.50 / 1,000,000 = $0.000125
  • Per turn: $0.001025

So 100 turns cost about $0.10. The $0.50 trial credit covers roughly 487 turns of that size, and a $20 top-up covers about 19,500. Credit never expires and nothing renews automatically, so you pay only when you chat. Top-ups accept any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200, in USDT on TRC20 or USDC on Base. See the pricing page for the current numbers.

The cheapest saving is a shorter character definition. Cutting 1,000 tokens from it saves $0.00015 every turn, which adds up over thousands of messages.

Checking that your own model is answering

After saving the settings it is worth proving that the replies really come from this endpoint and not from a previous configuration. There are two easy checks. The first is the balance. Every response carries an X-Balance-USD header, and you can read it with the curl test above. Send a few messages in Janitor, run the curl again, and the number should have dropped by a fraction of a cent per turn. If it has not moved, the chat is still using a different model.

The second check is behavioural. Ask the character to do something your old model refused. If you now get a scene instead of a refusal, the switch worked. You can also include a harmless instruction such as "end every reply with the word done" in the character definition and watch whether it follows it.

If you share a key between several apps, remember that all of them draw from the same credit and the same concurrency allowance. Giving each app its own key is not required, but it makes the balance easier to read.

Using the same endpoint elsewhere

Once the key works in Janitor, the same three values work in any tool with a custom OpenAI endpoint, and in your own code. The docs page lists the supported parameters, streaming, tool calling and JSON mode. Prompts are not used for training, which is worth knowing if your chats are private.

Questions and answers

Which URL do I paste into Janitor AI?

Start with the full path https://api.unfilteredgrok.com/v1/chat/completions. If the interface asks for a base URL only, use https://api.unfilteredgrok.com/v1.

What model name should I enter?

Enter uncensored in lowercase. It is the only model ID, and any other name returns a model not found error.

Why do I get a 429 error?

You passed a limit. A trial key allows 2 concurrent requests and 60 per minute. Wait a few seconds and retry, or top up to get a full key with 8 concurrent and 300 per minute.

Do I need to pay to try it?

No. Claim the $0.50 trial credit with one click on the API key page after sign-up. It needs no payment method and is valid for 7 days.

Start with trial credit

Email and password, key on screen right away.

Get API key