How to Use OpenRouter on Janitor AI: Proxy Setup
Here is how to use openrouter on janitor ai, and how to swap in a different OpenAI-compatible endpoint the same way. Janitor AI lets you point a chat at an outside proxy, so any server that speaks the OpenAI chat completions format can supply the replies.

Key points
- Janitor AI's API settings accept a proxy URL, a key and a model name, which is all an OpenAI-compatible service needs.
- For this API use https://api.openrouternsfw.com/v1, your key, and the model name uncensored.
- Some versions want the full chat completions URL; test it with curl so you know which form works.
- A roleplay message with a long history costs about $0.00135, roughly $1.35 per 1,000 messages.
No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyHow the connection works
Janitor AI is a character chat site. Besides its built-in options, it lets you plug in your own model through an API setting. That setting asks for three things: an endpoint URL, a key, and a model name. OpenRouter fits because it exposes an OpenAI-compatible endpoint; its model names have the form vendor/model and its key comes from your OpenRouter account.
The same three fields work with any other OpenAI-compatible service. This site's API is one: base URL https://api.openrouternsfw.com/v1, a bearer key, and the model ID uncensored. So the steps below cover both cases. When a step differs between the two, I say so.
Janitor AI is a third-party site and its menus change. I describe the settings as they are commonly laid out, so expect labels to differ a little. The values are what matter.
Get the three values ready
Before you open Janitor AI, collect these.
| Field | OpenRouter | This API |
|---|---|---|
| Endpoint | OpenRouter's OpenAI-style URL from its docs | https://api.openrouternsfw.com/v1/chat/completions |
| Key | Key from your OpenRouter account | Key from the API key page |
| Model name | A vendor/model ID from their list | uncensored |
For this API the key page also lets new users claim $0.50 of trial credit with one click, one per person, valid for 7 days. Sign-up is with Google or with email and password. The trial is enough to test the whole setup before you add credit.
Test the endpoint with curl first
Janitor AI gives you little feedback when a proxy fails; you usually see a generic error in the chat. Check the endpoint outside the site, so you know the values are right before you paste them in.
curl https://api.openrouternsfw.com/v1/chat/completions -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" -d '{
"model": "uncensored",
"messages": [
{"role": "system", "content": "You are Mara, a dry-witted ship mechanic."},
{"role": "user", "content": "Mara, the engine is making that noise again."}
],
"max_tokens": 200
}'
A JSON reply with a choices array means the key, the URL and the model name are all correct. Look at the response headers if you want more: X-Balance-USD shows the remaining credit, and X-Request-Id is useful if you ever contact support.
Enter the proxy in Janitor AI
- Open a chat with any character.
- Open the menu in the chat and choose the API or generation settings. The exact name differs by version.
- Pick the proxy option, which is the one for a custom OpenAI-compatible endpoint, instead of the built-in model.
- Paste the endpoint URL into the proxy URL field.
- Paste the key into the key field.
- Type the model name exactly as given:
uncensoredfor this API. - Save the settings and reload the chat page.
Which URL form to use is the one point where people get stuck. Janitor AI's proxy field has commonly expected the complete chat completions URL, ending in /chat/completions. Other tools expect only the base URL ending in /v1 and add the path themselves. If the full URL gives an error, try the base URL, and the other way round. The curl test above tells you the full URL itself is valid, so a failure points at how the site builds its request, not at the key.
Model names are case sensitive and must match. A wrong model name is the second most common cause of a failed first message.
Settings that matter for roleplay
Janitor AI exposes a few generation settings next to the proxy fields. The API passes sampling parameters through, so they have an effect.
- Temperature: 0.7 to 1.0 keeps dialogue lively. Higher values start to drift and invent details that contradict the character card.
- Max tokens: controls reply length. A value of 300 to 600 suits chat. The completion could use the rest of the 100,000-token window, but chat replies that long are rarely what you want.
- Context size: the API accepts up to 100,000 tokens, prompt plus completion. A smaller value, such as 8,000, keeps the cost per message low and still holds a lot of history. Raise it only if the character forgets things you need.
- Repetition control: if a character loops on the same phrases, a modest frequency or presence penalty helps. Both are passed through.
The model is tuned to answer without content refusals for lawful adult use, so a character card written for an adult story should not trigger refusal text. One rule is fixed: sexual content involving minors is not allowed, and you should not write card text that suggests it.
What it costs
Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. In roleplay, almost all the cost is input, because each message resends the character card and chat history.
Take a message with 8,000 tokens of context and a 300-token reply:
- Input: 8,000 x $0.15 / 1M = $0.0012
- Output: 300 x $0.50 / 1M = $0.00015
- Total: $0.00135 per message, or $1.35 per 1,000 messages
A $20 top-up pays for about 14,800 messages at that size ($20 / $0.00135 is 14,814). The $0.50 trial covers about 370. If you raise the context to 30,000 tokens, input alone rises to $0.0045 and a message costs $0.00465 with the same reply, so use large contexts only when you need them.
Top-ups run from $20 to $500 with bonuses of 5% from $50, 10% from $100 and 15% from $200. Payment is in crypto (USDT on TRC20 or USDC on Base), credit never expires, and failed or refused requests are not charged. Details are on the pricing page.
Troubleshooting
Network error or no reply
Check the URL form (full path or base). Check there is no trailing space in the key field. Then run the curl test again from your machine.
HTTP 401
The key is wrong or was pasted with extra characters. Generate it again from the key page.
HTTP 429
Read the error code. rate_limited means more than the allowed requests per minute (300 for a full key, 60 for a trial key). concurrency means too many at once (8 for a full key, 2 for a trial key); in Janitor AI this happens when you regenerate a reply while the previous one is still streaming, because a streamed request holds its slot until it ends. A 429 with Retry-After: 5 means temporary overload, so wait five seconds and try again.
Replies are cut short or ramble
Adjust max tokens and temperature. If the character forgets recent events, raise the context size a little.
Balance runs out
The X-Balance-USD header shows what remains. Add credit from the dashboard; the docs cover the error format in full.
OpenRouter or this API for Janitor AI
They are different kinds of service. OpenRouter is a router that offers many models from many providers; you choose the model by name, and what each model will or will not write depends on that model. Check its current model list and pricing on its own site. This API offers a single open-weight text model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not an official API of any model maker.
If you want variety, keep your OpenRouter setup. If your characters hit refusals and you want a steady, cheap, single model, this one is simple to try: sign up, claim the trial credit, and paste the three values above. Prompts are not used for training.
More guides
Questions and answers
What do I enter in Janitor AI's proxy fields?
The endpoint URL, your API key and the model name. For this API that is https://api.openrouternsfw.com/v1/chat/completions, your key and uncensored. If it fails, try the base URL ending in /v1.
Is this the same as OpenRouter?
No. OpenRouter routes between many models and providers. This is one open-weight model from an independent provider with its own key and prepaid credit.
Why do I get a 429 error?
Either you passed the per-minute limit, you have too many requests running at once, or the service is briefly overloaded. The error code and the Retry-After header tell you which.
Can I test without paying?
Yes. New users can claim $0.50 of trial credit with one click after sign-up. It is valid for 7 days, one per person.
Are my chats used for training?
No. Prompts sent to this API are not used for training.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key