---
title: "SillyTavern API: Connect FreeTheAI (Custom OpenAI)"
description: "Connect SillyTavern to AI models with FreeTheAI. Chat Completion, Custom (OpenAI-compatible) source, base URL, key, and model ID, step by step."
url: https://freetheai.org/setup/sillytavern
language: en
updated: 2026-09-29
---

# SillyTavern API: Connect FreeTheAI (Custom OpenAI)

SillyTavern talks to FreeTheAI through its Chat Completion API with the Custom (OpenAI-compatible) source. It lists every model your key can use.

## Settings

- API: `Chat Completion`
- Chat Completion Source: `Custom (OpenAI-compatible)`
- Custom Endpoint (Base URL): `https://api.freetheai.org/v1`
- Custom API Key: `your FreeTheAI key (ftai_..., 53 characters)`
- Model ID: `glm-5.3`
- Prompt Post-Processing: `Semi-strict (alternating roles)`

## Steps

1. **Open API Connections.** Click the plug icon in the top bar.
2. **Choose the source.** Set API to Chat Completion and Chat Completion Source to Custom (OpenAI-compatible).
3. **Enter the endpoint and key.** Paste the base URL into Custom Endpoint (Base URL). SillyTavern adds /chat/completions itself, so do not add it. Paste your key into Custom API Key.
4. **Pick a model and connect.** Type a model ID into Enter a Model ID, or pick one from Available Models after connecting. Press Connect.
5. **Set Prompt Post-Processing.** On the same screen, set Prompt Post-Processing to Semi-strict. With None, some models answer "Bad Request" because the chat can reach them without a message from you.

## Tips

- Your key is hidden after you press Connect. Keep a copy somewhere safe.
- If replies stop early, raise Max Response Length in the sampler panel.
- Save the connection as a Connection Profile to switch models quickly.

## Troubleshooting

**SillyTavern connects but no models appear. What now?**

Type the model ID by hand in Enter a Model ID, for example glm-5.3. Also check that your account follows a provider of that model.

**Should the base URL end in /v1?**

Yes. Use https://api.freetheai.org/v1. SillyTavern appends /chat/completions.

**SillyTavern says "API returned an error: Bad Request". How do I fix it?**

Set Prompt Post-Processing to Semi-strict in API Connections and try again. Some models need at least one message from you in every request, and that setting makes sure there is one.

Checked: Checked against SillyTavern's source (release branch, API connection panel) on 2026-09-29.
