OpenAI-Compatible API Setup in Tavern Studio

OpenAI-compatible API setup usually needs three things: a base URL, an API key or token if required, and a model ID. Tavern Studio keeps this provider configuration separate from character cards and presets so you can switch model routes without rewriting your characters.

Many providers and local servers expose OpenAI-style /chat/completions APIs. Some do not, so always check the provider's documentation.

Who This Is For

  • Users connecting OpenAI-compatible cloud services.
  • Developers using local model servers.
  • People with custom gateways or reverse proxies.
  • SillyTavern users migrating API settings.

Core Content

An OpenAI-compatible endpoint generally uses bearer-token authentication and a chat completions body with model and messages. Local servers may skip API keys. Custom gateways may add their own headers, account IDs, or paths.

Do not store provider details inside character cards. Keep characters, presets, and model routes separate.

How Tavern Studio Handles It

Tavern Studio supports OpenAI-compatible API configuration and can map common services during SillyTavern migration. Custom endpoints, local services, reverse proxies, Azure OpenAI, Cloudflare Workers AI, missing base URLs, and missing default models may require manual setup.

The prompt assembler can prepare structured message arrays for OpenAI-style routes.

Operation Steps

  1. Open API or model connection settings.
  2. Choose an OpenAI-compatible route.
  3. Enter the base URL.
  4. Enter the API key if the endpoint requires one.
  5. Enter or select the model ID.
  6. Save the connection.
  7. Send a short test message.
  8. Attach the route to the chat or preset workflow you want to use.

FAQ

What is an OpenAI-compatible API?

It is an endpoint that follows OpenAI-style request and response patterns, commonly including /chat/completions.

Can I use a local server?

Yes, if the server exposes a compatible API and the base URL/model settings are correct.

Does Tavern Studio bypass provider API keys?

No. Use valid credentials from the provider or your own local service.

Why does my endpoint fail?

Common causes include wrong base URL, missing /v1, wrong model ID, invalid key, proxy issues, or provider-specific differences.

Can one character use multiple endpoints?

The same character can be tested with different routes by changing chat/model settings and presets.

Next Step