OpenAI-compatible base URLs. Every provider, one table.

The base URL to give the OpenAI SDK for 28 providers, with a model ID and what each one serves, and the ANTHROPIC_BASE_URL values Claude Code takes. Every URL is from the provider's own docs, read October 26, 2026.

client.py
from openai import OpenAI
client = OpenAI(
base_url="https://api.zurelay.com/v1", # any URL from the table
api_key="<YOUR_API_KEY>",
)
reply = client.chat.completions.create(
model="claude-opus-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

OpenAI SDK

base_url for every provider. Copy, paste, done.

Pass one of these as base_url in Python or baseURL in Node, with that provider's key and one of its model IDs. Each provider's name links to the docs the URL came from.

Model labs

The labs' own APIs, through the OpenAI SDK.

  • OpenAI
    https://api.openai.com/v1

    gpt-6-astra

    The native API: Responses, Chat Completions, embeddings and the rest.

  • Anthropic (OpenAI SDK layer)
    https://api.anthropic.com/v1/

    claude-opus-5-5

    Chat Completions only. Anthropic says the layer isn't meant for production; it ignores response_format and strict and has no prompt caching. Its own Messages API is below.

  • Google Gemini
    https://generativelanguage.googleapis.com/v1beta/openai/

    gemini-3.8-flash

    Chat Completions, embeddings, image generation and batch. Keep the trailing slash in Python.

  • xAI (Grok)
    https://api.x.ai/v1

    grok-4.7

    Responses is xAI's recommended API; it calls Chat Completions legacy.

  • DeepSeek
    https://api.deepseek.com

    deepseek-v4-pro

    Chat Completions. The docs give the URL without /v1.

  • Mistral
    https://api.mistral.ai/v1

    mistral-large-latest

    Chat, fill-in-the-middle, embeddings, files, batch, OCR and audio.

  • Moonshot (Kimi)
    https://api.moonshot.ai/v1

    kimi-k3.1-pro

    Chat Completions. The docs moved to platform.kimi.ai; the API host is still api.moonshot.ai.

  • Alibaba (Qwen, Model Studio Singapore)
    https://dashscope-intl.aliyuncs.com/compatible-mode/v1

    qwen3.8-max

    Chat Completions. Alibaba now recommends a workspace host, https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1. Keys only work in their own region.

  • Z.ai (GLM)
    https://api.z.ai/api/paas/v4/

    glm-5.3

    Chat Completions, at /api/paas/v4, not /v1. In China, Zhipu's https://open.bigmodel.cn/api/paas/v4/.

  • MiniMax
    https://api.minimax.io/v1

    MiniMax-M3.1-Flash

    Chat Completions with tools and thinking. temperature and top_p are accepted but have no effect.

  • Perplexity
    https://api.perplexity.ai/v1

    sonar

    The Agent API, through the SDK's responses.create(). Sonar Chat Completions support ended on September 27, 2026; Sonar requests are being moved to the Agent API.

Model labs: OpenAI-compatible base URLs
ProviderBase URLModel ID, for exampleNotes
OpenAIhttps://api.openai.com/v1gpt-6-astraThe native API: Responses, Chat Completions, embeddings and the rest.
Anthropic (OpenAI SDK layer)https://api.anthropic.com/v1/claude-opus-5-5Chat Completions only. Anthropic says the layer isn't meant for production; it ignores response_format and strict and has no prompt caching. Its own Messages API is below.
Google Geminihttps://generativelanguage.googleapis.com/v1beta/openai/gemini-3.8-flashChat Completions, embeddings, image generation and batch. Keep the trailing slash in Python.
xAI (Grok)https://api.x.ai/v1grok-4.7Responses is xAI's recommended API; it calls Chat Completions legacy.
DeepSeekhttps://api.deepseek.comdeepseek-v4-proChat Completions. The docs give the URL without /v1.
Mistralhttps://api.mistral.ai/v1mistral-large-latestChat, fill-in-the-middle, embeddings, files, batch, OCR and audio.
Moonshot (Kimi)https://api.moonshot.ai/v1kimi-k3.1-proChat Completions. The docs moved to platform.kimi.ai; the API host is still api.moonshot.ai.
Alibaba (Qwen, Model Studio Singapore)https://dashscope-intl.aliyuncs.com/compatible-mode/v1qwen3.8-maxChat Completions. Alibaba now recommends a workspace host, https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1. Keys only work in their own region.
Z.ai (GLM)https://api.z.ai/api/paas/v4/glm-5.3Chat Completions, at /api/paas/v4, not /v1. In China, Zhipu's https://open.bigmodel.cn/api/paas/v4/.
MiniMaxhttps://api.minimax.io/v1MiniMax-M3.1-FlashChat Completions with tools and thinking. temperature and top_p are accepted but have no effect.
Perplexityhttps://api.perplexity.ai/v1sonarThe Agent API, through the SDK's responses.create(). Sonar Chat Completions support ended on September 27, 2026; Sonar requests are being moved to the Agent API.

Gateways and hosts

Services that serve many labs' models, or open models, on one key.

  • Zurelay
    https://api.zurelay.com/v1

    claude-opus-5-5

    Chat Completions for every chat model (Claude, GPT, Gemini, DeepSeek and more), plus images, video and speech. One key for all of them.

  • OpenRouter
    https://openrouter.ai/api/v1

    anthropic/claude-opus-5

    Chat Completions. Model IDs are lab/model.

  • Vercel AI Gateway
    https://ai-gateway.vercel.sh/v1

    anthropic/claude-opus-5

    Chat Completions, embeddings and the model list.

  • Groq
    https://api.groq.com/openai/v1

    llama-3.3-70b-versatile

    Chat, Responses and audio. Note the /openai/v1 path.

  • Together AI
    https://api.together.ai/v1

    MiniMaxAI/MiniMax-M3

    Chat, completions, embeddings, images and audio. The docs now use api.together.ai; US and Canada hosts are us-api and ca-api.

  • Fireworks AI
    https://api.fireworks.ai/inference/v1

    accounts/fireworks/models/glm-5p3-flash

    Chat and completions. Note the /inference/v1 path.

  • Cerebras
    https://api.cerebras.ai/v1

    qwen-3.8-27b

    Chat and completions, with streaming.

  • DeepInfra
    https://api.deepinfra.com/v1/openai

    deepseek-ai/DeepSeek-V4-Flash-0731

    Chat Completions. The path is /v1/openai, in that order.

  • Hugging Face
    https://router.huggingface.co/v1

    openai/gpt-oss-120b:fastest

    Chat Completions only. A suffix picks the provider: :fastest, :cheapest or a provider's name.

  • NVIDIA NIM
    https://integrate.api.nvidia.com/v1

    meta/muse-glimmer-30b

    Chat Completions for the models hosted on build.nvidia.com.

  • SambaNova
    https://api.sambanova.ai/v1

    Meta-Llama-3.3-70B-Instruct

    Chat Completions and Responses.

  • Azure OpenAI
    https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/

    Your deployment's name

    Responses and Chat Completions. The model is your deployment's name, and the v1 path needs no api-version.

  • Cloudflare Workers AI
    https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1

    @cf/meta/llama-3.1-8b-instruct

    Chat and embeddings, with your account ID in the path and an API token as the key.

Gateways and hosts: OpenAI-compatible base URLs
ProviderBase URLModel ID, for exampleNotes
Zurelayhttps://api.zurelay.com/v1claude-opus-5-5Chat Completions for every chat model (Claude, GPT, Gemini, DeepSeek and more), plus images, video and speech. One key for all of them.
OpenRouterhttps://openrouter.ai/api/v1anthropic/claude-opus-5Chat Completions. Model IDs are lab/model.
Vercel AI Gatewayhttps://ai-gateway.vercel.sh/v1anthropic/claude-opus-5Chat Completions, embeddings and the model list.
Groqhttps://api.groq.com/openai/v1llama-3.3-70b-versatileChat, Responses and audio. Note the /openai/v1 path.
Together AIhttps://api.together.ai/v1MiniMaxAI/MiniMax-M3Chat, completions, embeddings, images and audio. The docs now use api.together.ai; US and Canada hosts are us-api and ca-api.
Fireworks AIhttps://api.fireworks.ai/inference/v1accounts/fireworks/models/glm-5p3-flashChat and completions. Note the /inference/v1 path.
Cerebrashttps://api.cerebras.ai/v1qwen-3.8-27bChat and completions, with streaming.
DeepInfrahttps://api.deepinfra.com/v1/openaideepseek-ai/DeepSeek-V4-Flash-0731Chat Completions. The path is /v1/openai, in that order.
Hugging Facehttps://router.huggingface.co/v1openai/gpt-oss-120b:fastestChat Completions only. A suffix picks the provider: :fastest, :cheapest or a provider's name.
NVIDIA NIMhttps://integrate.api.nvidia.com/v1meta/muse-glimmer-30bChat Completions for the models hosted on build.nvidia.com.
SambaNovahttps://api.sambanova.ai/v1Meta-Llama-3.3-70B-InstructChat Completions and Responses.
Azure OpenAIhttps://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/Your deployment's nameResponses and Chat Completions. The model is your deployment's name, and the v1 path needs no api-version.
Cloudflare Workers AIhttps://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1@cf/meta/llama-3.1-8b-instructChat and embeddings, with your account ID in the path and an API token as the key.

On your own machine

Local servers' default addresses. The SDK still wants a key; most ignore it.

  • Ollama
    http://localhost:11434/v1/

    gpt-oss:20b

    Chat, completions, embeddings, Responses and the model list. Any key works.

  • LM Studio
    http://localhost:1234/v1

    The model you loaded

    Chat, completions, Responses, embeddings and the model list.

  • vLLM
    http://localhost:8000/v1

    Qwen/Qwen2.5-1.5B-Instruct

    Chat, completions, Responses and embeddings. The key is "EMPTY" unless you start it with --api-key.

  • LiteLLM proxy
    http://0.0.0.0:4000

    An alias from your proxy config

    Chat, embeddings, images, audio and Anthropic's /messages, with a virtual key. The docs give the URL without /v1.

On your own machine: OpenAI-compatible base URLs
ProviderBase URLModel ID, for exampleNotes
Ollamahttp://localhost:11434/v1/gpt-oss:20bChat, completions, embeddings, Responses and the model list. Any key works.
LM Studiohttp://localhost:1234/v1The model you loadedChat, completions, Responses, embeddings and the model list.
vLLMhttp://localhost:8000/v1Qwen/Qwen2.5-1.5B-InstructChat, completions, Responses and embeddings. The key is "EMPTY" unless you start it with --api-key.
LiteLLM proxyhttp://0.0.0.0:4000An alias from your proxy configChat, embeddings, images, audio and Anthropic's /messages, with a virtual key. The docs give the URL without /v1.

Claude Code

ANTHROPIC_BASE_URL values. No /v1.

Claude Code and the Anthropic SDKs speak Anthropic's Messages API, and these providers serve it. Set ANTHROPIC_BASE_URL to the URL and ANTHROPIC_AUTH_TOKEN to the key.

  • Anthropic
    https://api.anthropic.com

    claude-opus-5-5

    The default. Messages, batches, token counting, files and the model list.

  • Zurelay
    https://api.zurelay.com

    claude-opus-5-5

    Every Claude model on Anthropic's Messages API, with prompt caching and thinking, below Anthropic's list price.

  • OpenRouter
    https://openrouter.ai/api

    anthropic/claude-opus-5

    Set ANTHROPIC_AUTH_TOKEN to your OpenRouter key and ANTHROPIC_API_KEY to an empty string.

  • DeepSeek
    https://api.deepseek.com/anthropic

    deepseek-v4-pro

    Messages, with some fields ignored. Claude model names map to DeepSeek's.

  • Moonshot (Kimi)
    https://api.moonshot.ai/anthropic

    kimi-k3.1-pro

    Messages, for Claude Code.

  • Z.ai (GLM)
    https://api.z.ai/api/anthropic

    glm-5.3

    Messages. In China, Zhipu's https://open.bigmodel.cn/api/anthropic.

  • MiniMax
    https://api.minimax.io/anthropic

    MiniMax-M3.1-Flash

    Messages.

  • Alibaba (Qwen, Singapore)
    https://dashscope-intl.aliyuncs.com/apps/anthropic

    qwen3.8-max

    Messages, with no model list. Alibaba now recommends a workspace host ending in .maas.aliyuncs.com/apps/anthropic.

Anthropic-compatible base URLs for Claude Code
ProviderBase URLModel ID, for exampleNotes
Anthropichttps://api.anthropic.comclaude-opus-5-5The default. Messages, batches, token counting, files and the model list.
Zurelayhttps://api.zurelay.comclaude-opus-5-5Every Claude model on Anthropic's Messages API, with prompt caching and thinking, below Anthropic's list price.
OpenRouterhttps://openrouter.ai/apianthropic/claude-opus-5Set ANTHROPIC_AUTH_TOKEN to your OpenRouter key and ANTHROPIC_API_KEY to an empty string.
DeepSeekhttps://api.deepseek.com/anthropicdeepseek-v4-proMessages, with some fields ignored. Claude model names map to DeepSeek's.
Moonshot (Kimi)https://api.moonshot.ai/anthropickimi-k3.1-proMessages, for Claude Code.
Z.ai (GLM)https://api.z.ai/api/anthropicglm-5.3Messages. In China, Zhipu's https://open.bigmodel.cn/api/anthropic.
MiniMaxhttps://api.minimax.io/anthropicMiniMax-M3.1-FlashMessages.
Alibaba (Qwen, Singapore)https://dashscope-intl.aliyuncs.com/apps/anthropicqwen3.8-maxMessages, with no model list. Alibaba now recommends a workspace host ending in .maas.aliyuncs.com/apps/anthropic.

What Claude Code costs on each of them is on Claude Code pricing.

Before you switch

What trips people up.

  • A base URL usually ends in /v1, and the SDK adds /chat/completions itself. Pasting the full endpoint as the base URL gives a 404.
  • Not every provider uses /v1: Groq is /openai/v1, Fireworks /inference/v1, DeepInfra /v1/openai, Z.ai /api/paas/v4/, and Gemini /v1beta/openai/.
  • Anthropic-style base URLs never end in /v1. Claude Code adds /v1/messages to ANTHROPIC_BASE_URL itself.
  • Model IDs differ between providers for the same model: claude-opus-5-5 at Anthropic, anthropic/claude-opus-5 on OpenRouter, a deployment name on Azure.
  • OpenAI-compatible usually means Chat Completions. Responses, embeddings, files and batch are only there where the table says so.
  • Keys belong to one provider, and on Alibaba to one region: a key sent to the wrong host gets a 401.

The guide to OpenAI-compatible APIs covers what to test before you move real traffic.

client.ts
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.zurelay.com/v1", // any URL from the table
apiKey: process.env.API_KEY,
});
terminal
# Most tools built on the OpenAI SDKs read these
export OPENAI_BASE_URL="https://api.zurelay.com/v1"
export OPENAI_API_KEY="<YOUR_API_KEY>"
# Claude Code and the Anthropic SDKs read these instead
export ANTHROPIC_BASE_URL="https://api.zurelay.com"
export ANTHROPIC_AUTH_TOKEN="<YOUR_API_KEY>"

One key

Or one base URL for all of them. Below list price.

Zurelay serves Claude, GPT, Gemini, DeepSeek, Grok, Qwen, GLM, Kimi and more at https://api.zurelay.com/v1, below each lab's list price, with prepaid credit from $10. Claude also runs on Anthropic's Messages API, so Claude Code works too.

FAQ

Base URL questions.

Anything else? Ask our team and we’ll answer by email.

What is the OpenAI API base URL?

https://api.openai.com/v1. The OpenAI SDKs use it by default, so you only set base_url (Python) or baseURL (Node) to point the same code at another provider.

What is an OpenAI-compatible API?

An API that accepts the same requests as OpenAI's, usually its Chat Completions format, so the OpenAI SDKs and tools built on them work with it after you change the base URL, the key and the model name. Most labs and gateways offer one next to their own API.

How do I change the base URL in the OpenAI SDK?

Pass base_url when you create the client in Python, or baseURL in Node, with the provider's key as api_key. Many tools also read the OPENAI_BASE_URL and OPENAI_API_KEY environment variables.

Does Claude have an OpenAI-compatible API?

Yes, at https://api.anthropic.com/v1/, for Chat Completions only. Anthropic says it isn't meant for production use: it ignores response_format and strict and has no prompt caching. Its own Messages API, at https://api.anthropic.com, has every feature. Zurelay serves Claude both ways: Chat Completions at https://api.zurelay.com/v1 and Messages at https://api.zurelay.com.

What is the Gemini OpenAI-compatible base URL?

https://generativelanguage.googleapis.com/v1beta/openai/, with your Gemini API key. It covers Chat Completions, embeddings, image generation and batch.

What is the DeepSeek API base URL?

https://api.deepseek.com for the OpenAI SDK, and https://api.deepseek.com/anthropic for Claude Code and the Anthropic SDK.

What base URL does Claude Code use?

It reads ANTHROPIC_BASE_URL, https://api.anthropic.com by default. Set it to another Anthropic-compatible URL from the table, with no /v1, and the key as ANTHROPIC_AUTH_TOKEN.

How current is this list?

Every URL was read from the provider's own documentation on October 26, 2026, and each row links to the page it came from. Providers do move things, so check that page if a URL stops working.

Stop paying list price.
Start saving today.

Create a key in seconds, point the SDK you already use at Zurelay, and every request costs up to 90% less from the first token.