Many model gateways expose the OpenAI chat protocol even when the provider is not OpenAI itself. Connecting one to Open WebUI lets the same chat interface use models from a hosted API, local server, or proxy.
An External connection is managed by the Open WebUI server, so the provider must be reachable from that server rather than only from the browser. An administrator account, an existing provider endpoint, and its authentication details are required before adding the connection.
The provider receives chat prompts and any conversation content sent with them. A provider-issued key can also grant access to paid models, so the first test should contain no confidential information and the key should remain masked on screen.
Steps to connect an OpenAI-compatible provider to Open WebUI:
- Open the user menu in the lower-left corner of Open WebUI.

- Select Settings from the user menu.

- Select Connections under Admin → AI.
In Open WebUI 0.12.4, personal and administrator settings share one dialog. The OpenAI API section manages server connections; Direct Connections is a separate per-user feature.
- Click the plus button beside Manage OpenAI API Connections.
The button is labelled Add Connection. The new connection defaults to External, which sends provider requests through the Open WebUI server.
- Enter the provider’s API base URL in URL.
The provider’s documented base route may be https://llm.example.com/v1; the full /chat/completions endpoint does not belong in this field. For a provider on the Docker host, a container-reachable address such as http://host.docker.internal:<port>/v1 replaces localhost, which refers to the Open WebUI container itself.
Related: How to fix Open WebUI localhost connection errors in Docker - Select Bearer under Auth for a provider that requires an API key.
Bearer sends the saved key in the Authorization header. None is appropriate only when the provider deliberately requires no authentication and its network access is restricted.
- Enter the provider-issued key in the masked API Key field.
The eye button reveals the credential. Anyone who obtains it may be able to use the provider account or incur charges.
- Confirm that API Type is Chat Completions.
The API-type control toggles between Chat Completions and Responses. A provider that implements /v1/chat/completions needs Chat Completions.
- Click Verify Connection beside the URL.
The circular-arrow button requests the provider’s /models route using the selected authentication. Server connection verified confirms model discovery, but does not test chat generation. If the provider does not implement model discovery, exact provider IDs can instead be entered under Advanced → Model IDs with the plus button; that list replaces automatic discovery, and the discovery check can still fail. A working chat response remains necessary.
- Connect the provider with Save in the Add Connection dialog.
The dialog closes and the provider URL appears as an enabled connection. Saving the dialog persists the OpenAI API connection.
- Click Back to close Settings.

- Open New Chat from the sidebar.

- Open the model picker in the chat composer.
The picker may already display a selected model name. If the provider model is absent, refresh the model list or consult connection troubleshooting.
- Select the model supplied by the new provider.
company-chat is an example model ID; the actual name comes from the provider’s model list or the connection’s manually entered IDs.
- Enter a short test prompt in the message box.
Write a one-sentence greeting for a new customer.
- Click Send message to submit the prompt.

- Confirm that the selected provider model returns a reply without a connection error.
A reply in this chat tests the saved URL, authentication, model ID, and chat-completion endpoint together. The wording varies by model; a saved row or a successful discovery check alone does not establish that chat works.