Skip to main content

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.ai and the inference path.
  • Your API key — sent as X-API-KEY or 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 the model field 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.

Looking for agents instead of self-hosted models?

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.