For the complete documentation index, see llms.txt. This page is also available as Markdown.

Oh My Pi

About

oh-my-pi (omp) is an AI coding agent for the terminal. It ships subagents, plan mode, LSP, DAP, hindsight memory, hash-anchored edits, and time-traveling rules, backed by a native Rust engine. The project homepage is omp.sh.

As of PR #2120 (merged June 8, 2026), AI/ML API is a built-in provider preset in omp. Set AIMLAPI_API_KEY in your environment and omp will discover and use it automatically — no custom provider config needed.

Quick start

export AIMLAPI_API_KEY=your_key_here
omp

omp discovers the key, loads the bundled AI/ML API model catalog, and is ready to use.

When to use AI/ML API with omp

AI/ML API works well with omp when you want:

  • one key for many model providers with a single OpenAI-compatible endpoint

  • access to 350+ chat-compatible models without hand-writing provider config

  • AI/ML API models in omp's role-based routing and provider fallback chains

Prerequisites

Before you start, make sure you have:

The base URL is:

Need a key first? Use API Key Management.

Set up AI/ML API in omp

Environment variable

Set AIMLAPI_API_KEY in your shell or in your project's .env file:

omp reads the key automatically via getEnvApiKey(). No additional config is required.

Persistent setup

Add the key to your shell profile to make it available across sessions:

Bundled model catalog

omp ships a pre-generated catalog of AI/ML API chat-compatible models (350+ models as of the initial release). The catalog excludes image, video, TTS, embedding, and media models so only chat-completion models appear in the model picker. The catalog is regenerated from /v1/models on each release.

Model selection

Use exact AI/ML API model IDs. Common examples:

  • openai/gpt-4o

  • anthropic/claude-sonnet-4-5

  • google/gemini-2.5-flash

Good starting models

  • openai/gpt-4o for strong general use

  • anthropic/claude-sonnet-4-5 for coding and long-form work

  • google/gemini-2.5-flash for lower latency and lower cost

For the full catalog, use All Model IDs.

Provider routing

omp supports role-based model routing and fallback chains. The aimlapi provider participates in these the same way as any other built-in provider. You can pin AI/ML API models to specific roles (e.g. main agent, subagents, plan mode) in your omp config.

Example role config:

Config checklist

Make sure these values are set:

  • API key variable: AIMLAPI_API_KEY

  • provider ID: aimlapi

  • base URL: https://api.aimlapi.com/v1 (built in, no manual config needed)

  • model ID: exact AI/ML API chat-completion model ID

Troubleshooting

omp does not pick up AIMLAPI_API_KEY

The preset was added in PR #2120. Update omp to the latest version.

Check that the variable is exported in the current shell:

If it is empty, re-export it or source your shell profile.

A model I want is missing from the picker

The bundled catalog covers chat-completion models. Non-chat models (image, video, TTS, embedding) are intentionally excluded. If a chat model you need was released after the last catalog regeneration, set the model ID directly in your omp config.

I get an auth error

Check that:

  • AIMLAPI_API_KEY is correctly set and exported

  • the key is valid at aimlapi.com/app/keys

  • no other environment variable is overriding the key

I want to use a proxy

Set a custom base URL in your omp provider config. The aimlapi registry entry reads AIMLAPI_API_KEY against whatever base URL is configured.

Last updated

Was this helpful?