# SillyTavern custom OpenAI endpoint guide

Connect SillyTavern to a custom OpenAI-compatible endpoint: Chat Completion, Custom source, base URL ending in /v1, API key, model list, context settings and fixes. 18+.

## Short answer

In SillyTavern, open **API Connections**, set the API to **Chat Completion**, choose **Custom (OpenAI-compatible)** as the source, and enter `https://tryunrestrictedai.com/v1` as the endpoint (no `/chat/completions`). Paste your API key, pick a model from the list, and click **Test Message**.

18+ only. The click-by-click version with copy buttons is on the [SillyTavern setup page](/api/integrations/sillytavern).




## Steps



- Create an API key in the [console](/api/console) and set a per-key budget. API use needs a plan (Starter is $19 with $19 of usage), a top-up from $5, or the one-time $0.50 API trial for verified accounts.
- In SillyTavern, open **API Connections** (the plug icon).
- Set **API** to `Chat Completion` and **Chat Completion Source** to `Custom (OpenAI-compatible)`, as in the official SillyTavern docs.
- **Custom Endpoint (Base URL):** `https://tryunrestrictedai.com/v1`. The SillyTavern docs say: "try adding /v1 to the end of the endpoint URL. Do NOT add the /chat/completions suffix."
- **API key:** paste it.
- **Model:** SillyTavern fills the dropdown from `/v1/models`, which we serve for your key. You can also type an ID such as `venice-uncensored-role-play`.
- Click **Connect**, then **Test Message**.


## Settings that matter



- **Context Size:** 32,768 or less (our service ceiling). **Max Response Length:** 4,096 or less; larger values are lowered to the model’s limit instead of failing.
- **Long chats:** up to 256 messages per request are accepted; the 32,768-token context is the real limit.
- **Prompt Post-Processing:** if you get role-order errors, choose "Merge consecutive messages from the same role" or "Semi-strict".
- **Streaming:** supported (server-sent events).


## Which samplers are used (tested 8 Nov 2026)

We sent SillyTavern’s default Chat Completion request shape to production, including message `name` fields, an empty system message and every default sampler. It returned a reply. Here is what happens to each field:



| Field | What we do |
| --- | --- |
| `temperature` (0 to 2), `top_p`, `max_tokens`, `stream` | Forwarded to the model |
| `stop` (up to 4 strings) | Forwarded; extra or empty stop strings are dropped |
| `top_k`, `min_p`, `top_a`, `repetition_penalty`, `presence_penalty`, `frequency_penalty`, `typical_p`, `tfs`, `seed`, `logit_bias`, `reasoning_effort`, mirostat, DRY and XTC settings | Accepted and ignored |
| `max_completion_tokens` | Treated as `max_tokens` |
| Message `name`, empty messages, text-only content arrays, `developer` role | Normalized |
| `n` above 1, `logprobs: true`, tools, images | Refused with a 400 that names the field |

## Cost

Same math as the [JanitorAI guide](/learn/janitorai-proxy-setup). At 8,000 input and 300 output tokens on `venice-uncensored-role-play` ($1 and $4 per 1M), a reply costs about $0.009. Trimming context is the biggest saving.




## Troubleshooting

To see the raw error, test outside SillyTavern with the command below. Error codes are explained in [errors](/docs/errors).



```
curl https://tryunrestrictedai.com/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"venice-uncensored-1-2","messages":[{"role":"user","content":"hi"}],"max_tokens":50}'
```

| Symptom | Fix |
| --- | --- |
| Empty model list | Check that the source is **Custom**, not "OpenAI"; the URL ends in `/v1`; and the key has no spaces |
| 413 | Lower Context Size |
| 400 naming a field | Turn off that feature (for example token probabilities or function calling) |
| "API not responding" warning while chat works | SillyTavern has a "Bypass API status check" option |

## FAQ

**Base URL or full URL?**

SillyTavern wants the base URL ending in `/v1`; JanitorAI wants the full `/v1/chat/completions` path.

**Does it support Text Completion mode?**

No. Use Chat Completion; we expose `/v1/chat/completions` only.

**Can I use images or tool calling?**

Image input and tool calling are not supported in chat completions. Image generation is a separate endpoint, `/v1/images/generations`; see [Generate images](/api/docs/images).

**Which model for role-play?**

`venice-uncensored-role-play` is Venice’s role-play route. Abliterated Llama 3.3 70B routes are also available. Test with your own card, and compare prices in the [API price comparison](/compare/uncensored-llm-api-pricing).

## Sources

- [SillyTavern docs: OpenAI-compatible connections (checked 8 Nov 2026)](https://docs.sillytavern.app/usage/api-connections/openai/)
- [Unrestricted AI model catalog (JSON)](https://tryunrestrictedai.com/api/catalog)
- [Unrestricted AI OpenAPI spec](https://tryunrestrictedai.com/openapi.json)
- [Unrestricted AI limits](https://tryunrestrictedai.com/api/docs/limits)

Canonical: https://tryunrestrictedai.com/learn/sillytavern-custom-openai-endpoint
