← Back to Home
Get API Key →API Documentation
100% OpenAI-compatible gateway for managed open-weight models and BYOK frontier routing.
1. Base URL & Authentication
All requests are 100% compatible with the official OpenAI SDK format. Pass your sk-mandyxai-... key in the Authorization header.
Base URL: https://mandyxai.com/api/v1
Header: Authorization: Bearer sk-mandyxai-your-key
2. Core API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /chat/completions | Full URL: https://mandyxai.com/api/v1/chat/completions — supports stream: true SSE and automatic billing/BYOK routing. |
| GET | /models | Full URL: https://mandyxai.com/api/v1/models — list all available managed and BYOK model IDs with per-token pricing metadata. |
Wallet balances, token usage logs, and Stripe top-ups are managed directly in your Console Dashboard.
3. Supported Models & Billing
| Model | Model ID | Billing Mode | Rate (In / Out per 1M) |
|---|---|---|---|
| DeepSeek V4.1 Flash | deepseek/deepseek-v4.1-flash | Managed Pay-As-You-Go | $0.18 / $0.72 |
| DeepSeek V4.1 Pro | deepseek/deepseek-v4.1-pro | Managed Pay-As-You-Go | $0.79 / $2.38 |
| Gemma 4 31B | google/gemma-4-31b | Managed Pay-As-You-Go | $0.17 / $0.48 |
| Qwen3 Next 80B | qwen/qwen3-next-80b-a3b-instruct | Managed Pay-As-You-Go | $0.18 / $1.44 |
| Anthropic Claude Sonnet-5.5 | anthropic/claude-sonnet-5.5 | BYOK (Zero Markup) | Your Provider Key |
| OpenAI GPT-5.6 | openai/gpt-5.6 | BYOK (Zero Markup) | Your Provider Key |
| Google Gemini 2.5 Pro | google/gemini-2.5-pro | BYOK (Zero Markup) | Your Provider Key |
4. Quickstart Code Examples
Python (Official OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://mandyxai.com/api/v1",
api_key="sk-mandyxai-your-api-key",
)
res = client.chat.completions.create(
model="deepseek/deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(res.choices[0].message.content)5. Error Codes & Rate Limits
| HTTP Status | Error Type | Resolution |
|---|---|---|
| 401 Unauthorized | authentication_error | Missing, invalid, or revoked sk-mandyxai-... key. |
| 402 Payment Required | insufficient_quota | Wallet balance depleted or missing BYOK provider key in Dashboard. |
| 429 Too Many Requests | rate_limit_exceeded | Default limits: 20 RPM (Free trial) · 300+ RPM (Paid / Topped-up accounts). |
| 502 Bad Gateway | upstream_error | Upstream compute provider temporarily busy; retry with exponential backoff. |
6. Bring-Your-Own-Key (BYOK) & IDE Setup
To use frontier models (Claude Sonnet-5.5, GPT-5.6, Gemini 2.5 Pro) with zero token markup, save your provider API keys inside your Console Dashboard. For Cline, Roo Code, or Cursor, select OpenAI Compatible, set Base URL to https://mandyxai.com, and paste your sk-mandyxai-... key.