Skip to content

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#

  1. 01

    1. Create an API key

    Dashboard → API Keys creates the key; store it somewhere safe.

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

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

Continue with#