OpenAI Compatible Inference
Overview
Serenity* Star's self-hosted inference models can be invoked through OpenAI-compatible endpoints. Because they speak the same request and response shapes as OpenAI's own APIs (both Chat Completions and Responses), you can reach them with the tools you already use, from a plain curl request to the official OpenAI SDKs to editors that accept a custom model provider.
Unlike AIProxy, these endpoints expose the models directly — not agents. There is no configured agent in front of the model, and no system prompt, instructions, knowledge, or skills shaping the call. The response depends purely on the model you select and the request you send.
Whichever route you choose, the fundamentals are the same:
- One base URL — point your client at
https://api.serenitystar.aiand the inference path. - Your API key — sent as
X-API-KEYor as a bearer token, so the OpenAI SDKs authenticate out of the box. - The model in the URL path — the model is selected by
/api/v2/inference/{model}/..., not by themodelfield in the request body.
The pages below show how to put those pieces together in different ways.
REST API
The raw HTTP reference — endpoints, model selection, and tools, with cURL examples.
Python
Call the same endpoints with the official OpenAI Python SDK — just change the base URL and API key.
VS Code Chat
Add a self-hosted inference model as a custom model in VS Code Chat and use it while you code.
The endpoints described here call a self-hosted model directly, with no agent in front of it. If you want to invoke a configured AIProxy agent through OpenAI-compatible endpoints instead, see OpenAI Compatible under Agents.