Set up with AI
When you want an AI to make safe, project-aware changes, copy one instruction payload below.
PleumRouter is OpenAI-compatible. The payload tells an AI to reuse your existing SDK or integration and keep the change as small as possible.
Three steps#
- 01
1. Create an API key
Dashboard → API Keys creates the key; store it somewhere safe.
- 02
2. Choose a format and copy
Choose Markdown for a chat AI or JSON for a tool or agent, then copy the entire block.
- 03
3. Paste and verify
Let the AI propose the changes, then put the real key into server-side secret storage yourself and verify models plus one smoke test.
pleumrouter-setup.md
Best for pasting the complete instruction into conversational AIs such as ChatGPT or Claude.
# PleumRouter setup instructions
Use this payload to configure my existing project for PleumRouter. PleumRouter is OpenAI-compatible.
## Setup instructions
- Inspect the project's stack, server/client boundary, and existing SDK or integration before editing.
- Reuse the existing SDK, client, and integration pattern whenever possible; make the minimum necessary changes.
- Configure the PleumRouter base URL and authentication only in server-side code or server-side configuration.
- Fetch available models from GET https://apirouter.pleum.ai/v1/models at runtime before selecting one; do not guess model IDs.
- Do not introduce a new client, SDK, framework, or broad refactor solely for this setup.
## Connection
- Base URL: https://apirouter.pleum.ai/v1
- Authentication: Authorization: Bearer <API_KEY>
- API key prefix: plm_
- API key placeholder: plm_xxxxxxxxxxxxxxxx
- Create an API key: https://router.pleum.ai/keys
## Endpoints
- POST https://apirouter.pleum.ai/v1/chat/completions (path: /v1/chat/completions; auth_required=true) — Create chat completions.
- POST https://apirouter.pleum.ai/v1/messages (path: /v1/messages; auth_required=true) — Create Anthropic Messages API messages.
- POST https://apirouter.pleum.ai/v1/responses (path: /v1/responses; auth_required=true) — Create OpenAI Responses API responses.
- GET https://apirouter.pleum.ai/v1/models (path: /v1/models; auth_required=false) — List currently available models and pricing.
- GET https://apirouter.pleum.ai/v1/credits (path: /v1/credits; auth_required=true) — Read the remaining credit balance.
- POST https://apirouter.pleum.ai/v1/embeddings (path: /v1/embeddings; auth_required=true) — Create embeddings.
- POST https://apirouter.pleum.ai/v1/images/generations (path: /v1/images/generations; auth_required=true) — Create images.
- POST https://apirouter.pleum.ai/v1/images/edits (path: /v1/images/edits; auth_required=true) — Edit images (multipart).
- WS wss://apirouter.pleum.ai/v1/realtime (path: /v1/realtime; auth_required=true) — OpenAI Realtime speech-to-speech WebSocket.
- POST https://apirouter.pleum.ai/v1/audio/speech (path: /v1/audio/speech; auth_required=true) — Create speech audio.
- POST https://apirouter.pleum.ai/v1/audio/transcriptions (path: /v1/audio/transcriptions; auth_required=true) — Transcribe audio.
## Model selection
- Example models only: gpt-4.1, claude-haiku-4-5, gpt-5.4-nano, gemini-3.6-flash, qwen3.8-max
- Fetch the live model catalog first: https://apirouter.pleum.ai/v1/models
## Security
- Keep `plm_xxxxxxxxxxxxxxxx` as the placeholder while this payload is pasted into an AI assistant.
- Never request, paste, or place a real API key in the AI prompt, client-side code, source files, version control, or logs.
- After the AI changes are ready, manually put the real key in server-side environment variables or approved secret storage.
## Verification
- After the real key is set server-side, fetch /v1/models and choose a returned model rather than an assumed ID.
- Run exactly one non-production smoke test through the existing server-side integration.
- Completion criteria: the smoke test returns a response, no key appears in output, and the result names the changed files and commands run.
## Billing response fields
- Charges use the currency for the account's market; do not assume a single market currency.
- `cost.krw` is a legacy field name. Its integer value represents the smallest unit of the account market's currency (KRW and JPY use whole units; BRL uses centavos).
- `cost.fx_rate` is the applied FX rate and `cost.markup_rate` is the applied markup.
## Documentation
- Authentication: https://router.pleum.ai/docs/api#auth
- Quickstart (method tabs): https://router.pleum.ai/docs
- AI SDK: https://router.pleum.ai/docs/ai-sdk
- Messages (Anthropic): https://router.pleum.ai/docs/api/messages
- Images (generate & edit): https://router.pleum.ai/docs/api/images
- Realtime (WebSocket): https://router.pleum.ai/docs/api/realtime
- Models: https://router.pleum.ai/docs/api/models
- Errors: https://router.pleum.ai/docs/api/errors
- Agent integration: https://router.pleum.ai/docs/cookbook/agent-integrationBest when Cursor, an agent, or automation can consume structured setup data.
{
"service": "PleumRouter",
"description": "OpenAI-compatible LLM router. Reuse an existing compatible integration when possible.",
"openai_compatible": true,
"api_origin": "https://apirouter.pleum.ai",
"base_url": "https://apirouter.pleum.ai/v1",
"auth": {
"type": "bearer",
"header": "Authorization",
"value_format": "Bearer <API_KEY>",
"api_key_prefix": "plm_",
"api_key_placeholder": "plm_xxxxxxxxxxxxxxxx",
"get_api_key_url": "https://router.pleum.ai/keys"
},
"endpoints": {
"chat_completions": {
"method": "POST",
"path": "/v1/chat/completions",
"url": "https://apirouter.pleum.ai/v1/chat/completions",
"auth_required": true,
"description": "Create chat completions."
},
"messages": {
"method": "POST",
"path": "/v1/messages",
"url": "https://apirouter.pleum.ai/v1/messages",
"auth_required": true,
"description": "Create Anthropic Messages API messages."
},
"responses": {
"method": "POST",
"path": "/v1/responses",
"url": "https://apirouter.pleum.ai/v1/responses",
"auth_required": true,
"description": "Create OpenAI Responses API responses."
},
"models": {
"method": "GET",
"path": "/v1/models",
"url": "https://apirouter.pleum.ai/v1/models",
"auth_required": false,
"description": "List currently available models and pricing."
},
"credits": {
"method": "GET",
"path": "/v1/credits",
"url": "https://apirouter.pleum.ai/v1/credits",
"auth_required": true,
"description": "Read the remaining credit balance."
},
"embeddings": {
"method": "POST",
"path": "/v1/embeddings",
"url": "https://apirouter.pleum.ai/v1/embeddings",
"auth_required": true,
"description": "Create embeddings."
},
"images": {
"method": "POST",
"path": "/v1/images/generations",
"url": "https://apirouter.pleum.ai/v1/images/generations",
"auth_required": true,
"description": "Create images."
},
"image_edits": {
"method": "POST",
"path": "/v1/images/edits",
"url": "https://apirouter.pleum.ai/v1/images/edits",
"auth_required": true,
"description": "Edit images (multipart)."
},
"realtime": {
"method": "WS",
"path": "/v1/realtime",
"url": "wss://apirouter.pleum.ai/v1/realtime",
"auth_required": true,
"description": "OpenAI Realtime speech-to-speech WebSocket."
},
"tts": {
"method": "POST",
"path": "/v1/audio/speech",
"url": "https://apirouter.pleum.ai/v1/audio/speech",
"auth_required": true,
"description": "Create speech audio."
},
"stt": {
"method": "POST",
"path": "/v1/audio/transcriptions",
"url": "https://apirouter.pleum.ai/v1/audio/transcriptions",
"auth_required": true,
"description": "Transcribe audio."
}
},
"example_models": [
"gpt-4.1",
"claude-haiku-4-5",
"gpt-5.4-nano",
"gemini-3.6-flash",
"qwen3.8-max"
],
"models_catalog": "https://apirouter.pleum.ai/v1/models",
"setup_instructions": [
"Inspect the project's stack, server/client boundary, and existing SDK or integration before editing.",
"Reuse the existing SDK, client, and integration pattern whenever possible; make the minimum necessary changes.",
"Configure the PleumRouter base URL and authentication only in server-side code or server-side configuration.",
"Fetch available models from GET https://apirouter.pleum.ai/v1/models at runtime before selecting one; do not guess model IDs.",
"Do not introduce a new client, SDK, framework, or broad refactor solely for this setup."
],
"security": [
"Keep `plm_xxxxxxxxxxxxxxxx` as the placeholder while this payload is pasted into an AI assistant.",
"Never request, paste, or place a real API key in the AI prompt, client-side code, source files, version control, or logs.",
"After the AI changes are ready, manually put the real key in server-side environment variables or approved secret storage."
],
"verification": [
"After the real key is set server-side, fetch /v1/models and choose a returned model rather than an assumed ID.",
"Run exactly one non-production smoke test through the existing server-side integration.",
"Completion criteria: the smoke test returns a response, no key appears in output, and the result names the changed files and commands run."
],
"billing": {
"currency": "Charges use the currency for the account's market; do not assume a single market currency.",
"cost_krw": "`cost.krw` is a legacy field name. Its integer value represents the smallest unit of the account market's currency (KRW and JPY use whole units; BRL uses centavos).",
"fx_rate": "`cost.fx_rate` is the applied FX rate and `cost.markup_rate` is the applied markup."
},
"documentation": {
"authentication": "https://router.pleum.ai/docs/api#auth",
"quickstart": "https://router.pleum.ai/docs",
"ai_sdk": "https://router.pleum.ai/docs/ai-sdk",
"messages": "https://router.pleum.ai/docs/api/messages",
"images": "https://router.pleum.ai/docs/api/images",
"realtime": "https://router.pleum.ai/docs/api/realtime",
"models": "https://router.pleum.ai/docs/api/models",
"errors": "https://router.pleum.ai/docs/api/errors",
"agent_integration": "https://router.pleum.ai/docs/cookbook/agent-integration"
}
}Keep the
plm_xxxxxxxxxxxxxxxx placeholder when pasting to an AI. Never put the real key in the prompt, client-side code, source files, or logs; after the AI changes are ready, manually put it only in server-side environment variables or approved secret storage.Completion criteria#
- The existing server-side integration is reused and the change is limited to the files that need it.
- One non-production smoke test succeeds with a model returned by the live /v1/models response.
- The AI reports changed files, commands run, and the result, without exposing a key in output.