Configure Your First API
To generate replies, Tavern Studio needs a model backend. This guide explains how to connect a cloud API or OpenAI-compatible endpoint.
Who this is for
- Users who want to use cloud models such as OpenAI-compatible services.
- Users seeing connection errors or missing model lists.
- Users who want to assign different model routes to different chats.
What you will learn
- What Base URL, API Key, and Model Name mean.
- How OpenAI-compatible APIs work.
- How to troubleshoot common connection failures.
- How chat-level model overrides fit into the workflow.
Why configure an API?
Tavern Studio manages your characters and prompt context, but a model backend generates the text. The API connection tells Tavern Studio where to send the prompt and which model should respond.
Common provider types
- Official cloud providers: services where you have a direct account and API key.
- Third-party gateways: services that expose a compatible API endpoint.
- OpenAI-compatible APIs: a common protocol used by many cloud and local model services.
Key, URL, and model
Open Settings, find the API section, and configure:
- Provider: choose the provider type.
- Base URL: enter the endpoint URL.
- API Key: paste your private key.
- Refresh Models: load available models.
- Model: choose the model for chat.
If the provider is compatible but the model list does not load, you may still be able to enter a model name manually if the app version supports it.
Chat-level overrides
Global API settings define the default backend. Individual chats may override the model or route through Chat Settings, which is useful when different characters need different models or costs.
Troubleshooting connection failures
Check the Base URL
Some providers require /v1, while others already include it. Avoid duplicating or omitting the required path.
Check network and proxy settings
If your network cannot reach the provider, configure a proxy if your environment requires one.
Check account quota
Expired trial credits or insufficient balance can cause authentication or quota errors even when the key is correct.
FAQ
Why can I refresh models but chat still fails?
The selected model may not be available for chat generation, or the model name may differ from what the provider expects.
Can I type a model name manually?
Use the model list when possible. Manual model names should match the provider’s exact identifier.
Why did behavior change after switching models?
Different models respond differently to the same prompt and preset. Review your preset after changing models.
Next steps
- Start Your First Chat: test the model in a real conversation.
- Preset Basics: tune generation behavior.
- Local GGUF Model Guide: try local model execution.