JANITOR AI FREE PROXY (CLOUDFLARE)
openrouter acting up? yeah same.
this setup is better for most of you anyway.
this uses:
google gemini (flash / lite)
cloudflare worker (as proxy)
works directly in janitor like openai
hundreds–thousands of messages/day free (make extra keys under new projects for more)
faster streaming (no delay mid-response)
handles long chats + lorebooks WAY better
more stable for RP bots
go here:
https://aistudio.google.com/app/apikey
create a key and copy it.
don’t lose it. if you do, that’s on you.
WANT MORE MESSAGES?
limits are per project, not per key.
same gmail → create a new project in AI Studio → make a new key under that project.
each project gets its own free quota.
you can make several projects (usually up to ~10).
copy this:
https://pastebin.com/LJc8e8mP
(go inside this link)
you don’t need to understand the code. just copy the whole thing.
go here:
https://dash.cloudflare.com/
then follow exactly:
create a free account (or log in)
on the left menu click Workers & Pages
click Create application → Create Worker
give it any name (example: my-gemini-proxy)
click Deploy (this creates the empty worker)
after it deploys, click Edit code
delete ALL the default code (select everything and delete)
paste the full code you copied from pastebin
click Deploy / Save and Deploy
after deploying, you’ll get a link like:
https://your-name.workers.dev
this is your proxy URL.
copy it carefully. no spaces at the end.
go to:
Settings → API Settings
set this:
API Type:
Proxy
API URL:
https://your-name.workers.dev (the exact link you got)
(DO NOT add /chat/completions or anything else)
API Key:
(your gemini api key – paste it clean, no extra spaces)
use one of these (copy exactly):
gemini-3.5-flash
or
gemini-3.5-flash-lite
(if one is busy / rate limited, try the other)
Other models you can try : gemini-3-flash-preview , gemini-3.1-flash-lite
, no extra spaces)
For peak Roleplay experience
https://pastebin.com/QK8dQ27G
Paste the prompt you get from this link in the Global Prompt section of API settings and youre good to go !
temperature: 1
max tokens: 0 (infinite)
streaming: ON
Do NOT use advanced settings
most common error. means janitor got nothing back from the proxy.
check: is the worker URL correct? (no extra /chat/completions, no spaces)
did you actually click Deploy after pasting the code?
wrong or expired API key → make a new key
gemini rate limited you → wait a bit or switch to another key/project
sometimes just high traffic → wait 1–2 minutes and try again
worker URL is wrong or has a typo
you forgot to deploy the worker
cloudflare worker is down (rare) → re-deploy it
your internet / VPN is blocking it → try without VPN
you typed the model name wrong
use exactly: gemini-3.5-flash or gemini-3.1-flash-lite-preview
no extra spaces, no “models/” in front
means gemini didn’t like the prompt (safety filter)
fix:
rephrase slightly
don’t go full unhinged on the first message
try regenerating or switching model
you hit the free daily/minute limit on that project
fix: wait (resets around midnight Pacific) or make a new project + new key
don’t share one worker/key with many people – it kills the quota for everyone
DON'T use someone else’s worker
seriously.
if 100 people use one:
it slows down
breaks
stops working
make your own. it takes 2 minutes.
this setup is:
✔ free (hundreds–thousands msgs/day, with extra projects)
✔ fast
✔ great for heavy bots / lorebooks
✔ better than openrouter for most people
only downside:
gemini models can change names sometimes. if one stops working, just ask in comments for the current name.
but so does everything else.
that’s it. if you mess this up, reread step 3 carefully.
comments
Leave a comment or feedback for the creator ❤️