Setup guide

Three steps to your first request

  1. Link a subscription

    • Claude
    • ChatGPT by OpenAI
    • Ollama
    • OpenCode Go
    1. Accounts → Link a subscription
    2. Approve in the provider's tab
    3. Copy what it shows — all of it
    4. Paste it back → Link account

    Some providers take an API key, or a code you enter on their page, instead. The dialog says which.

    Create an account
  2. Copy your key

    Linking creates one if you have none yet. Copy it again any time from Keys.

  3. Point a client at it

    https://api.megaloop.dev
    Claude Code CLI
    Set up with settings.json

    1. Open or create your user settings file:

    macOS / Linux
    ~/.claude/settings.json
    Windows
    %USERPROFILE%\.claude\settings.json

    Merge these env entries into the existing JSON object; do not overwrite your other settings. Replace YOUR_KEY with your own Megaloop key.

    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.megaloop.dev",
        "ANTHROPIC_AUTH_TOKEN": "YOUR_KEY"
      }
    }

    2. Save, then run in your terminal — not inside an existing chat:

    Start a new session
    claude

    Save the file, then restart the CLI. Typing a configuration command into an existing chat does not change that session.

    For one launch without editing your global settings, fill in the downloaded template and run:

    claude --settings ./megaloop-settings.json

    3. Run /status to check the base URL and auth token, then send a test message and find it in Megaloop → Traffic.

    Do not commit a real key to a repository or share a filled-in file. Send only the placeholder template; each person supplies their own key.

    Official configuration documentation ↗
    Codex CLI
    Set up with config.toml

    1. Open or create your user settings file:

    macOS / Linux
    ~/.codex/config.toml
    Windows
    %USERPROFILE%\.codex\config.toml

    Merge into your user config; do not overwrite it or duplicate a table. Keep model and model_provider at the top level, before any [section]. Choose a supported model your linked accounts can serve.

    model = "gpt-6-sol"
    model_provider = "megaloop"
    
    [model_providers.megaloop]
    name = "Megaloop"
    base_url = "https://api.megaloop.dev/v1"
    wire_api = "responses"
    env_key = "MEGALOOP_API_KEY"
    requires_openai_auth = false

    2. Save, then run in your terminal — not inside an existing chat:

    macOS / Linux terminal
    export MEGALOOP_API_KEY="YOUR_KEY"
    codex
    Windows PowerShell
    $env:MEGALOOP_API_KEY="YOUR_KEY"
    codex

    Set the key in each new terminal, or supply it through your secret manager. The token stays out of config.toml. Managed company settings may require your administrator's approval.

    3. Start a new session, send a test message, and confirm it appears in Megaloop → Traffic. This selects Megaloop instead of the CLI's usual provider; it does not remove your existing sign-in.

    Do not commit a real key to a repository or share a filled-in file. Send only the placeholder template; each person supplies their own key.

    Official configuration documentation ↗
    Cursor
    Cursor Settings → Models → API Keys
    OpenAI API Key             YOUR_KEY
    Override OpenAI Base URL   https://api.megaloop.dev/v1
    Claude
    ChatGPT by OpenAI

    Add each name as a custom model, exactly as written: a model Cursor already ships goes to Cursor, not to your pool. Tab completion stays on Cursor's own models. GET /v1/models lists every name your key can use.

    Any other client
    base URL   https://api.megaloop.dev
    token      YOUR_KEY          sent as:  Authorization: Bearer YOUR_KEY

    Every client needs the same two values under whatever names it gives them. If yours offers a choice between an API key and an auth token, take the auth token.

    Check that it took