OpenRouter Alternative for Janitor AI: Setup Guide
Character chat front ends that accept a custom OpenAI-compatible API can talk to this endpoint with three values: a URL, a key and a model name. Here is the exact setup, a starter system prompt and the limits to plan around.
Updated

Key points
- Enter base URL https://api.openrouterapi.cc/v1, your key, and model ID uncensored.
- Test with curl first, so you know whether a problem is the key or the client.
- A 30,000-token roleplay history costs about $0.0047 per reply, so 100 replies come to roughly $0.47.
- The model is text only and has a 100,000-token context window.
What you need to enter
If you want an openrouter alternative for janitor ai or a similar character chat app, the setup is the same as for any OpenAI-compatible provider. Find the place in your client where you add a custom or proxy API. Different apps label it differently: "proxy", "custom OpenAI endpoint", "API URL". The fields underneath are always the same three.
| Field | Value |
|---|---|
| API URL / base URL | https://api.openrouterapi.cc/v1 |
| API key | The key from your account, sent as Authorization: Bearer |
| Model name | uncensored |
Some clients want the full endpoint instead of the base. If saving the base URL gives an error or a 404, try https://api.openrouterapi.cc/v1/chat/completions. The two supported methods are POST /v1/chat/completions and GET /v1/models, so a client that lists models will call the second one and see uncensored.
If you do not have a key yet, sign up with Google or with email and password and follow the API key instructions. New accounts can claim a $0.50 trial with one click, which is plenty for a first test session.
Test the connection before you blame the app
Roleplay front ends hide the raw error text. Run one request from a terminal first, so you know the key and model work. Replace the placeholder with your key.
curl https://api.openrouterapi.cc/v1/chat/completions \
-H "Authorization: Bearer YOUR_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": "The reactor is humming wrong again."}
],
"temperature": 0.9,
"max_tokens": 200
}'
If this returns a reply, the endpoint and key are fine, and any problem sits in the app's settings. If it fails, the error body tells you why. Keep the request ID from the X-Request-Id response header; it helps when you write to support.
A starter system prompt
A character card in a front end usually becomes the system message. Whatever your app does, the model receives something like the text below. The model is tuned to answer without content refusals for lawful adult use, so the prompt does not need to argue with it. It needs to be clear about voice, boundaries and format.
You are Mara Voss, chief engineer on the freighter Calloway.
Voice: dry, practical, quick to joke under stress.
Write in third person past tense, 2 to 4 short paragraphs.
Never speak or act for the user's character.
Keep continuity: track injuries, repairs and who knows what.
Stay in the story. All characters are adults.
Two habits improve long sessions. First, keep the system prompt short, because it is resent on every turn. Second, put hard rules at the end of the prompt, not the middle, so they stay prominent when the chat history grows. If your app lets you add an "author's note" or a reminder that is inserted near the latest message, use it for style rules.
One rule is fixed on this service and in your prompt: no sexual content involving minors. Writing that into the character card also keeps your own cards clean.
Settings that usually work
These are starting points, not guarantees. Change one at a time and compare a few replies.
- Temperature 0.8 to 1.0 for lively dialogue. Go lower, around 0.6, if the character drifts or contradicts itself.
- top_p 0.9 to 0.95 if your client exposes it. It is passed through.
- Frequency and presence penalties 0.2 to 0.5 when replies start repeating phrases. Large values make the prose strange, so stay low.
- max_tokens is optional. Set 300 to 600 if you want paragraph-length replies and not essays.
- Streaming on. The reply appears as it is written, and the final chunk carries usage so your client can show token counts.
- seed passes through, which is handy when you want to compare two prompt versions on the same roll.
Streaming has one side effect worth knowing: a streamed request holds its concurrency slot until the stream ends. A full key allows 8 requests at once and 300 per minute. A trial key allows 2 at once and 60 per minute.
Context, memory and what long chats cost
The context window is 100,000 tokens, prompt plus completion. That is a lot of story: tens of thousands of words of history can fit. The cost grows with it, because the whole history is sent each time. Here is a worked example for a long session.
Say the history has grown to 30,000 tokens and the reply is 300 tokens. Input: 30,000 x $0.15 / 1M = $0.0045. Output: 300 x $0.50 / 1M = $0.00015. One reply costs $0.00465. A hundred replies at that size come to $0.465, so roughly 47 cents.
A shorter history is cheaper and often better. Models pay less attention to the middle of very long prompts, so a clean summary of old events plus the last dozen messages can read more consistently than 30,000 raw tokens. Many front ends have a summary or "memory" feature. Use it once the chat passes a few thousand tokens.
Prices are $0.15 per 1M input and $0.50 per 1M output. Failed or refused requests are not charged, and credit never expires. See the pricing page for top-up amounts, bonuses and payment methods, including card and crypto.
Keeping a character consistent over weeks
Long-running characters drift. The fix is mostly bookkeeping, and it costs very little in tokens if you do it well.
Keep a fixed block of facts that never changes: name, personality, speech habits, relationships. Keep a second block that you update by hand every so often: the current situation, open plot threads, promises made. Paste both into the system prompt or the memory field of your client, and keep each under about 500 tokens. Together that is 1,000 tokens at most, which costs $0.00015 per reply at the input rate.
Then let the live chat carry only the recent exchange. When a scene ends, write two or three sentences of summary into the second block and clear the old messages. Your characters stay sharp, replies get faster to read, and the per-reply cost stays near a tenth of a cent instead of climbing with every session.
If you run several characters in one chat, say who speaks and when. A line such as "Only write Mara's lines unless the user asks for another character" prevents the model from narrating everyone at once, which also keeps replies short and cheap.
Troubleshooting 429s and odd replies
Roleplay apps are good at triggering rate limits by accident: two browser tabs, a "regenerate" button pressed twice, a group chat where several characters answer at once. The API answers with HTTP 429 and one of these causes.
- Error code
concurrency. You have more requests in flight than your key allows. Close extra tabs, wait for the stream to finish, or turn off parallel character replies. Remember that a stream occupies its slot until it ends. - Error code
rate_limited. You sent too many requests in a minute. Slow down; a person typing rarely hits 300 per minute, but an automated swipe loop can hit 60 on a trial key. - 429 with a
Retry-After: 5header. The service is temporarily overloaded. Wait five seconds and send again.
If replies are cut off, check your max_tokens setting in the client. If the character speaks for you, strengthen the rule in the system prompt and lower the temperature. If the app says the model is not found, make sure the model field is exactly uncensored, in lowercase.
Where this fits, and where it does not
This works as a replacement when your client lets you pick your own endpoint and you want a single model with a flat per-token price. It does not replace a router if you like switching between many models mid-chat. You get one model, from an independent provider, not the official API of any model vendor.
The model is text only. It will not generate character art, voice or video, and embeddings are not available. Anything in your client that depends on those needs another service. Prompts are not used for training, and the full quickstart is in the docs.
Questions and answers
What model name do I type in Janitor AI style settings?
Type uncensored, in lowercase, in the model field. Use https://api.openrouterapi.cc/v1 as the URL and your own key.
Why do I get a 429 error mid-chat?
Either too many requests are open at once (concurrency) or too many per minute (rate_limited). Close extra tabs and wait for streams to end; a trial key allows 2 at once.
Can the model make images for my characters?
No. It is a text model only, with no image, audio or video generation.
How much does a roleplay session cost?
With a 30,000-token history and 300-token replies, each reply costs about $0.0047, so 100 replies are about 47 cents.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.