Skip to main content
Watch: I Built an AI App Without Leaving Databricks

API compatibility - verified

OpenAI-compatible and Anthropic-compatible API endpoints by provider

All 20 providers here document an OpenAI-compatible API (OpenAI's own is the reference), and 13 document an Anthropic-compatible one, the Messages API format that Claude Code and the Anthropic SDK speak. xAI has deprecated its Anthropic layer. The docs for the other 6 do not mention an Anthropic-compatible endpoint, which is not the same as saying there is none.

Each base URL is copied verbatim, placeholders included, and every provider page quotes the line that documents it. To point a specific coding tool at one of these providers, see the setup guides.

Verified against each provider's own documentation. Not documented means the docs read that day do not say; it never means No.

Providers
20
OpenAI-compatible
20
Anthropic-compatible
13
Documented limits
97

Base URLs by provider

The Anthropic column is the value for ANTHROPIC_BASE_URL. Not documented means the provider's docs do not mention that layer; Deprecated links the notice. Limits counts the limitations the docs list. Open a provider for regional URLs, notes and quotes. Scroll the table sideways on a small screen.

20 AI API providers with their OpenAI-compatible base URL and endpoints, Anthropic-compatible base URL, auth and number of documented limitations
ProviderOpenAI-compatible base URLEndpointsAnthropic-compatible base URLANTHROPIC_BASE_URLAuthLimits
DeepSeek
https://api.deepseek.com
  • chat/completions
https://api.deepseek.com/anthropic
OpenAI-compatible
OpenAI Authorization: Bearer ${DEEPSEEK_API_KEY}
Anthropic-compatible
Anthropic ANTHROPIC_API_KEY env var (x-api-key header: Fully Supported)
10
Moonshot AI (Kimi)
https://api.moonshot.ai/v1
  • chat/completions
  • responses
  • models
  • files
  • batches
https://api.moonshot.ai/anthropic
OpenAI-compatible
OpenAI Authorization: Bearer $MOONSHOT_API_KEY
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN (Claude Code guide); the Messages API reference says the Authorization header expects a Bearer token
0
Z.ai (GLM)
https://api.z.ai/api/paas/v4/
  • chat/completions
  • responses
https://api.z.ai/api/anthropic
OpenAI-compatible
OpenAI Authorization: Bearer ZAI_API_KEY
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN
2
MiniMax
https://api.minimax.io/v1
  • chat/completions
  • responses
  • models
https://api.minimax.io/anthropic
OpenAI-compatible
OpenAI Authorization: Bearer <API key> (docs set OPENAI_API_KEY for the SDK)
Anthropic-compatible
Anthropic ANTHROPIC_API_KEY env var for the SDK; curl example uses Authorization: Bearer <MINIMAX_API_KEY>
8
Alibaba Cloud Model Studio (Qwen)
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
  • chat/completions
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic
OpenAI-compatible
OpenAI Authorization: Bearer $DASHSCOPE_API_KEY
Anthropic-compatible
Anthropic x-api-key or Authorization: Bearer (API reference); Claude Code guide uses ANTHROPIC_AUTH_TOKEN
5
xAI (Grok)
https://api.x.ai/v1
  • responses
  • chat/completions
  • images/generations
  • models
  • files
  • batches
Deprecated
OpenAI-compatible
Authorization: Bearer $XAI_API_KEY
8
Google Gemini API
https://generativelanguage.googleapis.com/v1beta/openai/
  • chat/completions
  • embeddings
  • images/generations
  • videos
  • batches
  • models
Not documented
OpenAI-compatible
Authorization: Bearer $GEMINI_API_KEY
5
Mistral AI
https://api.mistral.ai/v1
  • chat/completions
Not documented
OpenAI-compatible
Authorization: Bearer $MISTRAL_API_KEY
0
Groq
https://api.groq.com/openai/v1
  • chat/completions
  • responses
  • audio/transcriptions
  • audio/translations
Not documented
OpenAI-compatible
GROQ_API_KEY passed as the OpenAI client's api_key
4
Cerebras Inference
https://api.cerebras.ai/v1
  • chat/completions
Not documented
OpenAI-compatible
CEREBRAS_API_KEY passed as the OpenAI client's api_key
6
Fireworks AI
https://api.fireworks.ai/inference/v1
  • chat/completions
  • completions
https://api.fireworks.ai/inference
OpenAI-compatible
OpenAI Authorization: Bearer $API_KEY (Fireworks API key)
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN (sent as Bearer); docs say not to use ANTHROPIC_API_KEY with Claude Code
9
Together AI
https://api.together.ai/v1
  • chat/completions
  • completions
  • embeddings
  • images/generations
  • audio/speech
  • audio/transcriptions
  • audio/translations
  • models
Not documented
OpenAI-compatible
Authorization: Bearer $TOGETHER_API_KEY
8
OpenRouter
https://openrouter.ai/api/v1
  • chat/completions
  • responses
  • models
https://openrouter.ai/api
OpenAI-compatible
OpenAI Authorization: Bearer <OPENROUTER_API_KEY>
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN (sent as Authorization: Bearer); ANTHROPIC_API_KEY must be explicitly empty
2
Ollama
http://localhost:11434/v1/
  • chat/completions
  • completions
  • responses
  • embeddings
  • models
http://localhost:11434
OpenAI-compatible
OpenAI Local: API key required by the client but ignored by Ollama (docs use 'ollama'). Cloud: OLLAMA_API_KEY.
Anthropic-compatible
Anthropic Local: ANTHROPIC_AUTH_TOKEN=ollama (required but ignored). Cloud: Authorization: Bearer $OLLAMA_API_KEY (x-api-key alone not accepted).
10
LM Studio
http://localhost:1234/v1
  • models
  • responses
  • chat/completions
  • embeddings
  • completions
http://localhost:1234
OpenAI-compatible
OpenAI None by default (local server); when Require Authentication is enabled, an LM Studio API token
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN=lmstudio (placeholder); with Require Authentication enabled, use the LM Studio API token. Accepts x-api-key or Authorization: Bearer.
0
vLLM
http://localhost:8000/v1
  • completions
  • chat/completions
  • chat/completions/batch
  • responses
  • embeddings
  • audio/transcriptions
  • audio/translations
  • models
http://localhost:8000
OpenAI-compatible
OpenAI Optional: --api-key (or VLLM_API_KEY) on the server; pass the same value as the OpenAI client's api_key
Anthropic-compatible
Anthropic ANTHROPIC_AUTH_TOKEN is required by Claude Code but can be any value; ANTHROPIC_API_KEY can be any value since vLLM doesn't require authentication by default
5
Amazon Bedrock
https://bedrock-runtime.{region}.amazonaws.com/openai/v1
  • chat/completions
  • responses
  • models (bedrock-mantle only)
https://bedrock-runtime.{region}.amazonaws.com/anthropicClaude models only
OpenAI-compatible
OpenAI Authorization: Bearer <Amazon Bedrock API key>, or AWS SigV4 credentials
Anthropic-compatible
Anthropic x-api-key: <Amazon Bedrock API key> (docs use $AWS_BEARER_TOKEN_BEDROCK / BEDROCK_API_KEY), a short-term Bedrock bearer token, or AWS SigV4
3
Microsoft Foundry / Azure OpenAI
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/
  • responses
  • chat/completions
https://<resource name>.services.ai.azure.com/anthropicClaude models only
OpenAI-compatible
OpenAI api-key: $AZURE_OPENAI_API_KEY (REST) or the key as the OpenAI client's api_key; or Authorization: Bearer <Microsoft Entra ID token>
Anthropic-compatible
Anthropic x-api-key: $AZURE_API_KEY, or Authorization: Bearer <Microsoft Entra ID token> (scope https://ai.azure.com/.default)
2
Anthropic (Claude API)
https://api.anthropic.com/v1/Not for production, per Anthropic
  • chat/completions
https://api.anthropic.comNative API
OpenAI-compatible
OpenAI Claude API key as the OpenAI client's api_key (sent as Authorization: Bearer); multi-workspace personal/service account keys also need the anthropic-workspace-id header
Anthropic-compatible
Anthropic Authorization: Bearer <API key or short-lived token>, or legacy x-api-key; anthropic-version header required
10
OpenAI (reference)
https://api.openai.com/v1Native API
  • responses
  • chat/completions
  • embeddings
  • models
  • realtime
Not documented
OpenAI-compatible
Authorization: Bearer OPENAI_API_KEY_OR_ACCESS_TOKEN (optional OpenAI-Organization and OpenAI-Project headers)
0

Explainer

How compatibility layers work

A compatibility layer lets you keep your SDK and change one URL. The catch is in the details each provider documents, which is why every provider page lists its limitations layer by layer.

What a compatibility layer is
An endpoint that accepts another vendor's request format, so an existing SDK or tool works by changing only the base URL, the API key and the model name. An OpenAI-compatible layer speaks the Chat Completions (and sometimes Responses) format; an Anthropic-compatible one speaks the Messages API that Claude Code uses.
Why some base URLs end in /v1 and some do not
The OpenAI SDK appends paths such as /chat/completions to the base URL, so most OpenAI-compatible values include /v1; 3 here use a different path (DeepSeek, Z.ai (GLM), Google Gemini API). The Anthropic SDK appends /v1/messages itself, so every Anthropic-compatible base URL in the table stops before /v1. Copy each value exactly as listed rather than adding or dropping /v1 to make them match.
Compatible does not mean identical
Layers accept the format but can ignore parameters, reject content types or map model names. The docs for 16 providers list 97 such limitations in all, each quoted on the provider's page under Documented limitations. Check that list before relying on caching, thinking budgets, tool choice or sampling settings.

FAQ

Which AI providers offer an Anthropic-compatible API?

Besides Anthropic itself, 12 of 20 providers document an Anthropic-compatible (Messages API) endpoint: DeepSeek, Moonshot AI (Kimi), Z.ai (GLM), MiniMax, Alibaba Cloud Model Studio (Qwen), Fireworks AI, OpenRouter, Ollama, LM Studio, vLLM, Amazon Bedrock and Microsoft Foundry / Azure OpenAI. Amazon Bedrock and Microsoft Foundry / Azure OpenAI serve Claude models only on theirs; they are not a translation layer for other model families. xAI (Grok)'s Anthropic layer is deprecated: "Deprecated: The Anthropic SDK compatibility is fully deprecated. Please migrate to the Responses API or the gRPC API." The docs for Google Gemini API, Mistral AI, Groq, Cerebras Inference, Together AI and OpenAI (reference) do not mention one.

What is the OpenAI-compatible base URL for each provider?

Set the OpenAI SDK's base_url (or baseURL) to the provider's value and use its API key. DeepSeek: https://api.deepseek.com; Moonshot AI (Kimi): https://api.moonshot.ai/v1; Z.ai (GLM): https://api.z.ai/api/paas/v4/; MiniMax: https://api.minimax.io/v1; Alibaba Cloud Model Studio (Qwen): https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1; xAI (Grok): https://api.x.ai/v1; Google Gemini API: https://generativelanguage.googleapis.com/v1beta/openai/; Mistral AI: https://api.mistral.ai/v1; Groq: https://api.groq.com/openai/v1; Cerebras Inference: https://api.cerebras.ai/v1; Fireworks AI: https://api.fireworks.ai/inference/v1; Together AI: https://api.together.ai/v1; OpenRouter: https://openrouter.ai/api/v1; Ollama: http://localhost:11434/v1/; LM Studio: http://localhost:1234/v1; vLLM: http://localhost:8000/v1; Amazon Bedrock: https://bedrock-runtime.{region}.amazonaws.com/openai/v1; Microsoft Foundry / Azure OpenAI: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/; Anthropic (Claude API): https://api.anthropic.com/v1/; OpenAI (reference): https://api.openai.com/v1.

What should ANTHROPIC_BASE_URL be set to for another provider?

Use the provider's Anthropic-compatible base URL, which stops before /v1 because the Anthropic SDK adds the path itself (Fireworks: "The base URL for the Anthropic SDK is https://api.fireworks.ai/inference (without the /v1 suffix). The SDK appends /v1/messages automatically."). DeepSeek: https://api.deepseek.com/anthropic; Moonshot AI (Kimi): https://api.moonshot.ai/anthropic; Z.ai (GLM): https://api.z.ai/api/anthropic; MiniMax: https://api.minimax.io/anthropic; Alibaba Cloud Model Studio (Qwen): https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic; Fireworks AI: https://api.fireworks.ai/inference; OpenRouter: https://openrouter.ai/api; Ollama: http://localhost:11434; LM Studio: http://localhost:1234; vLLM: http://localhost:8000; Amazon Bedrock: https://bedrock-runtime.{region}.amazonaws.com/anthropic (Claude models only); Microsoft Foundry / Azure OpenAI: https://<resource name>.services.ai.azure.com/anthropic (Claude models only). Anthropic's own is https://api.anthropic.com.

Is Anthropic's OpenAI SDK compatibility layer production-ready?

No, by Anthropic's own description: "This compatibility layer is primarily intended to test and compare model capabilities, and is not considered a long-term or production-ready solution for most use cases." It serves chat/completions at https://api.anthropic.com/v1/, and the docs list 10 limitations, including: strict (function calling) ignored; audio input not supported; prompt caching not supported.

Newsletter

Know when a provider changes its API

One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.