Skip to content
Zenith / Docs
Zenith Cloud
OpenAI compatible

Cloud · OpenAI SDK

Configure the official OpenAI Python and Node SDKs against Zenith Cloud. Same client you already use — change base URL and key.

base_url https://zenithgw.com/api/v1
api_key zk_…
model auto

Install

Terminal
pip install openai
# or
npm install openai

First request

Choose your language. Python and Node.js use the official OpenAI SDK; Go, PHP, and curl show the same portable HTTP contract with no Zenith-specific package.

chat.py
from openai import OpenAI

client = OpenAI(
    base_url="https://zenithgw.com/api/v1",
    api_key="zk_YOUR_CLOUD_KEY",
)
response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello from Zenith"}],
)
print(response.choices[0].message.content)

Streaming

stream.py
stream = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Count to five."}],
    stream=True,
)
for event in stream:
    delta = event.choices[0].delta.content or ""
    print(delta, end="", flush=True)

Responses API

responses.py
resp = client.responses.create(
    model="auto",
    input="ping",
)
print(resp)

Tools

Cloud chat-completions accepts OpenAI-compatible tools, tool_choice, and response_format and forwards provider-specific shapes unchanged. Your Own Keys still uses the Zenith OpenAI-compatible path — storing an Anthropic or Gemini key does not enable those vendors’ native SDK protocols through Zenith.