Skip to content

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()])

Use Instant, Fast, Smart or Genius as the model. Any other name is refused with model_not_found.

  • POST /v1/chat/completions, with or without streaming; see OpenAI-compatible chat
  • POST /v1/responses, with or without streaming, including the OpenAI Agents SDK; see Responses API. In installer 4.6.0 for x86 and ARM64
  • GET /v1/models
  • JSON answers with response_format, or text.format on /v1/responses; see Structured JSON output
  • Images as data: URLs, on tiers whose capabilities.vision is true
  • Function calling on Smart and Genius (tiers whose capabilities.tools is true), including strict: true tools; 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: true or false on every JSON error that carries error.retryable, and the libraries obey it, so they stop resending errors that cannot succeed. A 429 is waited out with Retry-After. See which errors to retry.
  • Agents SDK. The OpenAI Agents SDK sends its function tools with strict: true by 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 to low, medium, high or xhigh lets 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.summary and text.verbosity are accepted and have no effect. An invalid value gets HTTP 400 that lists the accepted values. See the full list.
  • Answer length. Without max_tokens or max_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() and client.models.retrieve("Genius") both work. An unknown name gets 404 model_not_found. See Models.
  • Rate-limit headers. Answers carry x-ratelimit-limit-requests, x-ratelimit-remaining-requests and x-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, and truncation: "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, delete and input_items.list work. Unlike OpenAI, a response is kept only when the request sends store: 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.