# What is an OpenAI-compatible API?

OpenAI-compatible does not mean “provided by OpenAI.” It means a service uses an API shape similar to OpenAI’s common API. Once you understand that, BYOK configuration becomes much clearer: you usually need to identify only three things—Base URL, API key, and model name.

Canonical URL: https://qchat.askmore.app/en/guides/openai-compatible-api/

## Compatible does not mean the same company

Many model providers, gateways, local inference tools, and company proxies expose OpenAI-compatible APIs. They are not necessarily provided by OpenAI, and they do not necessarily support OpenAI’s full feature set. They use a similar API shape so clients can connect in a familiar way.

In that sense, OpenAI-compatible is an interface convention, not a brand or quality guarantee. Which models, streaming, images, tool calls, web access, or reasoning features are available still depends on the service you connect to.

## What the three core settings mean

The Base URL is the entry address for the API. Many services use an address ending in `/v1`, but not all do. Do not guess; copy the exact address from the provider documentation or console.

The API key is the access credential and should be treated like a password. Qchat stores it in the device Keychain and uses it to call the endpoint you configure. The model name is the exact identifier of the model you want to call within that service.

- Base URL: where requests are sent
- API key: which identity and usage allowance is used
- Model name: which exact model is called
- Organization, project, or other parameters: only when the provider explicitly requires them

## Why some services list models and others do not

OpenAI-compatible services usually try to support chat completion, but they do not always implement the model-list endpoint completely. Even within one provider, different gateways or deployment modes can behave differently.

If a service cannot return a model list automatically, that does not necessarily mean chat is impossible. You can often enter the model name manually from the provider documentation and test with a simple question.

## Public, localhost, and LAN services are different

Public services should normally use HTTPS. For localhost or LAN services, Qchat can use HTTP in appropriate situations because those addresses may not have public certificates.

Local services require extra attention to bind addresses and firewalls. If a service listens only on `127.0.0.1`, an iPhone on the same LAN usually cannot reach it; configure LAN access according to that service’s own documentation. Provider-specific tutorials should be followed only after real-environment verification.

## A safe connection-test sequence

First confirm in the provider console that the key is valid and has the needed allowance or permissions. Then copy the Base URL and model name. After entering them in Qchat, test with a short question that contains no sensitive information.

If it fails, do not start by sending the key to someone else. Check whether the address is complete, the model name is exact, the key is allowed to use that model, and the network can reach the endpoint.

## Frequently asked questions

### Is OpenAI-compatible the same as the official OpenAI API?

No. It means the API shape is compatible or similar. The provider can be a third-party platform, company gateway, local inference tool, or OpenAI itself.

### Does the Base URL always end in /v1?

No. Many services use that pattern, but providers differ. Use the exact address shown in the provider documentation or console.

### Does an empty model list mean configuration failed?

Not necessarily. Some services do not implement the model-list endpoint. Enter the model name manually according to the documentation, then test the chat endpoint with a simple question.

## After the concept, understand the BYOK boundary

If you plan to use your own endpoint and key, the next step is understanding the data path, cost, and responsibility boundary.

- [Understand BYOK](https://qchat.askmore.app/en/byok/)
- [Compare BYOK and hosted AI](https://qchat.askmore.app/en/guides/byok-vs-hosted-ai/)
