Skip to content

Use PleumRouter with Any Coding Agent

It's OpenAI-compatible — point your agent at one base_url and you're done.

PleumRouter is an OpenAI-compatible API. Any agent that supports an OpenAI Compatible provider works as-is: set the base_url to https://apirouter.pleum.ai/v1 and the key to plm_…. Below are setup snippets for popular agents.

1. Common — base_url and API key#

First sign up, then issue a key under Dashboard → API Keys (keys start with plm_). Whatever the agent, all you need is the base_url (https://apirouter.pleum.ai/v1) and the key.

environment
export OPENAI_API_BASE=https://apirouter.pleum.ai/v1
export OPENAI_API_KEY=plm_xxxxxxxxxxxxxxxx
# Some agents (OpenCode, Crush) reference PLEUM_API_KEY  same key, set both.
export PLEUM_API_KEY=plm_xxxxxxxxxxxxxxxx

2. 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.

Cline · Roo Code · Kilo Code · Cursor
API Provider     OpenAI Compatible
Base URL         https://apirouter.pleum.ai/v1
API Key          plm_xxxxxxxxxxxxxxxx
Model ID         gpt-4.1
Always use the OpenAI Compatible slot. The dedicated OpenRouter entry is hardcoded to openrouter.ai and will fail. Cursor requires /v1 in the base URL and a non-empty key field. Kilo Codehas a known issue (#681) where the custom base URL isn't passed to model listing, so enter the model ID manually.

Continue.dev

Continue.dev is configured via a file. With model: AUTODETECT it pulls the model list automatically.

config.yaml
# ~/.continue/config.yaml
models:
  - name: PleumRouter
    provider: openai
    apiBase: https://apirouter.pleum.ai/v1
    apiKey: plm_xxxxxxxxxxxxxxxx
    model: AUTODETECT

Zed

Zed adds an OpenAI-compatible provider in settings. Field names can vary by version — check the Zed docs.

settings.json
// Zed settings.json
{
  "language_models": {
    "openai_compatible": {
      "PleumRouter": {
        "api_url": "https://apirouter.pleum.ai/v1",
        "available_models": [
          { "name": "gpt-4.1", "max_tokens": 128000 }
        ]
      }
    }
  }
}

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.

Aider

aider
export OPENAI_API_BASE=https://apirouter.pleum.ai/v1
export OPENAI_API_KEY=plm_xxxxxxxxxxxxxxxx

aider --model openai/gpt-4.1

OpenCode

opencode.json
// opencode.json   (or: /connect → Other)
{
  "provider": {
    "pleum": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "PleumRouter",
      "options": {
        "baseURL": "https://apirouter.pleum.ai/v1",
        "apiKey": "{env:PLEUM_API_KEY}"
      },
      "models": { "gpt-4.1": {} }
    }
  }
}

Crush

crush.json
// crush.json
{
  "providers": {
    "pleum": {
      "type": "openai-compat",
      "base_url": "https://apirouter.pleum.ai/v1",
      "api_key": "$PLEUM_API_KEY",
      "models": [{ "id": "gpt-4.1", "name": "gpt-4.1" }]
    }
  }
}

Goose · OpenHands

environment
export OPENAI_API_BASE=https://apirouter.pleum.ai/v1
export OPENAI_API_KEY=plm_xxxxxxxxxxxxxxxx

# Goose / OpenHands: prefix the model id with openai/
#   model = openai/gpt-4.1

Codex CLI

Codex CLI connects directly via the OpenAI Responses API (/v1/responses); the Chat Completions path was removed in February 2026. Add a provider with wire_api = "responses" in ~/.codex/config.toml and set PLEUM_API_KEY. Tool calls and streaming work end-to-end when routed to an OpenAI-compatible model.
~/.codex/config.toml
# ~/.codex/config.toml
# model / model_provider are document-root keys (must be above the [table]).
model = "gpt-4.1"
model_provider = "pleum"

[model_providers.pleum]
name = "PleumRouter"
base_url = "https://apirouter.pleum.ai/v1"   # Codex appends /responses  /v1/responses
env_key = "PLEUM_API_KEY"
wire_api = "responses"                      # Codex supports only the Responses API

# then:  export PLEUM_API_KEY=plm_xxxxxxxxxxxxxxxx  &&  codex
Gemini CLI upstream has weak support for external OpenAI-compatible endpoints; you may need an OpenAI-compatible wrapper or fork.

4. Claude Code (Anthropic-compatible)#

Claude Code and Claude Agent SDK tools connect via the Anthropic-compatible /v1/messages endpoint. The official CLI reads ANTHROPIC_API_KEY first, so set the same key on both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN to be safe. Point ANTHROPIC_BASE_URL at the root (no /v1)https://apirouter.pleum.ai — because the CLI appends /v1/messages itself (adding /v1 would produce /v1/v1/messages and fail). Tools and streaming work end-to-end when routed to an OpenAI-compatible model.
Claude Code
# ANTHROPIC_BASE_URL is the ROOT (no /v1)  the CLI appends /v1/messages itself.
export ANTHROPIC_BASE_URL=https://apirouter.pleum.ai
# The official CLI prefers ANTHROPIC_API_KEY; set both to be safe.
export ANTHROPIC_API_KEY=plm_xxxxxxxxxxxxxxxx     #  replace with your key from Dashboard > API Keys
export ANTHROPIC_AUTH_TOKEN=plm_xxxxxxxxxxxxxxxx  #  same key

# Pass a PleumRouter model id (see GET /v1/models for the full list):
claude --model anthropic/gpt-4.1
The plm_xxxxxxxxxxxxxxxx in the snippet is a placeholder. Replace it with a real key (starting with plm_) issued under API Keys in the dashboard. Find model IDs via GET /v1/models or on the models page.

5. Model IDs and auto-discovery#

Find model IDs at GET /v1/models or on the models page. Cline, Continue, OpenCode and others fetch this list automatically to fill their dropdowns. OpenRouter-format IDs (openai/gpt-5.5) are converted automatically.

list models
curl https://apirouter.pleum.ai/v1/models \
  -H "Authorization: Bearer plm_xxxxxxxxxxxxxxxx"

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.

multimodal endpoints
# Image generation
curl https://apirouter.pleum.ai/v1/images/generations \
  -H "Authorization: Bearer plm_xxxxxxxxxxxxxxxx" \
  -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 plm_xxxxxxxxxxxxxxxx" \
  -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 plm_xxxxxxxxxxxxxxxx" \
  -F model=MODEL_ID -F file=@audio.mp3

# 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 plm_xxxxxxxxxxxxxxxx" \
  -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).

litellm config.yaml
# litellm config.yaml  (LiteLLM proxy를 쓰는 경우)
model_list:
  - model_name: pleum-gpt-4.1
    litellm_params:
      model: openai/gpt-4.1              # openai/ prefix  OpenAI-compat route
      api_base: https://apirouter.pleum.ai/v1           # do NOT append /chat/completions
      api_key: os.environ/PLEUM_API_KEY
Stuck somewhere? Drop your key into the playground and test it right away. You also earn rewards for signing up, linking an account and your first call ($0 in total), plus a 10% bonus on your first payment.