# PNC (Pulsey Neural Cloud) > OpenAI-compatible API gateway to GPT, Claude and DeepSeek models, billed in Russian rubles (RUB) from a prepaid balance. Base URL: https://ai.pulsey.ru/v1 . Auth: `Authorization: Bearer pnc-sk-...`. Human-readable docs (Russian): https://ai.pulsey.ru/docs/ ## How to connect (for agents) 1. The user signs in at https://ai.pulsey.ru with a Pulsey account (QR code or e-mail code), tops up the balance and creates a key in "API → API-ключи". Keys look like `pnc-sk-<48 hex chars>` and are shown in full only once. 2. Use any OpenAI SDK: set base URL `https://ai.pulsey.ru/v1` and the key. Env vars: `OPENAI_BASE_URL=https://ai.pulsey.ru/v1`, `OPENAI_API_KEY=pnc-sk-...`. 3. Call `POST /v1/chat/completions` with an exact model ID from the list below. ```python from openai import OpenAI client = OpenAI(base_url="https://ai.pulsey.ru/v1", api_key="pnc-sk-...") r = client.chat.completions.create(model="deepseek-v4.1-flash", messages=[{"role": "user", "content": "Hi"}]) print(r.choices[0].message.content) ``` ## Endpoints - `GET /v1/models` — model list with prices (no auth required). - `POST /v1/chat/completions` — OpenAI Chat Completions format. Supported fields: `model`, `messages`, `stream`, `max_tokens` / `max_completion_tokens`, `temperature`, `top_p`, `stop`, `presence_penalty`, `frequency_penalty`, `seed`, `tools`, `tool_choice`, `parallel_tool_calls`, `response_format`, `reasoning_effort`. Other fields are dropped. - Not available: embeddings, images generation, audio, assistants, files, legacy `/v1/completions`. ## Models (prices in RUB per 1M tokens) | model id | input | output | cache read / write | context / max output | vision | |---|---|---|---|---|---| | `openai/gpt-5.6-luna` | 5 | 5 | 0.1 / 1 | 1.1M / 128K | yes | | `claude-haiku-5.5` | 5 | 10 | 0.1 / 1 | 1M / 128K | yes | | `deepseek-v4.1-flash` | 5 | 10 | 0.2 / 2 | 1M / 393.2K | yes | Always check `GET /v1/models` for the current list. ## Streaming `"stream": true` returns Server-Sent Events in OpenAI format, ending with `data: [DONE]`; a chunk with `usage` precedes it. Lines starting with `:` are keep-alive comments (the model is thinking) — ignore them. Some models stay silent for up to ~30 s before the first token. ## Images Vision models accept `{"type": "image_url", "image_url": {"url": "https://... or data:image/...;base64,..."}}` parts inside `content`. PNG, JPEG, WebP, GIF. Max request body 12 MB. ## Billing - Charged after each request by exact token counts: plain input, cached input (at cost price, no markup) and output are priced separately. Minimum charge 0.01 RUB per request. - The balance never goes negative: `max_tokens` is capped automatically by the remaining balance. - If the client aborts a stream, only generated tokens are charged. ## Errors OpenAI-style body: `{"error": {"message": "...", "type": "..."}}`. Messages are in Russian and safe to show to end users. - 400 `invalid_request_error` — bad request (empty messages, image sent to a non-vision model). - 401 `invalid_api_key` — missing, wrong or revoked key. - 402 `insufficient_balance` — top up the balance at https://ai.pulsey.ru. - 404 `model_not_found` — unknown model id. - 413 — body larger than 12 MB. - 429 `rate_limit` — too many requests (120/min per key) or model overloaded; retry with backoff. - 502 `upstream_error` — temporary provider error; retry. ## Limits - 120 requests per minute per API key. - 12 MB max request body. - Up to 64,000 output tokens per request. - Up to 20 active keys per account. ## Tools that work out of the box Cline / Roo Code / Kilo Code (provider "OpenAI Compatible"), Continue (`provider: openai`, `apiBase`), Cursor (Override OpenAI Base URL), any OpenAI SDK.