Integrations

OpenAI Python SDK with zurelay

Official OpenAI library for Python. Made by OpenAI.

Model in the examples:

Set it up

  1. 1

    Install the SDK: pip install openai.

  2. 2

    Create the client with zurelay’s base URL and your key.

  3. 3

    Call any chat model in the catalog by its ID. AsyncOpenAI takes the same arguments.

Configuration

import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.zurelay.com/v1",
api_key=os.environ["ZURELAY_API_KEY"],
)
completion = client.chat.completions.create(
model="claude-opus-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
The SDK also reads OPENAI_BASE_URL and OPENAI_API_KEY, so existing code can switch with two environment variables.

OpenAI Python SDK’s own docs

Questions, or something missing? Ask support in your dashboard or email support@zurelay.com.