Use PleumRouter with Any Coding Agent
It's OpenAI-compatible — point your agent at one base_url and you're done.
OpenAI Compatible provider works as-is: set the base_url to https://apirouter.pleum.ai/v1 and the key to your plm_ key. Below are setup snippets for popular agents.1. Common — base_url and API key#
First sign up, then issue a key on the dashboard's API Keys page (keys start with plm_). Whatever the agent, all you need is the base_url (https://apirouter.pleum.ai/v1) and the key.
export PLEUM_API_KEY=plm_xxxxxxxxxxxxxxxx
export OPENAI_API_BASE=https://apirouter.pleum.ai/v1
# Qwen Code, MiniMax Code, MiMo Code and OpenClaw read OPENAI_BASE_URL instead
export OPENAI_BASE_URL=$OPENAI_API_BASE
# most agents read OPENAI_API_KEY; Codex, OpenCode, Crush and Pi read PLEUM_API_KEY
export OPENAI_API_KEY=$PLEUM_API_KEY2. IDE · GUI agents#
These agents let you pick OpenAI Compatible (or Custom OpenAI) as the provider in settings and paste the values below — Cline, Roo Code, Kilo Code, Cursor.
/v1 in the base URL and a non-empty key field. Kilo Code: if the model list does not fill in, enter the model ID manually.3. Terminal · CLI agents#
Terminal agents mostly take an OpenAI-compatible endpoint via environment variables or a config file. Goose and OpenHands need the openai/ prefix on the model name.
- Codex
- Aider
- OpenCode
- Crush
- Goose
- OpenHands
- Qwen Code
- MiniMax Code
- MiMo Code
- OpenClaw
- Plandex
- Open Interpreter
- Gemini CLI
- Antigravity CLI
/v1beta. GOOGLE_GEMINI_BASE_URL is the origin without /v1beta. See Gemini CLI, Antigravity CLI, and Gemini API.4. Desktop apps#
Apps you keep in the Dock do not inherit shell env. pleum wire mints a dedicated plm_ key via POST /v1/keys and merges it into ~/.codex/config.toml and ~/.claude/settings.json. pleum launch applies temporary settings to that run only; Desktop reads user-level files. Codex needs supports_websockets = false and Bearer http_headers. Claude Code Desktop uses the in-app Configure Third-Party Inference form — do not put /v1 on the base URL. See the Codex, Claude Code, and Cursor cookbooks.
5. Model IDs and auto-discovery#
Find model IDs at GET /v1/models or on the models page. Continue fetches this list automatically, but some tools, such as OpenCode, need the models listed in their config file. OpenRouter-format IDs (openai/gpt-5.5) are converted automatically.
curl https://apirouter.pleum.ai/v1/models \
-H "Authorization: Bearer $PLEUM_API_KEY"6. Image · audio · video (direct API)#
Image, audio and video are also OpenAI-compatible HTTP endpoints — image POST /v1/images/generations, TTS POST /v1/audio/speech, STT POST /v1/audio/transcriptions, and video POST /v1/video/generations (async — returns a job_id, then poll GET /v1/jobs/{job_id}). Swap MODEL_ID for a model that supports the modality — see the models page or GET /v1/models.
# Image generation
curl https://apirouter.pleum.ai/v1/images/generations \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "MODEL_ID", "prompt": "a red bicycle", "n": 1, "size": "1024x1024" }'
# Text-to-speech (returns audio bytes; cost in X-Cost-Krw header)
curl https://apirouter.pleum.ai/v1/audio/speech \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "MODEL_ID", "input": "Hello there", "voice": "alloy" }' --output speech.mp3
# Speech-to-text (multipart upload)
curl https://apirouter.pleum.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-F model=MODEL_ID -F "file=@audio.mp3;type=audio/mpeg"
# Video generation is async: POST returns a job_id, then poll GET /v1/jobs/{job_id}
curl https://apirouter.pleum.ai/v1/video/generations \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "MODEL_ID", "prompt": "a drone shot over a forest" }'7. More agents#
Most agents not listed here work the same way. Via OpenAI-compatible base_url — OpenHands, Open Interpreter, SWE-agent, Qwen Code, MetaGPT, GPT-Pilot, ChatDev, Tabby (chat), Dyad, Plandex, bolt.diy, Forge, Kimi CLI, gptme, Letta, and more. Via Anthropic-compatible (/v1/messages): claude-code-router also connects with ANTHROPIC_BASE_URL. LiteLLM-based agents (Aider, OpenHands, Open Interpreter, SWE-agent, gptme) connect directly via base_url since PleumRouter is already a gateway — but if you keep a LiteLLM proxy, configure it as below (don't append /chat/completions to api_base).