How to Set Up Janitor AI API: Full Guide
Learn how to set up Janitor AI API with OpenRouter or Nebula Block. Follow clear steps for keys, proxy settings, models, errors, and safe use in projects.
What the Janitor AI API Does
To set up Janitor AI API, connect Janitor AI to a model provider through a proxy URL and API key. The provider runs the model. Janitor AI sends your chat prompts to that provider. You then receive the model reply inside the Janitor AI chat.
Janitor AI is mainly a chat front end. It can support roleplay chats, custom characters, long prompts, and story scenes. The exact features depend on the model and provider you choose. A stronger model often gives better tone, memory, and scene flow.
This setup does not create a new model inside Janitor AI. It links Janitor AI to an outside service. OpenRouter is one common choice. Nebula Block is another option for users who have an active account and a working endpoint.
Think of the connection as a short data path. Janitor AI sends a request to the proxy. The proxy sends it to the chosen model. The reply then returns to your chat.
Requirements Before You Start
You need a Janitor AI account and access to a model provider. You also need a browser and a safe place to store your API key. Keep the key private. Anyone with the key may spend your balance.
OpenRouter may offer many models through one account. Its quick start guide explains the basic key and request flow in plain terms. See OpenRouter's quick start guide before you begin.
Nebula Block may use different account steps and proxy details. Use the endpoint shown in its own dashboard. Do not copy an endpoint from an old guide. Providers can change paths, model names, and access rules.
- A working Janitor AI account
- An OpenRouter or Nebula Block account
- A funded balance or free allowance, if the provider needs one
- A private API key from that provider
- The provider's current proxy URL
- A model name supported by your chosen provider
Check your provider account first. A new key may show only once. Save it in a password manager or another secure vault.
How to Set Up Janitor AI API Step by Step
These steps explain how to use Janitor AI API with the usual provider setup. The labels may differ after a site update. The key ideas stay the same.
- Create or open your provider account. Sign in to OpenRouter or Nebula Block. Finish any needed email or billing checks.
- Create an API key. Open the provider's key page. Choose a clear name, then create the key. Copy it at once and store it safely.
- Find the current proxy URL. Open the provider's API or integration page. Copy the full base URL, including the correct path.
- Open Janitor AI settings. Sign in to Janitor AI. Open the chat, model, or API settings area. Look for fields named API key, API URL, proxy, or model.
- Enter the connection details. Paste the key into the key field. Paste the provider URL into the API or proxy field. Pick a model that your provider supports.
- Save and test the link. Send a short prompt with low output needs. Wait for a reply before changing more settings.
For OpenRouter, the common base address uses the OpenAI-style path shown in its docs. Your provider may show a different path. Copy the value from the provider page rather than typing it by hand.
Some Janitor AI screens ask for a full model ID. Other screens show a model list. If you must type the ID, copy it exactly. Case, slashes, and version tags can matter.
Enter Settings Without Breaking the Connection

Small input errors cause many failed requests. Paste values without extra spaces. Do not add quote marks around the key. Do not paste the proxy URL into the model field.
| Setting | What to enter | Common mistake |
|---|---|---|
| API key | The secret key from your provider | Using an expired or cut-off key |
| API or proxy URL | The current provider endpoint | Leaving out the path after the domain |
| Model | A model ID allowed by your provider | Choosing a model your key cannot use |
| Temperature | A value near 0.7 for creative chat | Using a high value for steady answers |
| Max tokens | A limit that fits your account balance | Setting a large limit without need |
Start with a modest output limit. A range near 500 to 1,000 tokens suits a quick test. Raise it later for longer scenes. Larger replies can cost more and may take longer.
Temperature controls variation in model replies. A value near 0.7 often suits roleplay. Try 0.4 for calm, steady output. Try 0.9 when you want more surprise.
Change one setting at a time. This makes each test clear. Keep a note of the last working values.
Common Errors and Fast Fixes

A failed chat request does not always mean Janitor AI is down. The key, URL, model, account balance, and prompt can each cause trouble. Read the error code first. Then test the smallest likely cause.
Invalid API key
Check that you copied the full key. Create a new key if the old one was revoked. Remove spaces before and after the value. Never share the key in a public post or chat.
Model not found
Open your provider's model list and copy the exact ID. Some models need a provider prefix. Some are private or closed to new users. Pick a model that your account can access.
401 or 403 errors
A 401 error usually points to bad sign-in data. A 403 error often means blocked access. Check your key limits, account status, and provider rules. Then save the settings again.
404 or endpoint errors
A 404 error often means the proxy URL is wrong. Copy the full endpoint from the provider dashboard. Remove duplicate path parts. For example, do not add the same API path twice.
Timeouts and blank replies
Lower the output limit and send a short test prompt. A large context can slow the request. Try a smaller model if the issue remains. You may also face provider load or a temporary outage.
Test the provider outside Janitor AI when possible. A simple request can show whether the key works. If that test fails, fix the provider account first. If it works, review Janitor AI field values.
Tips for Better Janitor AI API Use
Model choice has a large effect on chat quality. Use a fast, lower-cost model for drafts and short tests. Use a stronger model for rich roleplay, complex scenes, or strict character style. Check current price and context limits before long sessions.
OpenRouter can help you compare several models through one account. This makes model testing easier. Still, each model can follow prompts in a different way. Test the same short scene with two models before picking one.
Keep your first prompt clear and focused. State the character role, tone, setting, and reply style. Avoid adding ten rules at once. Clear prompts give the model less room to misread your goal.
- Start with a short test chat before a long story
- Set a token limit that matches your budget
- Use a stable temperature for repeatable character tone
- Check provider balance before long sessions
- Rotate exposed keys at once
- Save working model and proxy settings in a private note
API key management matters in every project. Do not place a key in front-end code, public scripts, or screenshots. If you build your own app, keep the key on a server. Let your server call the provider instead.
Janitor AI can work without your own API key in some account modes. That route may use a built-in service or a limited provider option. It gives less control over models, cost, and uptime. Use a direct provider setup when you need those controls.
Next Steps After Your First Test
You now know how to setup Janitor AI API with the main connection fields. Start with one provider, one model, and one short prompt. This simple path makes errors easier to trace.
After the first reply, tune one value at a time. Test model quality, reply length, and temperature. Watch your provider balance during the first few sessions. Keep the setup that gives good replies at a cost you can accept.
If you plan to use AI in projects, add a server-side safety layer. Limit request size and log errors without storing private chat data. Set spending alerts when your provider offers them. Small controls prevent costly surprises.
When settings work, save a clean setup note. Record the provider, endpoint, model ID, and safe limits. Never record the secret key itself. This makes future changes faster and safer.
Step-by-step
- 01 Open a model provider account
Sign in to OpenRouter or Nebula Block. Finish any account or billing checks.
- 02 Create and save an API key
Open the provider key page and create a new key. Copy it once and store it in a private vault.
- 03 Copy the provider URL
Find the API or integration page. Copy the full current proxy URL.
- 04 Open Janitor AI settings
Sign in to Janitor AI and open the chat, model, or API settings area.
- 05 Enter the key, URL, and model
Paste each value into the matching field. Choose a model that your provider account allows.
- 06 Run a short test
Save the settings and send a brief prompt. Review the error before changing any other value.
Frequently asked questions
- How do I set up Janitor AI API with OpenRouter?
- Create an OpenRouter key, copy its current API URL, and enter both values in Janitor AI settings. Then select an allowed model and send a short test prompt.
- What API key does Janitor AI use?
- Janitor AI usually uses a key from a provider such as OpenRouter or Nebula Block. It does not normally create the model provider key for you.
- What proxy URL should I use for Janitor AI?
- Use the full endpoint shown in your provider dashboard. Do not rely on an old guide, since paths can change.
- Why does Janitor AI say model not found?
- The model ID may be wrong, private, or unavailable to your account. Copy the exact ID from the provider model list and try an allowed model.
- Can I use Janitor AI without an API key?
- Some account modes may offer a built-in service without your own key. That option may give less control over models, cost, and uptime.
- How can I keep my Janitor AI API key safe?
- Store the key in a password manager and keep it out of public code. Rotate it at once if you expose it.
Related reading
Inside an AI Data Center: Design, Parts, and Daily Work
See how AI data centers turn power, chips, and data into model output.
AI Data Centers: How They Work, Grow, and Use Resources
A clear guide to AI data center design, growth, power, and cooling.
AI Models Explained: Types, Training, and How They Work
A clear guide to AI model types, training, settings, and testing.