---
title: "Chub AI API key and reverse proxy setup"
canonical: https://relayswitch.io/guides/chub
generated: 2026-11-02T09:20:28.810Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

Checked 2026-11-02

# Chub AI API key and reverse proxy setup

Secrets → OpenAI → Reverse Proxy with the RelaySwitch base URL and key, the model field under Configuration, what one 2K-in / 300-out turn costs on each model, and the fix for an empty response.

A Chub AI API key goes in **Secrets**, the panel behind the three-line menu of any chat, and the model goes in **Configuration**. For a key from another provider Chub uses its **Reverse Proxy** entry under OpenAI: a base URL and a key. The base URL for RelaySwitch is `https://api.relayswitch.io/v1`, ending in `/v1`, because Chub adds `/chat/completions` itself.

One key runs every chat model on the [Models page](https://relayswitch.io/models), the uncensored and roleplay builds included, from a prepaid balance that starts at $10 by card or crypto. No subscription, no KYC. Prices on this page are read from the live catalog at render.

## 01Where the Chub AI API key goes: Secrets → OpenAI → Reverse Proxy

1.  Create a key in the [console](https://app.relayswitch.io/console). It is shown once; keys start with `sk-relay-`.
2.  On chub.ai, open any chat and click the three-line menu at the top right. Choose **Secrets**.
3.  Expand **OpenAI**. Set **OpenAI Access API** to **Reverse Proxy** (not My Own API Key, which is for a key issued by OpenAI).
4.  **OpenAI Reverse Proxy URL**: `https://api.relayswitch.io/v1`. Keep the `/v1`, add nothing after it.
5.  **Reverse Proxy Key**: your key.
6.  Click **Check Proxy**. Chub reads `/v1/models` from the URL with the key and answers **Valid API Key/Proxy**, **API key is invalid** (a 401: paste the key again) or **Network Error. Try again later!** (the URL is wrong, usually a missing `/v1` or a full `/chat/completions` path).

text

1`Menu (three lines, top right) → Secrets → OpenAI`

2`OpenAI Access API: Reverse Proxy`

3`OpenAI Reverse Proxy URL: https://api.relayswitch.io/v1`

4`Reverse Proxy Key: sk-relay-...`

5`→ Check Proxy`

6

7`Menu → Configuration → Prompt Structure → API/Model`

8`API: OpenAI / Proxy`

9`Model: glm-5.3-flash-uncensored`

## 02Configuration → Prompt Structure → API/Model

1.  Open the menu again and choose **Configuration**. Pick or create a preset.
2.  Under **Prompt Structure**, open **API/Model** and set the API to **OpenAI / Proxy**.
3.  Set the model. The dropdown is filled from the list Check Proxy fetched, and it fills inconsistently: if it is empty or stale, refresh the page, open the preset again, and type the id exactly, such as `glm-5.3-flash-uncensored`.
4.  In the same preset, set max tokens to 1,000 or more for a model that thinks before it answers, and turn on text streaming if you want replies to appear as they are written.
5.  Save, go back to the chat and send a message. The first reply is the real test; it bills like any other.

**Assistant Prefill** and **Post History Instructions** in the preset are sent with every turn and bill as input tokens. Keep them short on a long chat.

## 03Which model to type

The 10 builds the catalog tags for uncensored or roleplay use come first, then the flagships on the same key. Prices are USD per million tokens; the last two columns price one 2K-in / 300-out turn and 100 of them. A $10 top-up covers about 30,179 such turns on GLM-5.3 Flash Uncensored.

| Model | Model field | Input | Output | one 2K-in / 300-out turn | 100 turns |
| --- | --- | --- | --- | --- | --- |
| [GLM-5.3 Flash Uncensored](https://relayswitch.io/models/glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | $0.1086 | $0.3802 | $0.00033 | $0.0331 |
| [GLM-5.3 Uncensored](https://relayswitch.io/models/glm-5.3-uncensored) | `glm-5.3-uncensored` | $0.291 | $0.873 | $0.00084 | $0.0844 |
| [Gemma 4 31B Fabled](https://relayswitch.io/models/gemma-4-31b-fabled) | `gemma-4-31b-fabled` | $0.35 | $1.575 | $0.0012 | $0.1173 |
| [Gemma 4 31B Novelist](https://relayswitch.io/models/gemma-4-31b-novelist) | `gemma-4-31b-novelist` | $0.35 | $1.575 | $0.0012 | $0.1173 |
| [Qwen3.8 27B Novelist](https://relayswitch.io/models/qwen3.8-27b-novelist) | `qwen3.8-27b-novelist` | $0.35 | $2.10 | $0.0013 | $0.133 |
| [Cydonia 24B v4.3](https://relayswitch.io/models/cydonia-24b-v4.3) | `cydonia-24b-v4.3` | $0.484 | $0.60 | $0.0011 | $0.1148 |
| [Uncensored AI Roleplay](https://relayswitch.io/models/uncensored-ai-roleplay) | `uncensored-ai-roleplay` | $0.60 | $2.34 | $0.0019 | $0.1902 |
| [DeepSeek V4.1 Flash Abliterated](https://relayswitch.io/models/deepseek-v4.1-flash-abliterated) | `deepseek-v4.1-flash-abliterated` | $0.875 | $1.75 | $0.0023 | $0.2275 |
| [DeepSeek V4 Pro Uncensored](https://relayswitch.io/models/deepseek-v4-pro-uncensored) | `deepseek-v4-pro-uncensored` | $1.00 | $2.00 | $0.0026 | $0.26 |
| [MythoMax L2 13B](https://relayswitch.io/models/mythomax-l2-13b) | `mythomax-l2-13b` | $0.404 | $0.404 | $0.00093 | $0.0929 |
| [Claude Sonnet 4.6](https://relayswitch.io/models/claude-sonnet-4-6) | `claude-sonnet-4-6` | $1.80 | $9.00 | $0.0063 | $0.63 |
| [Claude Opus 5.5](https://relayswitch.io/models/claude-opus-5-5) | `claude-opus-5-5` | $2.80 | $10.00 | $0.0086 | $0.86 |
| [Claude Fable 5](https://relayswitch.io/models/claude-fable-5) | `claude-fable-5` | $3.00 | $15.00 | $0.0105 | $1.05 |
| [Gemini 3.1 Pro Preview](https://relayswitch.io/models/gemini-3.1-pro-preview) | `gemini-3.1-pro-preview` | $1.20 | $7.20 | $0.0046 | $0.456 |
| [DeepSeek V3.2](https://relayswitch.io/models/deepseek-v3.2) | `deepseek-v3.2` | $1.08 | $1.6801 | $0.0027 | $0.2664 |
| [Grok 4.6](https://relayswitch.io/models/grok-4.6) | `grok-4.6` | $0.60 | $1.80 | $0.0017 | $0.174 |
| [GLM 5.3](https://relayswitch.io/models/glm-5.3) | `glm-5.3` | $0.3276 | $1.0296 | $0.00096 | $0.0964 |
| [GPT 5](https://relayswitch.io/models/gpt-5) | `gpt-5` | $2.50 | $20.00 | $0.011 | $1.10 |

USD, read from the RelaySwitch catalog when this page was built. A turn here is 2,000 tokens in (system prompt, character and recent history) and 300 out.

Chub resends the definition and as much history as fits with every turn, so the input side grows with the chat. The same 300\-token reply at three history sizes:

| Tokens sent per turn | GLM-5.3 Flash Uncensored | Uncensored AI Roleplay | Claude Sonnet 4.6 |
| --- | --- | --- | --- |
| 4,000 | $0.00055 | $0.0031 | $0.0099 |
| 8,000 | $0.00098 | $0.0055 | $0.0171 |
| 16,000 | $0.0019 | $0.0103 | $0.0315 |

USD per turn at live catalog rates. Cached input tokens, when a model reports them, bill at its cached rate.

The [uncensored models page](https://relayswitch.io/uncensored) lists every tagged build with its daily check, and the [roleplay chat](https://relayswitch.io/roleplay) runs a character card on the same key in the browser, so you can try a model before typing it into Chub.

## 04Empty response received from API, and the other errors

Work through these in order; the first is the usual cause.

-   **Empty response received from API.** The model returned no reply text. Most often a model that thinks before it answers spent a small max tokens budget on thinking: raise max tokens in the preset to 1,000 or more, or switch to a build without a thinking step. The other cause is a 402: the balance or the key's budget ran out, and Chub shows the empty reply rather than the code. Check the balance in the console.
-   **401**: the key is wrong or revoked. Paste it again into Reverse Proxy Key and click Check Proxy.
-   **402**: the prepaid balance is too low, or the key reached its budget. Top up or raise the budget; the next turn goes through.
-   **403**: the key is narrowed to a model list and the model field names another one. Add the model to the key or change the field.
-   **404**: either the model id is misspelled or gone from the catalog (model\_not\_found), or the URL ends in `/chat/completions` so Chub posted to a path that does not exist (route\_not\_found). Use an id from the Models page and `https://api.relayswitch.io/v1` exactly.
-   **429**: the key hit its per-minute request or token limit. Wait a few seconds, or raise the limit on the key.
-   **Network Error. Try again later!** after Check Proxy: Chub could not reach `/v1/models` at the URL. Fix the URL, not the key.
-   **Old messages forgotten**: the preset's context size is below the model's window. Raise it; the long-chat table shows what that costs per turn.

To keep a key problem and a Chub setting apart, test outside Chub first. List the models the key can call:

bash

1`curl https://api.relayswitch.io/v1/models -H "Authorization: Bearer sk-relay-..."`

Then send one short turn on the id you picked:

bash

1`curl https://api.relayswitch.io/v1/chat/completions \`

2 `-H "Authorization: Bearer sk-relay-..." \`

3 `-H "Content-Type: application/json" \`

4 `-d '{"model": "glm-5.3-flash-uncensored", "max_tokens": 1000,`

5 `"messages": [{"role": "user", "content": "Say hello in one sentence."}]}'`

The reply is in `choices[0].message.content`. If it comes back, the key, the URL and the id are right and whatever is left is a Chub setting. The [API docs](https://relayswitch.io/docs) list every error code.

## 05Sources

Chub's own [API Connections page](https://docs.chub.ai/docs/the-basics/api-connections) names the providers Secrets accepts and the OpenAI Access API toggle but does not document the Reverse Proxy fields. The field labels, the Check Proxy results and the model-list quirk are from two community setup guides, [Chub Secrets and Config](https://rentry.co/chub-secrets-n-config-guide) and [the Chub AI setup page](https://freetheai.org/setup/chub-ai), all read 2026-11-02. Chub also sells its own models by subscription; that route needs no key and is not covered here. Prices and model ids come from the RelaySwitch catalog at render. The same key runs [JanitorAI](https://relayswitch.io/guides/janitorai) (full /chat/completions URL), [SillyTavern](https://relayswitch.io/guides/sillytavern) and [RisuAI](https://relayswitch.io/guides/risu) (base URL, like Chub).

## Questions

Is there a free API for Chub AI?

Not from this key: it is prepaid from $10 with no subscription, and that first top-up covers about 30,179 turns of 2,000 tokens in and 300 out on GLM-5.3 Flash Uncensored. Before the first top-up the console chat runs 12 free turns a day, enough to try a model before pasting it into Chub.

How do I get a free AI API key?

Providers that hand out free keys cap them hard or end the free tier, which is how most people arrive at a reverse proxy. Here a key is created in the console in a minute and runs on a prepaid balance; 12 free console turns a day let you test a model first.

Which API is best for Chub AI?

For a provider key, the OpenAI Reverse Proxy entry in Secrets, because it takes any OpenAI-compatible base URL and key. Which model to put behind it depends on budget and taste: one 2K-in / 300-out turn on GLM-5.3 Flash Uncensored costs $0.00033 today, and the table above prices the flagships beside it.

How can I get my API key?

Sign in to the console with an email code, add a balance, and create a key. It is shown once; paste it into Reverse Proxy Key in Chub's Secrets. You can narrow the key to a model list, give it a USD budget and per-minute limits, and revoke it any time.

Where do I put my API key in Chub AI?

Open a chat, click the three-line menu at the top right, choose Secrets, expand OpenAI, set OpenAI Access API to Reverse Proxy, and paste the key into Reverse Proxy Key with the base URL in OpenAI Reverse Proxy URL. Click Check Proxy.

What proxy URL do I use for Chub AI?

https://api.relayswitch.io/v1. It ends in /v1 and nothing more; Chub adds /chat/completions itself, so a full URL gets a 404.

Why does Chub say empty response received from API?

The model sent back no text. Raise max tokens in the preset to 1,000 or more, since a thinking model can spend a small budget before it writes the reply, or pick a build without a thinking step. If that does not fix it, check the balance: an empty balance or key budget shows up the same way. The curl check above prints the code that names the cause.

What are the Chub AI API settings for a reverse proxy?

Secrets holds the connection (OpenAI Access API: Reverse Proxy, OpenAI Reverse Proxy URL https://api.relayswitch.io/v1, Reverse Proxy Key). Configuration holds the preset: API/Model under Prompt Structure, then max tokens, context size, streaming, Assistant Prefill and Post History Instructions.

Does the same key work in JanitorAI and SillyTavern?

Yes. SillyTavern and RisuAI take the base URL https://api.relayswitch.io/v1 like Chub. JanitorAI takes the full https://api.relayswitch.io/v1/chat/completions as its Proxy URL. The key, the balance and the model ids are the same everywhere.

Related

-   [All guides](https://relayswitch.io/guides)
-   [JanitorAI](https://relayswitch.io/guides/janitorai)
-   [SillyTavern](https://relayswitch.io/guides/sillytavern)
-   [RisuAI](https://relayswitch.io/guides/risu)
-   [Roleplay chat](https://relayswitch.io/roleplay)
-   [Uncensored models](https://relayswitch.io/uncensored)
-   [Models and prices](https://relayswitch.io/models)
-   [How pricing works](https://relayswitch.io/pricing)
-   [Pay by card or crypto](https://relayswitch.io/pay-with-crypto)
-   [Docs](https://relayswitch.io/docs)

## One reverse proxy entry, every model

Prepaid from $10 by card or crypto. No KYC, no subscription.

[Uncensored models](https://relayswitch.io/uncensored)[Get a key](https://app.relayswitch.io/console)

