# OneToken API > OpenAI- and Anthropic-compatible AI API gateway with ruble billing via SBP (Faster Payments System) and direct access without VPN. OneToken provides developers with a single unified API key (`sk-...`) to access frontier AI models from Anthropic, OpenAI, DeepSeek, and Google. It is engineered for low latency, zero monthly subscription fees, pay-as-you-go per-token billing, and seamless compatibility with coding agents (Cursor IDE, Cline, Roo Code, Claude Code) and standard client libraries (`openai`, LangChain, LlamaIndex). - **Website**: https://onetoken.ru - **OpenAI-Compatible Base URL**: `https://api.onetoken.ru/v1` - **Anthropic-Compatible Base URL**: `https://api.onetoken.ru` - **Management & Top-up**: Telegram Bot [@OneTokenRobot](https://t.me/OneTokenRobot) - **Status / Health check**: `https://api.onetoken.ru/api/status` --- ## Key Features 1. **Direct Access without VPN**: Clients connect directly to `api.onetoken.ru`. The gateway routes requests through a high-bandwidth European network contour with low latency to AI provider backends. 2. **Pay-as-you-go (No Subscriptions)**: No recurring $20/month fees that expire unused. Users pay only for actual input and output tokens consumed. Balance never expires. 3. **Instant Ruble Top-up via SBP**: Deposits start from 100 ₽ via QR-code or banking app link, plus Russian bank cards. 4. **Welcome Test Balance**: New users receive a 15 ₽ starter grant immediately upon issuing a key in [@OneTokenRobot](https://t.me/OneTokenRobot) (enough for ~400,000 DeepSeek tokens). 5. **Full Protocol Support**: Unbuffered streaming (Server-Sent Events / SSE), Tool Use / Function Calling, Structured JSON Outputs, Multimodal Vision, and extended reasoning timeouts (up to 300s for DeepSeek R1). 6. **OneToken Shield™ Zero-Knowledge Protection**: Built-in ultra-fast privacy filter (<1.5 ms latency) written in Rust. Automatically redacts and masks API keys, DB credentials, JWT/Bearer tokens, SSH/RSA keys, bank cards (Luhn algorithm check), and cryptocurrency seed phrases (BIP-39) before forwarding prompts to external LLMs. Original secrets are restored on the fly during SSE streaming right before output in the IDE. 7. **OneToken SmartRoute™ 2.0 Dynamic Latency & Throughput Balancer**: Automated streaming probes (SSE) and health checks across upstream channels every 5 minutes measuring Time to First Token (TTFT) and generation throughput (Tokens Per Second / TPS). Employs per-model routing (dedicated fast-lanes for Claude, GPT, and Grok families) with 1-hour moving averages and anti-flapping hysteresis (25% / 1500ms), eliminating bottlenecks and sluggish token streaming in Cursor IDE, Cline, and Claude Code. 8. **Telegram Playground Chat Bot**: Interactive testing bot [@ChatGPT_OneTokenBot](https://t.me/ChatGPT_OneTokenBot) connected to the same unified key and balance. Test prompts, code snippets, and images from mobile devices without launching an IDE. --- ## Available Models & Pricing (RUB per 1,000,000 Tokens) | Model ID | Provider | Input Price (1M tok) | Output Price (1M tok) | Best For | | :--- | :--- | :--- | :--- | :--- | | `claude-sonnet-5` | Anthropic | 170 ₽ | 850 ₽ | Industry benchmark for architecture and coding agents | | `claude-opus-5` | Anthropic | 300 ₽ | 1 500 ₽ | Maximum intelligence for complex architectural audits | | `gpt-6.1-sol` | OpenAI | 150 ₽ | 600 ₽ | Next-gen reasoning, coding, and multimodal tasks (alias: `gpt-4o`) | | `gpt-6.1-terra` | OpenAI | 160 ₽ | 650 ₽ | High-performance codebase refactoring and unit tests | | `deepseek-v4-pro` | DeepSeek | 33 ₽ | 131 ₽ | Olympiad-level code, math, and deep reasoning | | `deepseek-v4.1-flash` | DeepSeek | 24 ₽ | 36 ₽ | Ultra low-cost fast coding, completions, and background agents | | `grok-4.7` | xAI | 100 ₽ | 300 ₽ | Real-time web knowledge, fast processing | | `gemini-4-argon` | Google | 180 ₽ | 720 ₽ | Next-gen Google Argon architecture with deep reasoning | | `gemini-3.8-flash` | Google | 12.5 ₽ | 45 ₽ | Ultra-fast responses (300 ms), 1M context | | `qwen3.8-max` | Alibaba | 45 ₽ | 140 ₽ | Top open weights for instruction following and structured JSON | *Full and current model catalog can be fetched via `GET https://api.onetoken.ru/v1/models` using your API key. Classic aliases (`claude-3-5-sonnet`, `gpt-4o`, `gemini-2.5-flash`, `deepseek-chat`) are routed automatically.* --- ## Quickstart & Integrations ### 1. Cursor IDE In Cursor settings (`Ctrl/Cmd + Shift + J` -> **Models**): - **OpenAI API Key**: `sk-ot-...` (obtained from @OneTokenRobot) - **Override OpenAI Base URL**: `https://api.onetoken.ru/v1` - Click **Verify**, then add models: `claude-sonnet-5`, `gpt-6.1-sol`, `deepseek-v4-pro`, `gemini-3.8-flash`. ### 2. Cline / Roo Code (VS Code Extension) In Cline Settings: - **API Provider**: `OpenAI Compatible` - **Base URL**: `https://api.onetoken.ru/v1` - **API Key**: `sk-ot-...` - **Model ID**: `claude-3-5-sonnet` or `deepseek-chat` ### 3. Claude Code (CLI) Set environment variables: ```bash export ANTHROPIC_BASE_URL="https://api.onetoken.ru" export ANTHROPIC_API_KEY="sk-ot-..." claude ``` On Windows PowerShell: ```powershell $env:ANTHROPIC_BASE_URL="https://api.onetoken.ru" $env:ANTHROPIC_API_KEY="sk-ot-..." claude ``` ### 4. Python (`openai` SDK) ```python from openai import OpenAI client = OpenAI( base_url="https://api.onetoken.ru/v1", api_key="sk-ot-...", ) stream = client.chat.completions.create( model="deepseek-chat", messages=[{"role": "user", "content": "Write a debounce helper in TypeScript."}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ### 5. Node.js (`openai` package) ```javascript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.onetoken.ru/v1", apiKey: "sk-ot-...", }); const response = await client.chat.completions.create({ model: "claude-3-5-sonnet", messages: [{ role: "user", content: "Explain async iterators in JS." }], }); console.log(response.choices[0].message.content); ``` ### 6. Raw cURL ```bash curl https://api.onetoken.ru/v1/chat/completions \ -H "Authorization: Bearer sk-ot-..." \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat", "messages": [{"role": "user", "content": "Ping"}] }' ``` --- ## Authentication & Security - **OneToken Shield™ Zero-Knowledge Core**: Sensitive context elements (tokens, passwords, cards, seeds) are replaced in-flight. Mapping tables reside strictly in transient RAM with a 120-second TTL and are never written to disk or logs. - API keys follow the format `sk-ot-...` and can be regenerated at any time with a single tap inside [@OneTokenRobot](https://t.me/OneTokenRobot) (invalidating previous keys immediately). - User data is never used for model training. All network traffic is encrypted via TLS 1.3. - Only non-sensitive billing metadata (model, token counts, timestamp) is logged for balance accounting. - Automated daily database backups run 24/7 with cryptographic integrity checks. --- ## Partner & Referral Program (Win-Win) Developers can earn passive balance for code generation by inviting colleagues, teams, and peers: - **Referred Friend**: Receives **15 ₽** immediately upon start + **+10% welcome bonus** added to the amount of their first top-up. - **Referrer (Partner)**: Receives **+50 ₽ fix reward** on their balance upon the referral's first deposit (>= 100 ₽) + **10% lifetime Rev-Share** from all subsequent top-ups. - **Bot Interface**: Accessible in [@OneTokenRobot](https://t.me/OneTokenRobot) via the `🎁 Партнёрка` button with real-time statistics, instant push notifications, 1-click link copying, and Telegram native share button. --- ## Support & Contacts - **Management & Payment Bot**: [@OneTokenRobot](https://t.me/OneTokenRobot) - **Playground Chat Bot**: [@ChatGPT_OneTokenBot](https://t.me/ChatGPT_OneTokenBot) - **Community Channel**: [@OneTokenVibe](https://t.me/OneTokenVibe) - **Live Support**: Directly in Telegram dialog with [@OneTokenRobot](https://t.me/OneTokenRobot) or via support@onetoken.ru - **Gateway Endpoint**: `api.onetoken.ru`