Setup guide
Connect Open WebUI to relay.fast with one API key
Add relay.fast to Open WebUI as an OpenAI-compatible connection with the URL https://relay.fast/v1 and your relay.fast API key. One connection covers GPT, Claude, DeepSeek, GLM and other chat models. Each request is charged per token to your relay.fast balance, and no subscription is needed.
What you need
As of 27 November 2026, Open WebUI describes itself in its documentation as a self-hosted AI platform with a web interface that works with OpenAI-compatible APIs. The steps on this page follow that documentation.
- Open WebUI installed as its documentation describes, and an administrator account in that installation. Connections are managed by an administrator.
- A relay.fast API key. You create it on the Keys page of the relay.fast dashboard.
- The relay.fast address for the OpenAI format:
https://relay.fast/v1. It must end with/v1.
Add relay.fast as an OpenAI API connection in Open WebUI
- Open your Open WebUI installation in the browser with an administrator account.
- Go to Settings > Connections in the admin section and find the Manage OpenAI API Connections list.
- Click Add Connection.
- Fill in these fields. Default suits any plain OpenAI-compatible server, and Chat Completions is the default API Type. Leave Model IDs empty for now. The next section covers it.
Field Value URL https://relay.fast/v1API Key your relay.fast key Provider (under Advanced) Default API Type (under Advanced) Chat Completions - Click Verify Connection beside the URL field before you save. Open WebUI does not check a connection when it is saved. The check calls the
/modelsendpoint, sends your key as a Bearer key and should report Server connection verified. - Click Save.
- In a chat, pick a model in the model selector at the top, for example
glm-5.3, and send a short message.
To switch relay.fast off in Open WebUI without deleting the connection, use the toggle on the connection.
Choose which models Open WebUI lists
Open WebUI reads the model list from the /models endpoint of the connection, which on relay.fast is /v1/models. That list contains every model your key can use, not only chat models: image, video and speech models are in it too.
- With Model IDs empty, Open WebUI shows every model in that list.
- To keep the model selector short, type the ids you want in the Model IDs field of the connection, click the + icon after each one, then click Save. For example, add
deepseek-v4.1-flash,glm-5.3andclaude-sonnet-5-5. Copy each id exactly as it appears in the model catalog. Open WebUI then shows exactly those ids and stops reading the model list for this connection. After a successful Verify Connection, the field suggests relay.fast ids as you type. - You can also set a model allowlist on the key itself, on the Keys page of the relay.fast dashboard. With an allowlist,
/v1/modelslists only those models. - If another connection already returns the same model ids, set a Prefix ID. Open WebUI joins the prefix to the model id with a dot and removes it before the request is sent. The prefix
relayfastturnsglm-5.3intorelayfast.glm-5.3in the model selector. Without a prefix, only one copy of a duplicate id is listed.
Set up the connection with environment variables
A new installation can get the same connection from two environment variables. OPENAI_API_BASE_URL holds the address and OPENAI_API_KEY holds the key.
- Set the variables before you start Open WebUI for the first time.
OPENAI_API_BASE_URL=https://relay.fast/v1 OPENAI_API_KEY=sk-your-api-key - Start Open WebUI, pick a model in the model selector at the top of the chat and send a short message.
These are persistent config variables. Once a value has been saved through the admin settings, the saved value takes precedence over the variable. The setting ENABLE_PERSISTENT_CONFIG controls this and is on by default. On an installation that has already run, change the connection in Settings > Connections, not in the variables.
Common errors and what to check
401with the textInvalid token: the key is wrong, disabled or pasted with spaces. Check that the key is enabled on the Keys page of the relay.fast dashboard, then paste it again in API Key without spaces.404with the codeinvalid_endpoint: a chat request went to an address without/v1. Add/v1to the URL of the connection.404with the codemodel_not_found: the model id does not match the catalog. Copy it again from the model catalog.400with the codeinvalid_request: an image or video model was chosen for a chat, and it does not serve chat requests. Choose a chat model, or list only chat models in Model IDs.403with the codeinsufficient_user_quota: your relay.fast balance does not cover the request.403with the codepre_consume_token_quota_failed: the key's own spending limit is used up. Raise it on the Keys page or use another key.- You changed
OPENAI_API_BASE_URLorOPENAI_API_KEYand nothing happened: the value saved in the admin settings takes precedence. Edit the connection in Settings > Connections instead. - The model selector shows no relay.fast models: check that the toggle of the connection is on and click Verify Connection. Without Server connection verified, check the URL and the key. Ids in Model IDs and a model allowlist on the key also narrow the list.
Keep agent costs under control
An agent sends the conversation, file contents and tool results with every step, so input tokens make up most of the bill. Use a mid-priced model for routine work and a frontier model for hard tasks, prefer models with a cache-read price for long sessions, and watch the usage in the dashboard until you know what a typical task costs. Current prices are in the live pricing catalog.
Current prices of the models in this guide
Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.
| Model | Model ID | Official input / output per 1M tokens | relay.fast from, input / output | Cache read from | Context |
|---|---|---|---|---|---|
| DeepSeek V4.1 Flash price depends on the time of day; the peak-hours price is shown | deepseek-v4.1-flash | $0.3 / $1.2 | $0.03 / $0.12 (−90%) | $0.0006 | 1M |
| GLM-5.3 | glm-5.3 | $1.4 / $4.4 | $0.035 / $0.11 (−97%) | $0.0065 | 1M |
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 / $10 | $0.238 / $1.19 (−88%) | $0.0238 | 1M |
Frequently asked questions
What URL do I enter in Open WebUI for relay.fast?
Enter https://relay.fast/v1 in the URL field of the connection. The address must end with /v1, or chat requests return 404 with the code invalid_endpoint.
Which models work in Open WebUI with relay.fast?
relay.fast serves every chat model in the catalog through the OpenAI format (Chat Completions), the protocol Open WebUI is built around: GPT, Claude, DeepSeek, GLM and others. The model list also contains image, video and speech models, which are not chat models.
Do I need a subscription to use relay.fast in Open WebUI?
No. Each request is charged per token to your relay.fast balance.
Which API Type do I choose in Open WebUI, Chat Completions or Responses?
Keep the default, Chat Completions. On relay.fast it serves every chat model in the catalog.
Where do I enter the API key in Open WebUI?
In Settings > Connections, click Add Connection and paste the key in the API Key field, with https://relay.fast/v1 in the URL field. Connections are managed by an administrator of the installation.
Where does Open WebUI keep my API key?
Open WebUI keeps the key in the settings of the installation. For a shared installation, create a separate relay.fast key with its own spending limit on the Keys page of the relay.fast dashboard.
Is Open WebUI affiliated with relay.fast?
No. Open WebUI is a separate product. This page shows how to connect it to relay.fast.