---
title: omp with AI Gateway
description: Connect omp (oh-my-pi) to AI Gateway with the Vercel CLI or an environment variable. Use the built-in provider to access the model catalog.
url: "https://vercel.com/docs/ai-gateway/coding-agents/omp"
last_updated: 2026-09-13
related:
  - /docs/cli/ai-gateway
  - /docs/ai-gateway/observability-and-spend/budgets
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# omp with AI Gateway

[omp](https://omp.sh) (oh-my-pi) is an open-source terminal coding agent forked from Pi. It inherits Pi's first-class `vercel-ai-gateway` provider, so it already knows the gateway's base URL and fills its model picker from the gateway catalog. Unlike Pi, omp reads the credential from the environment, so the whole setup is one variable.

## Set up with the Vercel CLI

Run the [Vercel CLI setup command](/docs/cli/ai-gateway#setup) for omp:

```bash filename="terminal"
npx vercel@latest ai-gateway setup --agent omp
```

The command provisions a key and adds the export to your shell profile, backed by the macOS Keychain where available.

## Configuring omp

If you can't use the Vercel CLI, configure omp manually:

- ### Install omp
  Install omp with its official installer:
  ```bash filename="Terminal"
  curl -fsSL https://raw.githubusercontent.com/can1357/oh-my-pi/main/scripts/install.sh | sh
  ```

- ### Create an API key
  Go to the [**AI Gateway**](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway\&title=Go+to+AI+Gateway) section in the Vercel dashboard sidebar and click **API keys** to create a new API key.

- ### Export the key
  omp authenticates its `vercel-ai-gateway` provider from the `AI_GATEWAY_API_KEY` environment variable. Add the export to your shell profile:
  ```bash filename="~/.zshrc"
  export AI_GATEWAY_API_KEY="your-ai-gateway-api-key"
  ```
  Open a new terminal so the variable is loaded.
  > **💡 Note:** omp also reads `.env` files, including `~/.omp/.env`, so the export can live
  > there instead of your shell profile. Its own `/login` flow stores credentials
  > in a local database. The environment variable has the same effect without
  > it.

- ### Pick a model
  Start omp and choose a gateway model with `/model`, or name one when you launch:
  ```bash filename="Terminal"
  omp --model vercel-ai-gateway/anthropic/claude-opus-5
  ```
  Unlike Pi, which takes bare gateway model IDs, omp prefixes them with the provider id: `vercel-ai-gateway/` followed by the gateway's `creator/model-name` format. To browse the catalog from the terminal, with context sizes and capabilities:
  ```bash filename="Terminal"
  omp models vercel-ai-gateway
  ```

## Next steps

- Browse the [models catalog](/ai-gateway/models) for available models
- Read omp's own [provider documentation](https://omp.sh/docs/providers)
- Configure [spend limits](/docs/ai-gateway/observability-and-spend/budgets) on your API key
- Connect your other agents with the [Vercel CLI](/docs/cli/ai-gateway#setup)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
