Guide

How to Set Up Janitor AI API Access

Learn how to set up Janitor AI API access with OpenRouter or Nebula Block, add a proxy URL, choose models, and fix common connection errors.

Editorial Team 8 min read
How to Set Up Janitor AI API Access

What the Janitor AI API Does

The fastest way to set up the Janitor AI API is to connect Janitor AI to an outside model provider. OpenRouter and Nebula Block are common choices. You create a provider account, make an API key, then add the key and proxy URL in Janitor AI.

Janitor AI acts as the chat interface. The model provider creates the replies. Your proxy URL sends requests from Janitor AI to that provider. Your API key proves that your account may use the service.

This setup gives you more control over models, limits, and costs. It can also help with model testing for roleplaying AI chatbots. Your exact menus may differ after Janitor AI updates its site.

Janitor AI may work without your own API key in some modes. Those modes depend on the service's current access rules. A personal key gives you clearer control over usage and model choice.

What You Need Before Setup

You need a Janitor AI account and a provider account. Choose OpenRouter or Nebula Block before you start. Do not create keys from random proxy sites, since they may log or misuse your requests.

You also need a web browser and a small test budget. Some models offer free access, but free limits can change. Paid models may charge per token, which is a small unit of text.

Keep your API key private. Treat it like a password. Never paste it into public code, screenshots, shared chats, or client-side project files.

  • A working Janitor AI account
  • An OpenRouter or Nebula Block account
  • A provider API key with enough credit or quota
  • The provider's current proxy or base URL
  • A character or chat for testing

Before setup, check the provider's model list and usage rules. OpenRouter's quickstart guide explains its key and request flow. Use the provider's own page when its URL or fields change.

Developer workspace with provider account setup tools arranged beside a laptop
Tools needed for API setup

Step-by-Step Janitor AI API Setup

1. Create the provider key

Sign in to OpenRouter or Nebula Block. Open the page for keys, tokens, or developer access. Select the option to create a new key.

Give the key a clear name, such as “Janitor test.” Set a spending limit when the provider offers one. Copy the key once, then store it in a password manager.

Do not add spaces before or after the key. A copied space can cause an invalid key error. If you lose the key, revoke it and make a new one.

2. Open Janitor AI's API settings

Sign in to Janitor AI and open its settings area. Look for API, model, generation, or custom API options. The label can change with site updates.

Choose the custom provider option if Janitor AI shows several choices. Select OpenRouter for an OpenRouter key. Select Nebula Block when you created the key there.

3. Enter the proxy URL

Paste the provider's current proxy URL into the proxy or endpoint field. Use the exact URL shown by the provider. Do not add a second path, slash, or quotation mark unless the provider asks for one.

Some tools call this field a base URL. Others call it an endpoint. The field tells Janitor AI where to send your chat request.

4. Add the API key

Paste your provider key into the API key field. Check the first and last characters before saving. A hidden character can break the request.

Keep the key in the key field only. Do not paste it into the proxy field or model name field. Save the settings after both fields contain valid values.

5. Pick a model

Choose a model supported by your provider. Start with a low-cost model for testing. Then compare stronger models after the connection works.

For roleplay, seek models with good context length and steady instruction following. Context length means how much chat history the model can read. A longer context can help with detailed character history.

Model names change often. Check the provider's current list instead of copying an old guide. A model can also disappear when a provider reaches a limit.

6. Run a small test

Open a simple character chat and send one short message. Wait for a reply before changing other settings. This test shows whether the key, URL, and model work together.

Use a short prompt first. Long prompts can hide the real cause of a failed request. Once the test works, adjust temperature, reply length, and context settings.

Laptop and notebook arranged for entering a secure endpoint and access key
Connecting the provider settings

Best Ways to Enter Configuration Settings

Change one setting at a time. Save the change, then run the same short test. This method makes faults easier to find.

Use plain values in each field. Do not add quotation marks around the key or URL. Do not paste JSON unless Janitor AI asks for JSON.

Keep your first test simple. Use a short message, a common model, and a modest reply limit. A 200 to 500 token reply limit often gives enough room for a basic test.

Write down your working setup in a private note. Record the provider, model, proxy URL, and date. Never record the full secret key in that note.

SettingWhat to enterSafe starting choice
ProviderYour chosen key providerOpenRouter or Nebula Block
Proxy URLThe provider's current endpointCopy it exactly
API keyYour new private keyUse a limited key
ModelA model listed by your providerStart with a low-cost option
Reply limitThe maximum reply size200 to 500 tokens

Do not expose a provider key in a public website. A browser app can reveal keys through page code or network tools. For your own project, send requests through a server or serverless function.

Organized technical desk showing careful API settings and model testing preparation
Organizing configuration settings

Common Errors and Practical Fixes

An “invalid API key” message usually means the key is wrong, expired, or blocked. Make a fresh key and paste it again. Check that the key belongs to the provider selected in Janitor AI.

A “401” error means the provider rejected your sign-in proof. Recheck the key and provider choice. A “403” error often points to blocked access, missing credit, or a restricted model.

A “404” error often means the proxy URL is wrong. Copy the current endpoint from the provider page. Remove extra paths that an old guide may have added.

A timeout may come from a busy model or a weak network. Try a smaller model and shorter prompt. Then test again after a few minutes.

An empty reply can come from a model limit or bad generation setting. Lower the reply length and remove unusual control values. Test with a plain character prompt.

  • Revoke exposed keys at once
  • Check provider credit and rate limits
  • Confirm the model still exists
  • Copy the proxy URL from a current source
  • Test with a short message

If only one model fails, the key may still work. Switch to another listed model. If every model fails, check the key and proxy fields first.

Tips for Better Janitor AI API Use

Start with a cheap, fast model while you tune your prompts. Move to a stronger model when you need richer memory or style control. This keeps early testing costs low.

Keep character instructions clear and short. Put key facts near the start of the prompt. Avoid adding many conflicting rules.

Watch provider usage after your first ten to twenty messages. Long chats can use more tokens because the system may resend chat history. Set a spending cap when possible.

Rotate keys when a key leaks or a team member leaves. Use separate keys for testing and live projects. This makes access control easier.

If you want to use Janitor AI without an API, try the built-in access option shown in your account. It may have model, speed, or message limits. You cannot control those limits like a personal provider key.

Secure developer workspace prepared for testing models and fixing connection errors
Testing and improving API use

Next Steps After Your First Working Test

Once the connection works, save your working model and provider name. Keep the setup note private and leave out the full key. This gives you a safe reference after future updates.

Next, test three cases: a short chat, a long character prompt, and a failed request. These tests reveal limits before you build more features. They also show whether your chosen model fits the project.

For a larger app, keep the API call on a server. Add usage limits, error logs, and key rotation. Never place a long-lived provider key in public browser code.

The basic process stays simple. Create a provider key, enter the proxy URL, choose a model, and run a small test. That is the core of how to set up Janitor AI API access.

Step-by-step

  1. 01
    Create a provider account

    Open an account with OpenRouter or Nebula Block. Check its current model list, limits, and pricing.

  2. 02
    Make an API key

    Create a new key from the provider's key page. Copy it and store it in a password manager.

  3. 03
    Open Janitor AI settings

    Sign in to Janitor AI and open the API, model, or custom provider settings.

  4. 04
    Enter the proxy URL

    Paste the provider's current endpoint into the proxy or base URL field. Keep the URL exact.

  5. 05
    Add the API key and model

    Paste the key into the API key field. Choose a model that the provider currently supports.

  6. 06
    Test the connection

    Send a short message in a simple chat. If it works, adjust reply length and other settings one at a time.

Frequently asked questions

How do I set up the Janitor AI API?
Create a provider key with OpenRouter or Nebula Block. Add its exact proxy URL and key in Janitor AI's API settings, then choose a supported model.
What do I need to use the Janitor AI API?
You need a Janitor AI account, a provider account, a valid API key, and the provider's current proxy URL. Some provider plans also need credit.
How do I get a Janitor AI API key?
Open the provider's key page and create a new secret key. Copy it once, store it safely, and paste it into Janitor AI's API key field.
Why is my Janitor AI API key not working?
A 401 error often means that the key is wrong or expired. A 404 error often means that the proxy URL is wrong. Check both fields and test again.
Can I use Janitor AI without an API key?
Yes, some accounts may offer built-in access without a personal API key. These options can have limits on models, speed, or messages.
Which model should I use with Janitor AI?
Start with a low-cost model for testing. For roleplay, compare models with strong instruction following and a longer context length.
janitor ai api setupopenrouter api keyproxy URL settingsAI model selectionAPI key managementtroubleshoot API errorsroleplaying AI chatbots