Use your OpenAI client with ZenithAI
ZenithAI speaks the OpenAI Chat Completions and Responses formats 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 streaming; see OpenAI-compatible chatPOST /v1/responses, with or without streaming, including the OpenAI Agents SDK; see Responses API. In installer 4.6.0 for x86 and ARM64GET /v1/models- JSON answers with
response_format, ortext.formaton/v1/responses; see Structured JSON output - Images as
data:URLs, on tiers whosecapabilities.visionis true - Function calling on Smart and Genius (tiers whose
capabilities.toolsis true), includingstrict: truetools; see Function calling and tools
How do the OpenAI libraries behave with ZenithAI?
Section titled “How do the OpenAI libraries behave with ZenithAI?”- Retries. The official Python and JavaScript libraries resend failed requests twice by default. ZenithAI
sends
x-should-retry: trueorfalseon every JSON error that carrieserror.retryable, and the libraries obey it, so they stop resending errors that cannot succeed. A 429 is waited out withRetry-After. See which errors to retry. - Agents SDK. The OpenAI Agents SDK sends its function tools with
strict: trueby default. On ZenithAI their calls are then generated to match the tool’s JSON schema. See Function calling and tools. - Thinking.
reasoning_effort(on Responses,reasoning.effort) set tolow,medium,highorxhighlets Genius think before it answers: slower, usually more careful. Other tiers ignore it. See thinking on Genius. - Newer SDK fields.
verbosity,prompt_cache_key,safety_identifier,logit_bias: {},modalities: ["text"]and, on Responses,reasoning.summaryandtext.verbosityare accepted and have no effect. An invalid value gets HTTP 400 that lists the accepted values. See the full list. - Answer length. Without
max_tokensormax_output_tokens, a turn without active tools can run up to 8,192 tokens, depending on the context window. Set a limit yourself to control it. - Models.
client.models.list()andclient.models.retrieve("Genius")both work. An unknown name gets 404model_not_found. See Models. - Rate-limit headers. Answers carry
x-ratelimit-limit-requests,x-ratelimit-remaining-requestsandx-ratelimit-reset-requests, as on OpenAI. See rate-limit headers. - Computer use and long histories. On
/v1/responses, OpenAI’s computer tool works on Genius, andtruncation: "auto"drops the oldest items when a conversation no longer fits. See Computer use. - Stored responses. On
/v1/responses,store: true,previous_response_id,client.responses.retrieve,deleteandinput_items.listwork. Unlike OpenAI, a response is kept only when the request sendsstore: true. See stored responses.
Details and limits are in OpenAI-compatible chat and Responses API.
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 and GET /v1/models, and since 12-10-2026 POST /v1/responses, all with streaming where it applies. /v1/responses comes with installer 4.6.0 for x86 and ARM64 servers. There is no /v1/completions.
