---
title: "Agnai proxy setup: uncensored model over Third-Party API"
canonical: https://unrestrictable.ai/guides/agnai-proxy
generated: 2026-11-16T02:57:39.207Z
source: https://unrestrictable.ai/guides/agnai-proxy
base_url: https://api.unrestrictable.ai/v1
---

# Agnai proxy: connect a Third-Party preset to an uncensored model

How to point an Agnai generation preset at an uncensored build: AI Service, Third Party Format, URL, key and OpenAI Model Override, each label taken from Agnai’s source.

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

There is no setting in Agnai called proxy. What people mean by an Agnai proxy is a generation preset on the Third-Party AI Service with four values filled in: format, URL, key and model id. Every label below is spelled as Agnai's source spells it (read 24 October 2026), so the preset reaches an uncensored roleplay build on the first try.

New to models with the refusals trained out? Read [AI with no restrictions](https://unrestrictable.ai/blog/ai-with-no-restrictions) first, then return here to hook one up.

## What you need

- Agnai, either the hosted site at agnai.chat or your own copy from the open repository. The setup is identical on both.
- A key from the [console](https://app.unrestrictable.ai/console). It begins with `sk-unr-` and is displayed one time only, so copy it somewhere safe first. Credits are prepaid, with top-ups from $10. An unfunded key is accepted, but its first message comes back 402.
- One model id, copied (not retyped) from the table further down or from the [uncensored model list](https://unrestrictable.ai/models).

No install at all? The same builds answer in the browser at [/chat](https://unrestrictable.ai/chat), with characters built in, and the [roleplay page](https://unrestrictable.ai/uncensored-ai-roleplay) shows what they do with a character card. Agnai is for people who want their own presets, lore books and group chats on top.

## A word on Agnai itself

Agnai (the repository calls it Agnaistic) is a character roleplay chat app. The [README](https://github.com/agnaistic/agnai) pitches it as AI roleplay with personalized characters on the AI service of your choice, including rooms where several people talk to several bots.

On agnai.chat you can use its own models for free. The Third-Party service is the alternative: a preset ships each prompt to whichever OpenAI-compatible API you point it at, which means the model, the window and the bill all belong to that API. This guide wires that service to an uncensored roleplay build.

## Fastest route to a reply in character

1. In Agnai, make a new generation preset (or open the one you use) and find its connection settings. Everything that follows lives in that preset.
2. **AI Service**: **Third-Party**.
3. **Third Party Format**: **OpenAI Compat (Chat)**.
4. **Third Party URL**: `https://api.unrestrictable.ai/v1`. Stop after `/v1`. Agnai adds the chat path itself, and [GitHub issue #316](https://github.com/agnaistic/agnai/issues/316) shows what happens when the URL already ends in `/chat/completions`: the path appears twice.
5. **Third Party Key/Password**: your key, pasted whole.
6. **OpenAI Model Override**: the model id, for instance `euryale-70b-v2.3`.
7. Set the preset's context length no higher than the window in the table below.
8. Save, attach the preset to a chat, send one line. An answer in character confirms URL, key and id together.

To switch models later, duplicate the preset, swap the override and the context length, and name the copy after the model. One preset per build.

## Every label and its value

The connection sits inside a generation preset. Below are the field names exactly as Agnai's [source](https://github.com/agnaistic/agnai/blob/dev/common/adapters.ts) writes them (dev branch, checked 24 October 2026), each with what goes in it.

- AI Service: Third-Party An API you choose, in place of Agnai’s models
- Third Party Format: OpenAI Compat (Chat) Skip the (Chat - Legacy) entry
- Third Party URL: https://api.unrestrictable.ai/v1 Base URL; /v1 is the last thing in it
- Third Party Key/Password: sk-unr-live-… Made in the console, visible once
- OpenAI Model Override: euryale-70b-v2.3 An id from the Models page, character for character

Two of these trip people up. The format menu offers **OpenAI Compat (Chat)** right next to **OpenAI Compat (Chat - Legacy)**, and the source flags that second one as legacy, so take the first. And there is no field named Model for a third-party API: the id belongs in **OpenAI Model Override**, which is the value Agnai passes as the model name.

## Choosing the build

Each of the three builds below is tagged roleplay in the catalog and answers in the OpenAI wire format that OpenAI Compat (Chat) sends. Windows and prices come from the live catalog at render time.

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [Euryale 70B v2.3](https://unrestrictable.ai/models/euryale-70b-v2.3) euryale-70b-v2.3 | Roleplay | $1.972 | $1.972 | 20K | openai |
| [Gemma 4 31B Fabled](https://unrestrictable.ai/models/gemma-4-31b-fabled) gemma-4-31b-fabled | Roleplay | $0.35 | $1.575 | 262K | openai |

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

| Model id | Window in the catalog | Preset context length, ceiling |
| --- | --- | --- |
| [`euryale-70b-v2.3`](https://unrestrictable.ai/models/euryale-70b-v2.3) | 20,480 tokens | 20,480 |
| [`gemma-4-31b-fabled`](https://unrestrictable.ai/models/gemma-4-31b-fabled) | 262,144 tokens | 262,144 |

Windows as the live catalog listed them on 2026-11-16. "Not published" means the developer gives no figure; 32K is a safe opening value in that case.

These windows span an order of magnitude, so the context length has to live in the preset, not in memory. Reuse a preset tuned for `gemma-4-31b-fabled` on `euryale-70b-v2.3` and it ships more history than the smaller window can take. More Gemma 4 tunes are listed on the [uncensored Gemma page](https://unrestrictable.ai/uncensored/gemma).

## The price of a night in Agnai

Worked example: 200 messages in one session, roughly 250 tokens per reply. The first column sends about 4,000 tokens of character, memory and history each time; the second sends 16,000, which is what a lore book plus a long chat adds up to.

| Model | 200 turns, 4,000-token prompts | 200 turns, 16,000-token prompts |
| --- | --- | --- |
| [Euryale 70B v2.3](https://unrestrictable.ai/models/euryale-70b-v2.3) | $1.68 | $6.41 |
| [Gemma 4 31B Fabled](https://unrestrictable.ai/models/gemma-4-31b-fabled) | $0.36 | $1.20 |

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

Almost all of it is input. 200 × 4,000 comes to 800,000 input tokens, next to only 50,000 output tokens. Trimming the character card or lowering the context length changes the bill more than switching builds does. Per-token rates for every model are on the [pricing page](https://unrestrictable.ai/pricing).

## Test the key and the id first

One free request from a terminal tells you which ids your key can reach, before you touch the preset. Put your key in and run it.

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

A 200 carrying a list of ids proves the key. If your OpenAI Model Override value is in that list, only the URL and the format are left to get wrong. A 401 is the key, and the body says 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"}}
```

Both responses copied from the API on 24 October 2026.

## Agnai third-party errors, decoded

### 401: a key problem

"No API key was sent." is Agnai telling you the preset attached to this chat has an empty Third Party Key/Password. "The API key is not valid." means the key is mistyped, truncated or revoked. Make a new one in the console and paste all of it.

### 404 model_not_found: the id

Whatever is in OpenAI Model Override is not a catalog id: a typo, a display name, or a build that has been retired. Run the curl above and paste an id out of its output. When the 404 carries no such code, the URL is the problem: it has to end in `/v1` with nothing after.

### 402: the balance

Prepaid credit has run out. Top up in the console. A 402 refusal is never charged.

### Empty or scrambled replies

Look at Third Party Format. Kobold, Llama.cpp and OpenAI (Completion) sit in the same menu and send a different request body. OpenAI Compat (Chat) is the one this API expects.

### CORS errors in the browser

The API accepts requests from any origin and allows the Authorization header (verified 24 October 2026). It works whether the call comes from your browser tab or from the server hosting Agnai, so there is nothing to proxy.

Every model gets a fixed prompt once a day through the [daily real-model check](https://unrestrictable.ai/proof), which is how you know the id serves the model on its label. The [docs page](https://unrestrictable.ai/docs) has the base URL, the key format and the model id for every other client.

## Questions

### Does Agnai cost anything?

agnai.chat offers free chat on its own models, and the source is open on GitHub. Connect a Third-Party API and that API bills you instead: here it is per token, prepaid from $10. See per-token prices.

### Can Agnai use a proxy?

Yes, via the Third-Party AI Service. Third Party Format becomes OpenAI Compat (Chat), Third Party URL takes the API base ending in /v1, Third Party Key/Password takes the key, and OpenAI Model Override takes the model id.

### Which format option is the right one in Agnai?

OpenAI Compat (Chat). The menu also lists OpenAI Compat (Chat - Legacy), OpenAI (Completion), Kobold and more, each of which sends a request body this API does not expect.

### Where does the model id go in Agnai?

Into OpenAI Model Override, spelled the way the catalog spells it, such as euryale-70b-v2.3. That string is what Agnai hands to the third-party API as the model name. See the uncensored model list.

### Does Agnai run on my own server?

Yes. The code is agnaistic/agnai on GitHub, multi-user and multi-bot chat included. A Third-Party preset is filled in the same way whether the copy is yours or agnai.chat.

### How is this different from a jailbreak prompt that removes restrictions?

The builds here are uncensored fine-tunes or abliterated weights. The refusals are gone from the model itself, so the preset carries no jailbreak text and needs none. 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.
