---
title: "JanitorAI"
description: "Use plaingateway, the free OpenRouter alternative, as your JanitorAI proxy: four fields, the provider's list price for tokens and nothing on top."
---

# JanitorAI

JanitorAI is a character chat site. It sends chats to an outside model through a proxy configuration in **API Settings**. JanitorAI's own beginner guide sets that proxy up with OpenRouter; the same fields take plaingateway. Model ids are OpenRouter's, for example `deepseek/deepseek-v4.1-flash`.

## Paste this

Open a chat, open the menu at the top of the chat and choose **API Settings**. Choose **Proxy**, then **+ Add Configuration**, and fill in the fields. Copy each value from the block:

```text
Config Name: plaingateway DeepSeek
Model Name: deepseek/deepseek-v4.1-flash
Proxy URL: https://api.plaingateway.com/api/v1/chat/completions
API Key: sk-pg-v1-...
```

Leave **Custom Prompt** blank to start. Press **Save Settings**, then refresh the whole page. JanitorAI's guide calls the refresh crucial: the settings do not apply until you do.

## Where the setting lives

JanitorAI keeps the configuration in your JanitorAI account. Add one configuration per model if you want to switch between models in **API Settings**.

## Get a key

1. Sign up at [plaingateway.com/signup](https://plaingateway.com/signup) and click the link in the confirmation email.
2. Open [Keys](https://plaingateway.com/settings/keys), press **New key** and copy it. It starts with `sk-pg-v1-` and is shown once. Paste it into **API Key** with no spaces before or after.
3. Add credits by card on [Credits](https://plaingateway.com/settings/credits). Requests are paid from it.

## Check it works

Send a message in the chat. From a terminal, the same request to the same address with the same model:

```sh
export PLAINGATEWAY_API_KEY="sk-pg-v1-..."
curl -i https://api.plaingateway.com/api/v1/chat/completions \
  -H "Authorization: Bearer $PLAINGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-v4.1-flash",
    "max_tokens": 32,
    "messages": [
      {"role": "user", "content": "Say hello in five words."}
    ]
  }'
```

A 200 means the key and the address work. Three things in the answer tell you what happened: the `X-PG-Host` header names the provider that served it, `X-PG-Cost-USD` is the charge, and `usage.cost` in the body is the same charge. The request also shows on the [Activity](https://plaingateway.com/activity) page.

## What it costs

You pay the provider's official list price for tokens, and plaingateway adds nothing on top: 0% platform fee, no markup, no subscription, free with your own provider keys. You can earn up to 20% bonus credit, added to your balance when you add money and never taken off the token price: each person you invite gives you 1% bonus credit once they have paid $20 in total, up to 20%, so $100 paid gets up to $120 of credit. The person you invite gets 5% bonus credit on their first top-up, and you earn 10% of what they pay ([How referral works](../referral/how-it-works.md)). Each model's price is on [Models](https://plaingateway.com/models).

## Limits today

- **Only `openai/` and `deepseek/` models answer today.** [Models](https://plaingateway.com/models) lists more ids; any other id returns an error. Ones that answer include `deepseek/deepseek-v4-pro`, `openai/gpt-5.6-luna` and `openai/gpt-6.1-sol`.
- **Credit is prepaid.** Every message is paid from a balance you add by card; there are no daily free messages. With no balance the gateway answers 402. Each request first holds its largest possible cost, the prompt plus the maximum reply length; on a low balance it holds an eighth of what is left and shortens the answer to fit, so a long chat can get shorter answers, then 402, before the balance is spent.

## Gotchas

**The Proxy URL is the full address.** JanitorAI sends to the address exactly as written and adds nothing, so it ends in `/chat/completions`. A Proxy URL that stops at `/api/v1` gets 404. Paste it, do not click it.

**No `:free` ids.** JanitorAI's guide uses OpenRouter ids that end in `:free`. Those are not plaingateway models. Drop the suffix and use an id that answers, such as `deepseek/deepseek-v4.1-flash`.

**The model id needs the author prefix.** `deepseek-v4.1-flash` alone returns 400. Copy the full `author/slug` id from [Models](https://plaingateway.com/models).

**A 401 means the key.** A space before or after the pasted key, or a key cut short, gets 401. Paste it again, or make a new key on [Keys](https://plaingateway.com/settings/keys).

## Moving from OpenRouter

Change two fields in your configuration: **Proxy URL** becomes the plaingateway address from the block above, and **API Key** becomes a plaingateway key. Keep **Model Name** if it is an `openai/` or `deepseek/` id. The full guide: [Migrate from OpenRouter](../migrate/from-openrouter.md).

JanitorAI's own guide to the proxy fields: [help.janitorai.com](https://help.janitorai.com/en/article/the-absolute-beginners-guide-to-using-a-proxy-with-janitor-part-one-19to7y9).
