# Run Open WebUI with Claude and GPT via 5abeer API keys

> Connect Open WebUI to 5abeer: one OpenAI-compatible connection per key, the /v1 base URL and a Model IDs allowlist, in the UI or with env vars.

Updated: 2026-11-01

To run Open WebUI with Claude and GPT through 5abeer, open Settings > Admin > Connections and add one OpenAI connection per 5abeer API key. Each connection uses the URL `https://api.5abeer.ai/v1`, its own key, and a Model IDs list with only that provider's ids, such as `claude-sonnet-5.5` on the Claude connection. Requests are paid from your balance.

## What you need

- A running Open WebUI instance that you or your team host, with an admin account.
- One 5abeer API key per provider you want in the chat. A key works with one provider's models only, so Claude and GPT need two keys ([create a key](https://5abeer.ai/en/docs/start/keys.md#create)).
- Some balance on your account ([how to pay](https://5abeer.ai/en/docs/start/payment.md)).

A 5abeer subscription key will not work here. Plans are for the supported apps, and Open WebUI is not one of them. To use the models in Open WebUI, create an API key that is paid from your balance.

5abeer serves the OpenAI Chat Completions format at `/v1` for Claude, GPT and Gemini models, so Open WebUI's OpenAI connection type covers all of them:

| Format | Base URL | Key header |
| --- | --- | --- |
| OpenAI | `https://api.5abeer.ai/v1` | `Authorization: Bearer <KEY>` |
| Anthropic | `https://api.5abeer.ai` | `x-api-key: <KEY>` |
| Gemini | `https://api.5abeer.ai/v1beta` | `x-goog-api-key: <KEY>` |

## Add an OpenAI-compatible API in Open WebUI

### 1. Create a 5abeer API key

In the dashboard, open **API → Keys**, choose **New key** and pick the provider. Start with Claude. Copy the key when it appears.

### 2. Open the connections list

Sign in to Open WebUI as an admin and go to **Settings > Admin > Connections**. Find the **Manage OpenAI API Connections** list and click **Add Connection** (the ➕ button).

### 3. Fill in the connection

- **Connection Type**: External.
- **URL**: `https://api.5abeer.ai/v1`
- **API Key**: your 5abeer Claude key.
- **Model IDs** (under **Advanced**): type `claude-sonnet-5.5` and click **+**, then add `claude-opus-5.5` the same way. Copy each id from the [models list](https://5abeer.ai/en/models).
- **Prefix ID**: optional. A prefix such as `khabeer` makes the model show as `khabeer.claude-sonnet-5.5`; Open WebUI strips it before the request goes out.
- **Provider** (under **Advanced**): leave it at **Default**.

### 4. Verify and save

Click **Verify Connection**, then **Save**. Open a new chat, pick the model from the model selector and send a short message. If a reply comes back, the connection works.

Open WebUI's docs explain why the Model IDs list matters: when it is set, Open WebUI stops calling the provider's `/models` and lists exactly the ids you typed. When it is empty, Open WebUI fetches the list from the connection. We don't promise that this list is filtered by key, so set Model IDs on every 5abeer connection.

## Open WebUI with multiple API keys: Claude and GPT

Each 5abeer key works with one provider's models. If a GPT model is sent with a Claude key, the request returns [`MODEL_PLATFORM_NOT_ALLOWED`](https://5abeer.ai/en/docs/help/errors.md#MODEL_PLATFORM_NOT_ALLOWED).

So add one connection per key, all with the same URL:

| Connection | URL | API Key | Model IDs |
| --- | --- | --- | --- |
| Claude | `https://api.5abeer.ai/v1` | your Claude key | `claude-sonnet-5.5`, `claude-opus-5.5` |
| GPT | `https://api.5abeer.ai/v1` | your GPT key | `YOUR_GPT_MODEL_ID` (copy the id from the models list) |
| Gemini (optional) | `https://api.5abeer.ai/v1` | your Gemini key | `YOUR_GEMINI_MODEL_ID` (copy the id from the models list) |

Keep every id on one connection only. Open WebUI's docs note that without a prefix it keeps one model per id: if two connections return the same id, it lists only the copy from the connection higher in the list. A strict allowlist per key keeps each request on the right key. Each connection also has a toggle, so you can switch one off without deleting it. All keys draw on the same balance.

## Open WebUI OpenAI API settings in Docker

The quick start's default command, with the same two connections passed as environment variables:

```bash
# Export the keys in your shell or load them from a secret store first:
# KHABEER_CLAUDE_KEY, KHABEER_GPT_KEY, WEBUI_SECRET_KEY
docker run -d -p 3000:8080 \
  -v open-webui:/app/backend/data \
  -e WEBUI_SECRET_KEY="$WEBUI_SECRET_KEY" \
  -e OPENAI_API_BASE_URLS="https://api.5abeer.ai/v1;https://api.5abeer.ai/v1" \
  -e OPENAI_API_KEYS="$KHABEER_CLAUDE_KEY;$KHABEER_GPT_KEY" \
  -e OPENAI_API_CONFIGS='{"0":{"enable":true,"model_ids":["claude-sonnet-5.5","claude-opus-5.5"]},"1":{"enable":true,"model_ids":["YOUR_GPT_MODEL_ID"]}}' \
  -e ENABLE_SIGNUP=false \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main
```

- `OPENAI_API_BASE_URLS` and `OPENAI_API_KEYS` are semicolon-separated. Keep them in the same order: the first key goes with the first URL.
- `OPENAI_API_CONFIGS` is keyed by each connection's index in `OPENAI_API_BASE_URLS` and takes the same per-connection settings as the admin screen, such as `enable`, `prefix_id` and `model_ids`.
- Replace `YOUR_GPT_MODEL_ID` with an id from the [models list](https://5abeer.ai/en/models).

These are PersistentConfig (`ConfigVar`) settings. Open WebUI reads them on the first launch and stores them; after a restart it uses the stored values, not the environment. To change a connection later, edit it in the admin screen, or set `ENABLE_PERSISTENT_CONFIG=false` if you want the environment to win on every start. With that set, changes made in the admin screen are lost on restart.

## Which Claude model to pick in Open WebUI

Start with [`claude-sonnet-5.5`](https://5abeer.ai/en/models/claude-sonnet-5.5) as the default chat model. Add [`claude-opus-5.5`](https://5abeer.ai/en/models/claude-opus-5.5) for long, hard questions where the extra cost pays off. These are the current Claude models:

| Model | Id | Input (ours) | Output (ours) | Context |
| --- | --- | --- | --- | --- |
| Claude Sonnet 5.5 | `claude-sonnet-5.5` | $0.60 | $3 | 1M |
| Claude Opus 5.5 | `claude-opus-5.5` | $1.20 | $6 | 1M |
| Claude Fable 5.1 | `claude-fable-5.1` | $3 | $15 | — |

The official price next to ours, with the date it was read:

Claude Sonnet 5.5 (`claude-sonnet-5.5`) per 1M tokens: input $0.60 (official $2), output $3 (official $10). Official price checked October 19, 2026.

For the GPT and Gemini connections, take the ids from these lists:

| Model | Id | Input (ours) | Output (ours) | Context |
| --- | --- | --- | --- | --- |
| GPT-6.1 Sol | `gpt-6.1-sol` | $0.60 | $3 | 922K |
| GPT-6 Astra | `gpt-6-astra` | $3 | $15 | — |
| GPT-6 Sol | `gpt-6-sol` | $0.60 | $3 | 922K |

| Model | Id | Input (ours) | Output (ours) | Context |
| --- | --- | --- | --- | --- |
| Gemini 4 Argon | `gemini-4-argon` | $0.60 | $3 | — |
| Gemini 2.5 Pro | `gemini-2.5-pro` | $0.38 | $3 | 1M |

## Secure a self-hosted Open WebUI

When you host Open WebUI, you own its access control. Anyone who can sign in can spend from the keys behind its connections.

- Keep sign-up closed with `ENABLE_SIGNUP=false`, or keep `DEFAULT_USER_ROLE=pending` (the default) so an admin must approve every new account.
- Serve it over HTTPS. Open WebUI does not terminate TLS itself; its hardening guide puts it behind a reverse proxy such as Nginx or Caddy.
- Keep keys and `WEBUI_SECRET_KEY` in environment variables or a secret store, never in a file you commit.

## Keep Open WebUI API costs under control

Each message is paid from your balance by the tokens it uses, at the model's 5abeer price ([pricing and balance](https://5abeer.ai/en/docs/start/pricing.md)). On a shared instance, many people spend from the same keys, so set limits on the keys themselves. You can control every key: a spend limit, an expiry date and an IP allow-list ([key controls](https://5abeer.ai/en/docs/start/keys.md#controls)). Separate keys for Open WebUI also keep its usage apart from your other tools in the dashboard.

## Common errors and fixes

- [`INVALID_API_KEY`](https://5abeer.ai/en/docs/help/errors.md#INVALID_API_KEY) or a 401: the key is wrong or was revoked. Paste it again in the connection, or check the variable you passed to Docker.
- [`MODEL_PLATFORM_NOT_ALLOWED`](https://5abeer.ai/en/docs/help/errors.md#MODEL_PLATFORM_NOT_ALLOWED): the model reached a key for another provider. Move the id to the connection with the matching key and keep each Model IDs list to one provider.
- Wrong base URL: use `https://api.5abeer.ai/v1`, with `/v1` and nothing after it.
- Model not found: the id has a typo or a different spelling. Copy it from the [models list](https://5abeer.ai/en/models).
- Env changes ignored after a restart: the stored PersistentConfig values win. Edit the connection in the admin screen.
- [`INSUFFICIENT_BALANCE`](https://5abeer.ai/en/docs/help/errors.md#INSUFFICIENT_BALANCE): your balance doesn't cover the request. Top up and retry.

Every code and what it means is in [Errors and fixes](https://5abeer.ai/en/docs/help/errors.md).

## Questions

### Can I use my 5abeer subscription in Open WebUI?

No. Plans run only the supported apps, and Open WebUI is not one of them. Create an API key and pay for Open WebUI usage from your balance.

### How do I use Claude in Open WebUI?

Add an OpenAI connection with the URL `https://api.5abeer.ai/v1` and a 5abeer Claude key, and list the Claude ids under Model IDs. Claude models then appear in the model selector next to your other models.

### Why do I need two keys for Claude and GPT?

A 5abeer key works with one provider's models only. Create one key per provider and add one connection per key. Both use the same URL and the same balance.

### Do I need a Prefix ID?

No. 5abeer ids differ between providers, so they don't clash. A prefix only changes how the model is named in Open WebUI, for example `khabeer.claude-sonnet-5.5`.

### Why didn't my environment variable change apply?

The connection settings are PersistentConfig values. Open WebUI stores them on the first launch and uses the stored copy after that. Change them in the admin screen, or set `ENABLE_PERSISTENT_CONFIG=false`.

### Can each user bring their own key?

Open WebUI also has personal **Direct Connections** that users add in their own settings. This guide covers admin connections; on a shared instance, admin connections with a spend limit on each key are easier to keep in check.

> Ready to connect Open WebUI? [Create an API key](https://5abeer.ai/en/docs/start/keys.md#create) for each provider you want, then see every model and price on the [5abeer API page](https://5abeer.ai/en/api). Setting up a similar chat app? See [LibreChat](https://5abeer.ai/en/guides/librechat-api-key), or read [Subscription or API](https://5abeer.ai/en/guides/ai-subscription-vs-api).

## Sources

Checked on 2026-11-01:

- Open WebUI docs: [Quick Start](https://docs.openwebui.com/getting-started/quick-start/), [Starting with OpenAI](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai), [Starting with OpenAI-compatible servers](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible), [Environment variable configuration](https://docs.openwebui.com/reference/env-configuration) and [Hardening](https://docs.openwebui.com/getting-started/advanced-topics/hardening)
- 5abeer docs: [API keys](https://5abeer.ai/en/docs/start/keys.md), [Base URLs](https://5abeer.ai/en/docs/start/base-urls.md) and [Errors and fixes](https://5abeer.ai/en/docs/help/errors.md)

> 5abeer is an independent service, not affiliated with Open WebUI, OpenAI, Anthropic or Google.
