---
title: "RisuAI custom API setup for an uncensored model"
canonical: https://unrestrictable.ai/guides/risuai-custom-api
generated: 2026-11-16T02:57:40.759Z
source: https://unrestrictable.ai/guides/risuai-custom-api
base_url: https://api.unrestrictable.ai/v1
---

# RisuAI custom API: connect an uncensored roleplay model

Fill the four RisuAI custom API fields (URL, Key/Password, Request Model, Format) with an uncensored roleplay build, then see what a session costs.

Steps checked October 24, 2026 · prices as of November 16, 2026

Connecting RisuAI to this API means choosing one model entry and filling four boxes: URL, Key/Password, Request Model and Format. Below you get the values for an uncensored roleplay build, a sampler preset, and the price of a session on four builds, computed from the live catalog. Field names were taken from RisuAI's own source on 24 October 2026, so they match today's app and not the "Reverse Proxy" wording of older posts.

New to builds that had their refusals removed? Read [AI with no restrictions](https://unrestrictable.ai/blog/ai-with-no-restrictions) first, then return here to wire one up.

## What you need before you start

- An API key from the [console](https://app.unrestrictable.ai/console). Keys begin with `sk-unr-` and appear once, so copy yours into a safe place right away. Credit is prepaid, from $10 by card, WeChat Pay or crypto. An empty key still passes the setup; its first chat message comes back as a 402.
- A model id, copied (not typed) from the [uncensored model list](https://unrestrictable.ai/models) or from the table further down.
- RisuAI, either the web build at [risuai.net](https://risuai.net) or a desktop build. Its source is on GitHub at [kwaroran/RisuAI](https://github.com/kwaroran/RisuAI).

No install? The same builds answer in the browser at [/chat](https://unrestrictable.ai/chat), with a few free turns a day and no account, and on [Telegram](https://unrestrictable.ai/telegram).

## Where the setting lives in RisuAI

RisuAI ships no model of its own. Every chat goes to whatever you select in its settings, and one entry in that picker is a custom endpoint speaking the OpenAI format. That entry is the one you want.

Its name has moved around. Community write-ups from earlier years call it "Reverse Proxy". In the main branch of RisuAI's source, read on 24 October 2026, the picker entry is **Custom API**, while the English label on its URL box still reads "Reverse Proxy". Two words, one setting.

## Set up the RisuAI custom API in nine steps

1. Open RisuAI and go to **Settings**, then **Bot Settings**.
2. Change **Model** to **Custom API**. Four boxes appear: URL, Key/Password, Request Model and Format.
3. In **URL**, paste `https://api.unrestrictable.ai/v1/chat/completions`.
4. In **Key/Password**, paste your key. Ignore the placeholder text about leaving it empty when there is no password: this API wants the key with every call.
5. In **Request Model**, enter the model id, such as `gemma-4-31b-fabled`.
6. Keep **Format** at **OpenAI Compatible**. The remaining choices (Anthropic Claude, Mistral, Google Cloud, OpenAI Response API) build a different request body.
7. Close settings and open any character.
8. Send one message.
9. When a reply arrives, all three of URL, key and model id are correct. If not, the troubleshooting section below sorts the errors by status code.

There is a second way in: RisuAI's **Custom Models** list, where every entry has its own URL, format and key and an **Additional Parameters** box. RisuAI's help text says that box adds fields to the request body, and that a key written as `header::Name` turns into a header. For a single model, the Bot Settings path above is all you need.

## The four fields, in one place

Here are the values again as a table, with the labels taken from RisuAI's Bot Settings page and English strings.

- URL: https://api.unrestrictable.ai/v1/chat/completions Whole path, through /chat/completions
- Key/Password: sk-unr-live-… Made in the console; visible once
- Request Model: gemma-4-31b-fabled An id from the Models page, character for character
- Format: OpenAI Compatible Top of the Format list

The reason for pasting the whole path: RisuAI calls the URL exactly as written when it ends in `/chat/completions`. If **Autofill Request URL** is switched on, RisuAI will also take `https://api.unrestrictable.ai/v1` and add `/chat/completions` on its own, since that URL ends in `v1`. The full path is right with the toggle on or off, which is why the guide uses it.

## Picking an uncensored build for RisuAI

Each of the four builds here is tagged roleplay in the catalog, and each speaks the OpenAI wire format the Custom API entry produces. Prices and windows below come from the live catalog at render time.

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [Gemma 4 31B Fabled](https://unrestrictable.ai/models/gemma-4-31b-fabled) gemma-4-31b-fabled | Roleplay | $0.35 | $1.575 | 262K | openai |
| [Qwen3.8 27B Antislop](https://unrestrictable.ai/models/qwen3.8-27b-antislop) qwen3.8-27b-antislop | Roleplay | $0.35 | $2.10 | 262K | openai |
| [Gemma 4 26B-A4B ChimeraX](https://unrestrictable.ai/models/gemma-4-26b-a4b-chimerax) gemma-4-26b-a4b-chimerax | Roleplay | $0.42 | $1.33 | 262K | openai |

Prices per million tokens, read from the live catalog on 2026-11-16.

| Model id | Catalog context window | Starting Max Context Size |
| --- | --- | --- |
| [`gemma-4-31b-fabled`](https://unrestrictable.ai/models/gemma-4-31b-fabled) | 262,144 tokens | 32768 |
| [`qwen3.8-27b-antislop`](https://unrestrictable.ai/models/qwen3.8-27b-antislop) | 262,144 tokens | 32768 |
| [`gemma-4-26b-a4b-chimerax`](https://unrestrictable.ai/models/gemma-4-26b-a4b-chimerax) | 262,144 tokens | 32768 |

Windows from the live catalog, 2026-11-16. The starting value is the window, capped at 32,768 tokens.

In RisuAI's strings the context setting is **Max Context Size**. It governs how much of the card, the lorebook and the chat history travels with each message, and all of it is billed as input tokens. Never set it above the model's window. The Gemma 4 tunes have more relatives on the [uncensored Gemma page](https://unrestrictable.ai/uncensored/gemma); the Qwen 3.8 tune has its family on the [uncensored Qwen page](https://unrestrictable.ai/uncensored/qwen).

## Sampler settings for the custom API entry

In RisuAI's model list the Custom API entry carries a fixed set of samplers: temperature, top_p, frequency_penalty, presence_penalty, repetition_penalty, min_p, top_a, top_k and a budget for thinking tokens. The entry is also flagged for streaming, so text shows up while the model is still writing. Below is the preset we start a roleplay from. Treat every number as a first guess to tune, not as a requirement of the model.

| Setting | Start value | Why |
| --- | --- | --- |
| Temperature | 0.9 | At 1.0 the model samples from its own distribution unchanged. Go down to 0.7 when a build wanders. |
| Top P | 0.95 | Trims the tail of improbable tokens. 1.0 disables it. |
| Top K | 0 | Disabled, since Top P already limits the candidates. |
| Repetition Penalty | 1.05 | 1.0 means none. A touch above breaks the loops on favourite phrases that long chats fall into. |
| Frequency and Presence Penalty | 0 | Keep both at 0 while Repetition Penalty is on, or the same tokens get punished twice. |
| Max Response Size | 300 | Roughly a paragraph. Builds that reason before answering want 1,000 or more, or the cut lands inside the thinking. |

A reply cut off mid-sentence is the Max Response Size limit, not a fault. Raise the value and regenerate. Billing is per token, so a higher ceiling only costs more if the model actually writes more.

## The cost of a RisuAI session

Take one sitting of 200 messages with replies near 250 tokens each. In the first column every message carries roughly 4,000 tokens of card and history. In the second it carries 16,000, which is what a lorebook plus a long chat looks like.

| Model | 200 messages at 4,000 context | 200 messages at 16,000 context |
| --- | --- | --- |
| [Gemma 4 31B Fabled](https://unrestrictable.ai/models/gemma-4-31b-fabled) | $0.36 | $1.20 |
| [Qwen3.8 27B Antislop](https://unrestrictable.ai/models/qwen3.8-27b-antislop) | $0.39 | $1.23 |
| [Gemma 4 26B-A4B ChimeraX](https://unrestrictable.ai/models/gemma-4-26b-a4b-chimerax) | $0.40 | $1.41 |

Worked out at render from catalog prices on 2026-11-16: messages × prompt tokens × input rate, plus messages × 250 × output rate.

Almost all of it is input. 200 × 4,000 comes to 800,000 input tokens, set against 50,000 tokens of output. Trimming the card, pruning the lorebook and lowering Max Context Size change the bill more than swapping models does. The full per-token list is on the [pricing page](https://unrestrictable.ai/pricing).

## Test the key and the id from a terminal

One free request shows every model id your key can call. Put your key in place of the placeholder and run it before opening RisuAI.

```bash
curl https://api.unrestrictable.ai/v1/models \
  -H "Authorization: Bearer sk-unr-live-…"
```

A 200 carrying a list of ids confirms the key. When the id you entered in Request Model appears in that list, the URL is the only field that can still be wrong. A 401 points at the key, and the body tells you how:

```
HTTP 401
{"error":{"message":"No API key was sent.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
```

```
HTTP 401
{"error":{"message":"The API key is not valid.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
```

Response bodies captured from the API on 24 October 2026.

## RisuAI custom API errors, by status code

### 401: key

"No API key was sent." says Key/Password is blank. "The API key is not valid." says the key is mistyped, truncated or revoked. Make a new one in the console and paste the whole string.

### 404: model id, or URL

With the code `model_not_found`, the Request Model value is not in the catalog: a typo, a display name where an id belongs, or a build that was retired. Rerun the request above and copy the id out of the response. A 404 with no such code means the URL is off, usually a doubled path like `/chat/completions/chat/completions` or a dropped `/v1`. Copy the URL from this page once more.

### 402: balance

Your prepaid credit has run out. Add funds in the console.

### CORS in the web build

RisuAI's web build talks to the API directly from the browser. The API accepts requests from every origin, Authorization header included (verified 24 October 2026). Nothing sits in between, and the key travels only to the API.

A fixed prompt goes to each model every day in the [daily real-model check](https://unrestrictable.ai/proof), which is how we know the model behind an id matches its label. Base URL, key and id details for other apps are on the [docs page](https://unrestrictable.ai/docs).

## Questions

### Does RisuAI cost money?

The app is open source (kwaroran/RisuAI on GitHub) and free. You pay the API behind the model you connect. Here that is per token, prepaid from $10, with no subscription required. See per-token prices.

### I cannot find Reverse Proxy in RisuAI. Where did it go?

It is now the Custom API entry: Settings, Bot Settings, Model. Only the URL box inside it still carries the Reverse Proxy label in RisuAI’s English strings.

### What URL goes in the RisuAI custom API box?

https://api.unrestrictable.ai/v1/chat/completions, the whole path. If Autofill Request URL is on, https://api.unrestrictable.ai/v1 works too, since RisuAI adds /chat/completions to any URL ending in v1.

### What do I type in Request Model?

The catalog id, letter for letter, such as gemma-4-31b-fabled. Display names and typos come back as 404 model_not_found. See the uncensored model list.

### Which Format setting fits this API?

OpenAI Compatible. The whole catalog speaks the OpenAI wire format, and the other Format choices send a different request body.

### Do I still need a jailbreak in my RisuAI card?

No. These builds are abliterated or uncensored fine-tunes: the refusals were removed from the weights, so no prompt text is needed to get past them. See AI with no restrictions, explained.

Every model above is on the [uncensored model list](https://unrestrictable.ai/models) with its live price per million tokens. [Per-token pricing](https://unrestrictable.ai/pricing) sets the whole catalog side by side, and the [family directory](https://unrestrictable.ai/uncensored) groups the builds by base model.

[Get a key](https://app.unrestrictable.ai/console) Prepaid from $10, no subscription.

## New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.
