Use your OpenAI client with ZenithAI
ZenithAI speaks the OpenAI chat format at /v1. If your code already uses the OpenAI libraries, change
just two things: the base URL and the model name.
from openai import OpenAI
client = OpenAI(base_url="https://dummydomain/v1", api_key="YOUR_API_KEY")print([m.id for m in client.models.list()])import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://dummydomain/v1", apiKey: process.env.API_KEY });const models = await client.models.list();console.log(models.data.map((m) => m.id));Use Instant, Fast, Smart or Genius as the model. Any other name is refused with
model_not_found.
What works
Section titled “What works”POST /v1/chat/completions, with or without streamingGET /v1/models- JSON answers with
response_format; see Structured JSON output - Images as
data:URLs, on tiers whosecapabilities.visionis true - Function calling on Smart and Genius (tiers whose
capabilities.toolsis true)
Details and limits are in OpenAI-compatible chat.
Common questions
Does code written for the OpenAI API work with ZenithAI?
Most chat code works after two changes. Set the base URL to your server followed by /v1, and use a ZenithAI tier name such as Fast, Smart or Genius as the model.
Which OpenAI endpoints does ZenithAI support?
POST /v1/chat/completions, with or without streaming, and GET /v1/models. There is no /v1/completions or /v1/responses. For a single prompt without a message list, use the /generate endpoint.