Wild West API

Chat completion vs text completion: which one to use

Chat completion APIs take a list of role-tagged messages and format them server side, while text completion APIs take one raw prompt string that you format yourself.

The two kinds of API

Text completion is the older style. You send one string, the model continues it. The endpoint is often /v1/completions, and local backends like KoboldCpp, llama.cpp and text-generation-webui expose their own versions. Everything about structure, including where turns start and end, is up to you.

Chat completion sends a list of messages, each with a role (system, user, assistant, tool), to an endpoint like /v1/chat/completions. The server applies the model's own chat template, inserting the special tokens the model was trained on. Anthropic's /v1/messages is a chat-style API too.

What changes in practice

  • Formatting. With text completion you must pick the right instruct template; a wrong one degrades output. With chat completion the server handles it.
  • Prefill and control. Text completion lets you end the prompt anywhere, so prefill and odd structures are easy. Chat completion is more constrained.
  • Samplers. Local text completion backends usually expose many samplers (min P, DRY, XTC, Mirostat). Hosted chat APIs reliably support the OpenAI set: temperature, top P, the penalties, logit bias, stop, max tokens.
  • Features. Tool calling, image input and structured reasoning output are built around chat completion.

In SillyTavern

SillyTavern's API connection panel has separate Text Completion and Chat Completion types, and they use different settings screens. Text Completion uses the Advanced Formatting panel (context template, instruct template). Chat Completion uses the prompt manager in the sampler panel, and the instruct template settings do not apply to it. A frequent source of confusion is editing instruct templates while connected through Chat Completion and seeing no change.

Common mistakes

  • Connecting a chat-only API through Text Completion and getting errors or unformatted output.
  • Copying a text completion preset full of backend samplers to a chat API and assuming they apply.
  • Putting role markers like <|im_start|> inside chat messages. The server adds those; doubling them confuses the model.
  • Expecting identical output after switching modes. The same card and settings can read differently because the prompt layout changes.

Which to use with Wild West API

Wild West API exposes chat-style endpoints: OpenAI-compatible /v1/chat/completions and Anthropic-compatible /v1/messages. In SillyTavern, choose Chat Completion, source Custom (OpenAI-compatible), and set the endpoint to https://wildwestapi.com/v1. Step by step instructions are on the SillyTavern page.

FAQ

Does the instruct template matter with chat completion?

No. The server applies the model's own chat template, so SillyTavern's instruct template settings are not used in Chat Completion mode.

Which is better for roleplay?

Text completion gives more control and more samplers on local backends. Chat completion is simpler, supports tools and images, and is what most hosted APIs offer.

Related

Uncensored AI models on one key

OpenAI and Anthropic compatible, pay as you go. New to it? Start with uncensored AI, explained.