> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Using BeatAPI in JanitorAI

> Connect JanitorAI's Custom Proxy to BeatAPI using the full /v1/chat/completions endpoint and OpenAI-compatible models such as Gemini, DeepSeek, Grok, GLM, and MiniMax.

JanitorAI connects to external model providers through its **Proxy** option, which requires an OpenAI-compatible Chat Completions URL. If you are replacing overloaded free proxies or `No matching chute found` and `Failed to fetch` errors, BeatAPI provides one prepaid key for DeepSeek, Gemini, Grok, GLM, MiniMax, and GPT models. JanitorAI does not append `/chat/completions` automatically, so **Proxy URL** must contain the full completions path.

## Protocol boundary for Claude models

JanitorAI's Proxy sends `POST /v1/chat/completions` requests only. On BeatAPI, Claude models are served exclusively on Anthropic Messages (`POST /v1/messages`), so entering a Claude model ID in JanitorAI Proxy returns `404 not_found`.

In JanitorAI, select BeatAPI's OpenAI-compatible model families: **Gemini, DeepSeek, Grok, GPT, GLM, Qwen, Kimi, MiniMax, MiMo, Hunyuan, or Muse**. To call BeatAPI Claude models, use a client that supports Anthropic Messages endpoints such as [SillyTavern](/integrations/sillytavern).

## Prerequisites

1. A JanitorAI account with any character chat open.
2. A dedicated BeatAPI API key from [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys). Setting a per-key quota cap keeps browser-side spend bounded.

## Step 1: Open Proxy settings in JanitorAI

1. Open any character chat on JanitorAI.
2. Click **API Settings** in the top-right menu (or click the model banner at the top of the chat).
3. Switch the provider tab to **Proxy**.
4. Under **Proxy Configurations**, click **+ New** to add a BeatAPI profile.

## Step 2: Fill in the BeatAPI Proxy fields

| JanitorAI field        | Value to enter                                                                                                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Configuration Name** | `BeatAPI` (or any label you recognize)                                                                                   |
| **Proxy URL**          | `https://direct.beatapi.io/v1/chat/completions` (East/Southeast Asia: `https://api-asia.beatapi.io/v1/chat/completions`) |
| **Model**              | Exact case-sensitive BeatAPI model ID                                                                                    |
| **API Key**            | Your BeatAPI API key                                                                                                     |

Confirm that **Proxy URL** ends with `/v1/chat/completions`, with no trailing slash and no duplicated `/v1`.

## Step 3: Pick a compatible BeatAPI model

You can verify the configuration at zero balance with a `-free` model before switching to a paid model:

| Model ID                   | Context window | Typical use in JanitorAI                         |
| -------------------------- | -------------- | ------------------------------------------------ |
| `deepseek-v4.1-flash-free` | Free tier      | Zero-balance setup test                          |
| `glm-5.3-flash-free`       | Free tier      | Zero-balance setup test                          |
| `deepseek-v4-pro-0813`     | 1,000,000      | Long-form storytelling and reasoning at low cost |
| `gemini-4-neon`            | 1,048,576      | Long chats with large character definitions      |
| `grok-4.7`                 | 500,000        | Direct conversational roleplay                   |
| `MiniMax-M3`               | 1,048,576      | High-volume daily chats at low per-token cost    |
| `gpt-6.2-sol`              | 1,050,000      | Balanced instruction following and prose         |

Live rates are on the [pricing page](https://beatapi.io/pricing), and all OpenAI-compatible model IDs are listed in the [Text API reference](/text-api).

## Step 4: Save, refresh, and test

1. Click **Save Settings** in JanitorAI, then hard-refresh the browser page (`Ctrl+Shift+R` or `Cmd+Shift+R`). JanitorAI can retain the previous provider configuration in memory until the page reloads.
2. In **Generation Settings**, enable streaming and set **Max new tokens** between `1000` and `4096`. Leaving **Max new tokens** unlimited on a small balance can trigger `402 insufficient_credits`.
3. Send one short message and confirm the character replies.

## Troubleshooting and next steps

* **404 Not Found**: Verify that **Proxy URL** ends with `/v1/chat/completions` and that **Model** is an OpenAI-compatible ID. See [Why does Claude return 404 in SillyTavern, Tavo, or JanitorAI?](/faq/roleplay-claude-404).
* **`Failed to fetch` or `No response from bot`**: Confirm that **Proxy URL** uses `direct.beatapi.io` (or `api-asia.beatapi.io` in Asia). See [Roleplay timeouts and cut-offs](/faq/roleplay-timeout-truncation).
* **Empty replies or `</think>` loops on reasoning models**: See [Reasoning `<think>` cut-offs & loops](/faq/roleplay-thinking-tags-cutoff).
* **402 error despite positive balance**: Lower **Max new tokens**. See [402 error from oversized max_tokens](/faq/roleplay-max-tokens-402).
* **Manage long-chat spend**: [Keep long roleplay memory consistent while controlling token cost](/guides/roleplay-long-memory-cache).