# OpenAI Python SDK with zurelay > Official OpenAI library for Python. Made by OpenAI. Source: https://zurelay.com/docs/integrations/openai-python The examples use `claude-opus-5-5`. Any model ID from [the models page](https://zurelay.com/docs/models) works. ## Set it up 1. Install the SDK: `pip install openai`. 2. Create the client with zurelay’s base URL and your key. 3. Call any chat model in the catalog by its ID. `AsyncOpenAI` takes the same arguments. ## Configuration **Chat** (`app.py`): ```python 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) ``` **Images** (`image.py`): ```python import os from openai import OpenAI client = OpenAI( base_url="https://api.zurelay.com/v1", api_key=os.environ["ZURELAY_API_KEY"], ) result = client.images.generate( model="nano-banana-pro", prompt="A glass prism splitting white light into a rainbow", n=1, ) print(result.data[0].url) ``` > **Note:** 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](https://github.com/openai/openai-python)