# zurelay API documentation > One OpenAI- and Anthropic-compatible API for Claude, GPT, Gemini, Grok, DeepSeek, Nano Banana, GPT Image and Seedance, at a fraction of each lab's price. Source: https://zurelay.com/docs zurelay is one API for the AI models you already use, at a fraction of each lab’s own price. Chat with Anthropic, OpenAI, xAI, Xiaomi, DeepSeek, Google, Z.ai, Moonshot AI, Alibaba, Tencent and MiniMax models, make and edit pictures with Nano Banana and GPT Image, and make videos with Seedance, all with one key and one balance. It speaks OpenAI’s API and Anthropic’s, so the SDKs, frameworks and tools you have work as they are: change the base URL and the key, keep your code. ## Base URLs | For | Base URL | | --- | --- | | OpenAI SDKs, and anything OpenAI-compatible | `https://api.zurelay.com/v1` | | Anthropic SDKs and Claude Code | `https://api.zurelay.com` | Send your key as `Authorization: Bearer zr_live_…` (or `x-api-key`, as Anthropic’s SDKs do). Create keys in the dashboard under [API keys](https://zurelay.com/app/keys). ## Your first request **Python** (`main.py`): ```python import os from openai import OpenAI client = OpenAI( base_url="https://api.zurelay.com/v1", api_key=os.environ["ZURELAY_API_KEY"], ) response = client.chat.completions.create( model="claude-sonnet-5-5", messages=[ { "role": "user", "content": "Explain what an API gateway does in one paragraph." } ], ) print(response.choices[0].message.content) ``` **Node.js** (`index.mjs`): ```javascript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.zurelay.com/v1", apiKey: process.env.ZURELAY_API_KEY, }); const response = await client.chat.completions.create({ "model": "claude-sonnet-5-5", "messages": [ { "role": "user", "content": "Explain what an API gateway does in one paragraph." } ] }); console.log(response.choices[0].message.content); ``` **cURL**: ```bash curl https://api.zurelay.com/v1/chat/completions \ -H "Authorization: Bearer $ZURELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-5-5", "messages": [ { "role": "user", "content": "Explain what an API gateway does in one paragraph." } ] }' ``` ## What you can do - [Chat completions](https://zurelay.com/docs/chat): Messages, streaming, tools, structured output and reasoning. - [Images, PDFs, audio and video](https://zurelay.com/docs/multimodal): Send files to the models that read them. - [Image generation](https://zurelay.com/docs/images): Nano Banana and GPT Image, at 1K, 2K and 4K. - [Image editing](https://zurelay.com/docs/image-editing): Edit a picture or combine up to 16 reference images. - [Video generation](https://zurelay.com/docs/video): Seedance from a prompt, a first frame or reference images. - [Smart routing](https://zurelay.com/docs/smart-routing): A close alternative answers when a model is down. ## Endpoints | Method | Path | What it does | | --- | --- | --- | | POST | `/v1/chat/completions` | Chat with any text model (OpenAI format) | | POST | `/v1/messages` | Chat with Claude models (Anthropic format) | | POST | `/v1/messages/count_tokens` | Count a Messages request’s input tokens | | POST | `/v1/images/generations` | Make images, optionally from reference images | | POST | `/v1/images/edits` | Edit images (OpenAI’s multipart form, or JSON) | | POST | `/v1/videos` | Start a video | | GET | `/v1/videos/{id}` | A video’s status, and its link when done | | GET | `/v1/videos/{id}/content` | Download a finished video | | GET | `/v1/videos` | Your recent videos | | GET | `/v1/models` | Every model, with what it reads | ## How it works Every request is served by the model you name, at its published quality, through a fleet that heals itself: if one path to a model stalls or errors, the request is retried on another before anything reaches you, so a hiccup costs you a moment instead of an error. When a model is fully down, [smart routing](https://zurelay.com/docs/smart-routing) can answer with its closest alternative. You pay as you go from a prepaid balance, at the per-token, per-image or per-second prices on the [models page](https://zurelay.com/docs/models). Failed requests are free. ## For AI assistants and agents Building with ChatGPT, Claude, Cursor or an agent? Every page has **Copy page** at the top, which copies it as Markdown to paste into any AI, and the docs are published in the formats agents read: - [llms.txt](https://zurelay.com/llms.txt): what zurelay is, how to call it, and a link to every page. - [llms-full.txt](https://zurelay.com/llms-full.txt): all the docs in one Markdown file, with today’s models and prices. - Any page as Markdown: add `.md` to its address, as in [/docs/quickstart.md](https://zurelay.com/docs/quickstart.md).