---
title: "omp setup with one API key"
canonical: https://uplinkswitch.ai/guides/omp
generated: 2026-11-04T12:52:06.899Z
source: https://uplinkswitch.ai/guides/omp
base_url: https://api.uplinkswitch.com/v1
---

[›uplinkswitch](https://uplinkswitch.ai/)

[api.uplinkswitch.com/v1](https://uplinkswitch.ai/models)[Console](https://uplinkswitch.ai/console)

[›uplinkswitch](https://uplinkswitch.ai/)

# omp

One provider block in models.yml, one key, every model, pay as you go.

Checked 2026-10-28

·[All guides](https://uplinkswitch.ai/guides)·[Models](https://uplinkswitch.ai/models)

At the end you have [omp](https://omp.sh), the terminal coding agent from the oh-my-pi project, on one provider block at `https://api.uplinkswitch.com/v1`, with one API key from the console and any model id on the [list](https://uplinkswitch.ai/models), Claude included. Each request bills per token to the prepaid balance behind that key, no subscription, and the live table below is what one agent step costs on each model today.

## Before you start

You need omp installed (`curl -fsSL https://omp.sh/install | sh` on macOS and Linux), an account on the [console](https://uplinkswitch.ai/console) with credit on it, and one key created there. Create the key for omp alone, so its requests sit apart from any other tool on the Usage page. Nothing is installed on the UplinkSwitch side: the base URL and the key are the whole configuration.

## Where the settings are

Custom providers live in `~/.omp/agent/models.yml` (`models.yaml` is read only when the `.yml` file is absent). Its root holds `providers` and nothing else.

The default model is a separate setting: `modelRoles.default` in `~/.omp/agent/config.yml` for every project, or `<repo>/.omp/config.yml` for one. omp reads the project file from the directory you launch it in and does not search parent directories. Read 2026-10-28 from [omp.sh/docs/custom-models](https://omp.sh/docs/custom-models) and [docs/settings](https://omp.sh/docs/settings).

## The provider block

`api: openai-completions` sends `/v1/chat/completions` to `baseUrl`, which is the format every chat model here answers. `apiKey` is the name of an environment variable, not the key itself. The two headers let the gateway attribute the traffic to omp on the Usage page. The limits under each model are the developer's published figures from the live catalog, so omp trims the conversation before the model refuses it.

~/.omp/agent/models.yml

```
# ~/.omp/agent/models.yml
providers:
  uplinkswitch:
    baseUrl: https://api.uplinkswitch.com/v1
    api: openai-completions
    apiKey: UPLINKSWITCH_API_KEY
    headers:
      HTTP-Referer: https://uplinkswitch.ai
      X-Title: omp
    models:
      - id: claude-sonnet-5-5
        name: Claude Sonnet 5.5
        input: [text, image]
        contextWindow: 1000000
        maxTokens: 128000
      - id: claude-opus-5-5
        name: Claude Opus 5.5
        input: [text, image]
        contextWindow: 1000000
        maxTokens: 128000
      - id: gpt-6.1-sol
        name: GPT-6.1 Sol
        input: [text, image]
        contextWindow: 1050000
        maxTokens: 128000
      - id: gemini-3.1-pro-preview
        name: Gemini 3.1 Pro Preview
        input: [text, image]
        contextWindow: 1048576
        maxTokens: 65536
      - id: deepseek-v4-pro-0813
        name: DeepSeek V4 Pro 0813
        contextWindow: 1048576
        maxTokens: 393216
      - id: kimi-k3
        name: Kimi K3
        input: [text, image]
        contextWindow: 1048576
        maxTokens: 1048576
```

Every id under `models` shows up in `/model` as `uplinkswitch/<id>`. Any id on the [Models page](https://uplinkswitch.ai/models) can be added the same way. A model entry can also carry `reasoning: true` and a `thinking` block for effort controls, and a `cost` block with `input`, `output`, `cacheRead` and `cacheWrite` per million tokens for omp's own cost line; omp needs all four, and the console bills the live price either way.

## The key

Export the variable in the shell that launches omp, or put it in a `.env` file. omp loads `.env` from the current directory, `~/.omp/agent`, `~/.omp` and your home directory, in that order, with an exported value winning over all of them.

shell

```
export UPLINKSWITCH_API_KEY="sk-uplink-live-..."
omp
```

~/.omp/agent/.env

```
# ~/.omp/agent/.env
UPLINKSWITCH_API_KEY=sk-uplink-live-...
```

A value starting with `!` runs a shell command and uses its output as the key, for a secret manager. `--api-key` on the command line overrides `apiKey` for one run and is not saved.

## Which model to pick

Tool calling works on every chat model here, and omp's agent needs it for every file read, edit and command, so no id in the block is a dead end. Input price decides the session cost, because omp sends the conversation and every tool result back on each step; pick by the input column below. Set the default once:

~/.omp/agent/config.yml

```
# ~/.omp/agent/config.yml (or <repo>/.omp/config.yml)
modelRoles:
  default: uplinkswitch/claude-sonnet-5-5
```

Or start `omp`, run `/model` and assign a model to **Default**. `/switch` (Alt+P) changes only the current session; `--model` on the command line wins over everything. `--slow`, `--smol` and `--plan` override the thorough, lightweight and planning roles with any `uplinkswitch/<id>`. The [uncensored coding builds](https://uplinkswitch.ai/uncensored) go in the same block, billed per token.

## What an omp step costs

One agent step at 40,000 input tokens and 1,500 output tokens, which is a task that has read a few files and run a command or two. Nothing is counted at the cached rate.

| Model | Input / 1M | Output / 1M | Cached input / 1M | Under list | One step, 40,000 in + 1,500 out |
| --- | --- | --- | --- | --- | --- |
| [Claude Sonnet 5.5](https://uplinkswitch.ai/models/claude-sonnet-5-5) | $1.20 | $3.00 | $0.075 | 40% on input | $0.0525 |
| [Claude Opus 5.5](https://uplinkswitch.ai/models/claude-opus-5-5) | $2.80 | $10.00 | $0.15 | 30% on input | $0.127 |
| [GPT-6.1 Sol](https://uplinkswitch.ai/models/gpt-6.1-sol) | $0.60 | $3.00 | $0.06 | 70% on input | $0.0285 |
| [Gemini 3.1 Pro Preview](https://uplinkswitch.ai/models/gemini-3.1-pro-preview) | $1.20 | $7.20 | $0.12 | 40% on input | $0.0588 |
| [DeepSeek V4 Pro 0813](https://uplinkswitch.ai/models/deepseek-v4-pro-0813) | $0.792 | $1.188 | $0.0625 | 40% on input | $0.0335 |
| [Kimi K3](https://uplinkswitch.ai/models/kimi-k3) | $0.90 | $4.50 | $0.12 | 70% on input | $0.0428 |

USD per million tokens, live from GET /v1/catalog. Under list: against the developer’s own published input price. The last column is the step above at this base URL, nothing at the cached rate.

Claude Sonnet 5.5 is $0.0525 for that step here, and a ten-step task is $0.525. Cached input bills at the cache-read rate in the table by itself; there is no switch to set. The [Claude Code pricing post](https://uplinkswitch.ai/blog/claude-code-api-cost) works a day and a month of agent steps at these rates.

## Check it

`omp models uplinkswitch` lists the ids from the block; a bad field prints `models.yml validation failed` with its name. The second line sends one request in print mode:

shell

```
omp models uplinkswitch
omp -p --model uplinkswitch/claude-sonnet-5-5 "Reply with only OK"
```

From a shell, the same key should list the models:

shell

```
curl https://api.uplinkswitch.com/v1/models -H "Authorization: Bearer $UPLINKSWITCH_API_KEY"
```

The request shows on the [console](https://uplinkswitch.ai/console) Usage page within seconds, with its tokens and its charge, recorded with omp as the app.

## Errors you will see

-   `401 invalid_api_key`: the key is wrong or revoked, or the variable named in `apiKey` is not set in the shell that launched omp. A name omp cannot find is sent as the literal key. Export it, or check the `.env` path, and copy the key again from the console.
-   `402 insufficient_balance`: the balance does not cover the request. Top up in the console.
-   `402 monthly_limit_reached`: the key hit the monthly spend limit you set on it. Raise it in the console, or wait for the first of the month.
-   `404 model_not_found`: the id under `models` is not on the Models page at this base URL. Copy it from the page rather than typing it: a dot, a dash or a date suffix out of place is enough.
-   `403 scope_denied`: the key carries a model allowlist and this id is not on it. Pick an allowed id or use a key without the limit.
-   `429 rate_limited`: the key hit its requests-per-minute or concurrency limit. The response carries `retry-after` in seconds. Wait that long and resend.
-   The provider is missing from `/model`: the file is `models.yml`, not `config.yml`, and `baseUrl` ends in `/v1`. Run `omp models uplinkswitch` for the failing field.

## Good to know

-   Only the ids you list are offered. `discovery` with `type: openai-models-list` can read `GET /v1/models` instead, which brings in every chat id at once; `omp models refresh uplinkswitch` re-reads it.
-   A model omitted from a field defaults to text-only input, a 128,000 context window and 16,384 output tokens, which is why the block above fills them from the catalog.
-   `--models` restricts what Ctrl+P cycles through, by the same `provider/id` selectors.
-   The same key works in [OpenCode](https://uplinkswitch.ai/guides/opencode), [Claude Code](https://uplinkswitch.ai/guides/claude-code) and [Cline](https://uplinkswitch.ai/guides/cline) on the same balance. A key per tool keeps the spend apart on the Usage page.

## Questions

### 

Yes. A provider in ~/.omp/agent/models.yml with api: openai-completions sends chat completions to any baseUrl you give it (omp.sh/docs/custom-models, read 2026-10-28). Put https://api.uplinkswitch.com/v1 there and every model on the Models page answers, Claude included.

### 

List it under models in the provider block with its id, name and limits, then pick it as uplinkswitch/<id> with /model or --model. Only the ids you list appear in the picker; add a line when the Models page gains a model you want.

### 

Yes. The Claude ids answer the OpenAI chat completions format here, so claude-sonnet-5-5 and claude-opus-5-5 go in the same provider block as gpt-6.1-sol, with no Anthropic entry and no Anthropic variables.

### 

apiKey in models.yml names an environment variable; omp reads it from the shell at start or from a .env file in the project, ~/.omp/agent, ~/.omp or your home directory (read 2026-10-28). A name omp cannot find is sent as the literal key, which the gateway answers with 401.

### 

omp does not rank models; the choice is the same as in any agent. A flagship such as Claude Sonnet 5.5 or GPT-6.1 Sol as the default, Claude Opus 5.5 behind --slow for hard edits, and a model with a low input price behind --smol for titles and summaries. The table above is what one step costs on each today.

### 

Each request shows on the console Usage page within seconds with its tokens and its charge in dollars, filterable by key and model. Requests from this block carry X-Title: omp, so the gateway records omp as the app on each one.

Get a key in the [console](https://uplinkswitch.ai/console): prepaid credit, no subscription, 30-day price lock.

## Related

-   [Claude Code pricing](https://uplinkswitch.ai/blog/claude-code-api-cost)
-   [Claude Code alternatives compared](https://uplinkswitch.ai/blog/claude-code-alternatives)
-   [pi coding agent setup](https://uplinkswitch.ai/guides/pi)
-   [Hermes Agent setup](https://uplinkswitch.ai/guides/hermes-agent)
-   [OpenCode Zen vs one key](https://uplinkswitch.ai/guides/opencode)
-   [Claude Sonnet 5.5](https://uplinkswitch.ai/models/claude-sonnet-5-5)
-   [GPT-5.3-Codex](https://uplinkswitch.ai/models/gpt-5.3-codex)
-   [Kimi K2.7 Code](https://uplinkswitch.ai/models/kimi-k2.7-code)
-   [GLM 5.3](https://uplinkswitch.ai/models/glm-5.3)
-   [Claude API pricing](https://uplinkswitch.ai/pricing/claude)
-   [GPT API pricing](https://uplinkswitch.ai/pricing/gpt)
-   [Kimi API pricing](https://uplinkswitch.ai/pricing/kimi)
-   [GLM API pricing](https://uplinkswitch.ai/pricing/glm)
