Setup guide
Three steps to your first request
Link a subscription
- Claude
- ChatGPT by OpenAI
- Ollama
- OpenCode Go
- Accounts → Link a subscription
- Approve in the provider's tab
- Copy what it shows — all of it
- 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 accountCopy your key
Linking creates one if you have none yet. Copy it again any time from Keys.
Point a client at it
https://api.megaloop.devClaude Code CLISet 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 sessionclaudeSave 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.json3. 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 CLISet 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 = false2. Save, then run in your terminal — not inside an existing chat:
macOS / Linux terminalexport MEGALOOP_API_KEY="YOUR_KEY" codexWindows PowerShell$env:MEGALOOP_API_KEY="YOUR_KEY" codexSet 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 ↗CursorCursor Settings → Models → API Keys OpenAI API Key YOUR_KEY Override OpenAI Base URL https://api.megaloop.dev/v1ClaudeChatGPT by OpenAIAdd 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.
Check that it tookAny other clientbase URL https://api.megaloop.dev token YOUR_KEY sent as: Authorization: Bearer YOUR_KEYEvery 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.