# OpenAI-compatible API

> An API that accepts the same requests as OpenAI's, so tools written for OpenAI can use another provider by changing the base URL and key.

_Updated November 23, 2026_

Many providers and local model servers offer one. Agents that support it can point at them without code changes: Qwen Code, for example, takes `OPENAI_API_KEY` with an OpenAI-compatible endpoint.

Compatibility covers the request shape, not the model, so tool calling and long contexts still vary from provider to provider.

## Keep reading

- [Model provider](https://envhaven.com/glossary/model-provider)
- [API key](https://envhaven.com/glossary/api-key)
- [Bring your own key (BYOK)](https://envhaven.com/glossary/byok)

Source: https://envhaven.com/glossary/openai-compatible-api
