What is a Chat Completions API (OpenAI-compatible)?
Updated
A Chat Completions API is a web interface for language models: you send a POST request with a model name and a list of messages, each with a role (system, user or assistant) and content, and get back the model's next message. The format started with OpenAI and is now widely copied, so an "OpenAI-compatible" provider like UnsavedAI works in SillyTavern, JanitorAI and other apps with just a URL, key and model name.
Try it now, free, no account neededStart a story with Captain Mireya BlackShe captured you. Now she wants to recruit you.What a request looks like
The request goes to the base URL plus /chat/completions, with your key in an Authorization: Bearer header. The body is JSON:
{ "model": "gemma-4-12b", "messages": [ { "role": "system", "content": "You are Captain Mireya Black, a pirate captain..." }, { "role": "user", "content": "*I tug at the ropes.* You'll regret this." } ], "max_tokens": 500, "temperature": 0.9, "stream": true }
The reply comes back with the new message under choices[0].message.content. With stream set to true it arrives piece by piece, so apps can show the text as it is written.
Why "compatible" matters
Because so many providers accept the same shape, an app only needs to support it once. That is why SillyTavern has a Custom (OpenAI-compatible) source and JanitorAI has proxy settings: point them at any compatible URL and they work. For you, it means one account and one key can serve several apps.
The API has no memory of its own. Every request carries the whole conversation the model should see, and the app decides what goes in: the character card as a system message, the history as user and assistant messages, and sampler settings like temperature and min_p.
Common mistakes
- Mixing up the base URL and the full endpoint. SillyTavern wants the base (ending in /v1); JanitorAI wants the full URL ending in /chat/completions.
- Putting the key in a public website or app bundle. Keep it on a server.
- Assuming every compatible API supports every feature. Images, tools and embeddings are separate from text chat.
- Retrying failed requests instantly in a loop. On a 429, wait and back off.
The UnsavedAI API
Make a key at /setup and use the models gemma-4-12b (all plans) or gemma-4-31b (Priority), with about 61,000 tokens of context. Supported settings include temperature, top_p, top_k, min_p, repetition_penalty, presence and frequency penalties, seed and stop; unknown fields are ignored, so existing presets work. Free writes one reply at a time and Priority two. API traffic is never stored. Step-by-step guides: SillyTavern, JanitorAI and building your own app. If you just want to chat, Captain Mireya Black and every other house character work right in the browser.
Questions people ask
Is a Chat Completions API the same as ChatGPT?
No. ChatGPT is an app; Chat Completions is a request format. Many providers and models use it.
Do I need to code to use one?
No. Apps like SillyTavern and JanitorAI make the requests for you; you only paste the URL, key and model name.
What is the difference between Chat Completions and Completions?
The older Completions style takes one block of text and continues it. Chat Completions takes a list of role-tagged messages, which suits chat apps.
