← Back to dashboard

Documentation

How to connect your favorite AI coding tools to OhhMyAgent.

Quick Start
1
Create an account & top up
Register at /register, then top up your Sonnet/Opus balance from the dashboard.
2
Copy your API key
Your key (sk-mvx-...) is on the dashboard. Keep it secret; you can rotate it anytime.
3
Point your tool to OhhMyAgent
Use the config for your tool below.
Endpoints & Base URL

Important: the base URL depends on the tool. Claude Code wants the root (it auto-appends /v1/messages); OpenAI-style SDKs want /v1. Domain is ohhmyagent.com (.dev, not .id).

Endpoints
https://ohhmyagent.com/v1/messages          # Anthropic Messages API
https://ohhmyagent.com/v1/chat/completions   # OpenAI-compatible
https://ohhmyagent.com/v1/models             # list models
Models
oma/claude-sonnet-4-6
oma/claude-opus-4-8

Tool Setup

Claude Code
Anthropic's official CLI.

Set environment variables (base URL is the ROOT, no /v1):

export ANTHROPIC_BASE_URL="https://ohhmyagent.com"
export ANTHROPIC_AUTH_TOKEN="sk-mvx-xxxxxxxx"
export ANTHROPIC_MODEL="oma/claude-opus-4-8"
export ANTHROPIC_SMALL_FAST_MODEL="oma/claude-sonnet-4-6"

claude

Or in ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://ohhmyagent.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-mvx-xxxxxxxx",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "oma/claude-opus-4-8",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "oma/claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "oma/claude-sonnet-4-6"
  }
}
OpenCode
Terminal AI coding agent.

In ~/.config/opencode/opencode.json (baseURL WITH /v1):

{
  "provider": {
    "ohhmyagent": {
      "npm": "@ai-sdk/anthropic",
      "options": {
        "baseURL": "https://ohhmyagent.com/v1",
        "apiKey": "sk-mvx-xxxxxxxx"
      },
      "models": {
        "oma/claude-opus-4-8": { "name": "OhhMyAgent Opus 4.8" },
        "oma/claude-sonnet-4-6": { "name": "OhhMyAgent Sonnet 4.6" }
      }
    }
  }
}
Kilo Code
VS Code AI agent extension.
  1. Open Kilo Code settings → API Provider.
  2. Choose Anthropic (or Anthropic-compatible).
  3. Set Base URL = https://ohhmyagent.com
  4. Set API Key = sk-mvx-xxxxxxxx
  5. Model: oma/claude-opus-4-8 or oma/claude-sonnet-4-6
Cline
VS Code autonomous coding agent.
  1. Cline settings → API Provider → Anthropic.
  2. Enable "Use custom base URL" → https://ohhmyagent.com
  3. API Key: sk-mvx-xxxxxxxx
  4. Model ID: oma/claude-opus-4-8
Cursor
AI code editor (OpenAI-compatible mode).
  1. Cursor Settings → Models → OpenAI API Key → "Override Base URL".
  2. Base URL: https://ohhmyagent.com/v1
  3. API Key: sk-mvx-xxxxxxxx
  4. Add model: oma/claude-sonnet-4-6
9Router
Self-hosted LLM router.

Add OhhMyAgent as a custom provider (Anthropic type):

Base URL : https://ohhmyagent.com
API Key  : sk-mvx-xxxxxxxx
Type     : anthropic
Models   : oma/claude-sonnet-4-6, oma/claude-opus-4-8
cURL / SDK
Raw HTTP or any SDK.

Anthropic Messages API:

curl https://ohhmyagent.com/v1/messages \
  -H "x-api-key: sk-mvx-xxxxxxxx" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "oma/claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [{"role":"user","content":"Halo!"}]
  }'

OpenAI-compatible:

curl https://ohhmyagent.com/v1/chat/completions \
  -H "authorization: Bearer sk-mvx-xxxxxxxx" \
  -H "content-type: application/json" \
  -d '{
    "model": "oma/claude-sonnet-4-6",
    "messages": [{"role":"user","content":"Halo!"}]
  }'
Troubleshooting

401 / invalid key — check your API key is correct and active (rotate on dashboard if needed).

404 on requests — wrong base URL. Claude Code: use root (no /v1). SDKs: use /v1. Never double up to /v1/v1.

402 / insufficient balance — top up the balance for that specific model (Sonnet & Opus balances are separate).

429 / rate limit — max 50 requests/minute per key. Slow down slightly.

529 / overloaded — our upstream provider is momentarily busy. Requests are retried automatically — please try again shortly.

wrong domain — make sure you're using ohhmyagent.com.

Still stuck? Email [email protected]