Skip to content

AI로 셋업하기

아래 블록을 ChatGPT·Claude·Cursor 같은 AI 어시스턴트에 그대로 붙여넣으면, AI가 알아서 당신의 코드를 PleumRouter로 설정해줍니다.

직접 코드를 고치는 대신 AI에게 시키고 싶다면, 셋업에 필요한 정보(Base URL, 인증, 엔드포인트, 예시 모델)를 한 블록으로 정리해 두었습니다. 복사 버튼으로 통째로 복사해 AI에게 붙여넣기만 하세요. PleumRouter는 OpenAI 호환이라 base_url api_key만 바꾸면 동작합니다.

Markdown — 대화형 AI용#

ChatGPT·Claude 같은 채팅형 AI에 붙여넣기 좋은 형식입니다. AI에게 보내는 지시문과 예제가 함께 들어 있습니다.

pleumrouter-setup.md
# PleumRouter setup (for AI assistants)

Use the information below to configure my project to call LLMs through PleumRouter.
PleumRouter is an OpenAI Chat Completions–compatible API, so for existing OpenAI SDK
code you only need to change base_url and api_key.

## Basics
- Service: PleumRouter (OpenAI-compatible LLM router, billed in KRW)
- Base URL: https://router.pleum.ai/v1
- Auth: HTTP header `Authorization: Bearer <API_KEY>`
- API key: starts with `plm_`. Get one: https://router.pleum.ai/keys

## Key endpoints (OpenAI-compatible)
- POST /v1/chat/completions       chat completions
- GET  /v1/models                 list available models (no auth)
- GET  /v1/credits                remaining credit balance
- POST /v1/embeddings             embeddings
- POST /v1/images/generations     image generation
- POST /v1/audio/speech           text-to-speech
- POST /v1/audio/transcriptions   speech-to-text

## Model IDs
- Examples: gpt-4.1, claude-fable-5, gpt-5.5, gemini-3.1-pro-preview
- Fetch the full list at runtime via `GET https://router.pleum.ai/v1/models` (models change often)

## Python (OpenAI SDK)
```python
from openai import OpenAI

client = OpenAI(
    api_key="plm_xxxxxxxxxxxxxxxx",
    base_url="https://router.pleum.ai/v1",
)
resp = client.chat.completions.create(
    model="gpt-4.1",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
```

## TypeScript (OpenAI SDK)
```ts
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "plm_xxxxxxxxxxxxxxxx",
  baseURL: "https://router.pleum.ai/v1",
});
const resp = await client.chat.completions.create({
  model: "gpt-4.1",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);
```

## Notes
- The response includes a `cost` field (cost.krw in KRW, cost.fx_rate, cost.markup_rate).
- Keep your API key in environment variables; do not hardcode it.

JSON — 도구·코드용#

Cursor·에이전트 도구나 코드가 파싱하기 좋은 구조화 설정입니다. 같은 정보를 기계가 읽기 쉬운 형태로 담았습니다.

pleumrouter-setup.json
{
  "service": "PleumRouter",
  "description": "OpenAI-compatible LLM router, billed in KRW. Works with existing OpenAI SDK code by changing only base_url and api_key.",
  "openai_compatible": true,
  "base_url": "https://router.pleum.ai/v1",
  "auth": {
    "type": "bearer",
    "header": "Authorization",
    "value_format": "Bearer <API_KEY>",
    "api_key_prefix": "plm_",
    "get_api_key_url": "https://router.pleum.ai/keys"
  },
  "endpoints": {
    "chat_completions": {
      "method": "POST",
      "path": "/v1/chat/completions"
    },
    "models": {
      "method": "GET",
      "path": "/v1/models",
      "auth_required": false
    },
    "credits": {
      "method": "GET",
      "path": "/v1/credits"
    },
    "embeddings": {
      "method": "POST",
      "path": "/v1/embeddings"
    },
    "images": {
      "method": "POST",
      "path": "/v1/images/generations"
    },
    "tts": {
      "method": "POST",
      "path": "/v1/audio/speech"
    },
    "stt": {
      "method": "POST",
      "path": "/v1/audio/transcriptions"
    }
  },
  "example_models": [
    "gpt-4.1",
    "claude-fable-5",
    "gpt-5.5",
    "gemini-3.1-pro-preview"
  ],
  "models_catalog": "https://router.pleum.ai/v1/models",
  "notes": [
    "Models change often; don't rely on example_models — fetch /v1/models at runtime.",
    "The response includes cost in KRW (cost.krw), the applied FX rate (cost.fx_rate), and markup (cost.markup_rate).",
    "Keep your API key in environment variables; do not hardcode it."
  ]
}
스니펫의 plm_xxxxxxxxxxxxxxxx 자리에는 본인 키를 넣어야 합니다. API 키는 대시보드 → API 키에서 plm_로 시작하는 키를 발급받으세요.

다음 단계#