Quick Start
- Sign up — Log in to the dashboard and create an organization
- Add credits — Your org needs sufficient credits to call the API (402 = insufficient balance)
- Create an API Key — Dashboard → API Keys; copy the full key (shown once only)
- Send requests — Set the Base URL below and send Bearer token in the Authorization header
Authentication
Except GET /health and GET /models, every request must include an API Key in the header. Keys belong to an organization; usage is billed against org credits.
Authorization: Bearer sr-your-api-key-here
Core Capabilities
OpenAI Compatible
Chat Completions format — point your OpenAI SDK at our base_url with zero migration cost.
100+ Models · 20+ Channels
GPT, Claude, DeepSeek, Qwen, Gemini, Kimi and more through one gateway with automatic upstream routing.
Multimodal & Streaming
Text, image, video, file, and audio input; SSE streaming and reasoning_content output.
Async Generation
Image/video async tasks via Generations API with webhooks — Seedream, Seedance, etc.
API V1 (Current)
StableReleased 2025-01-01Unified AI gateway API. OpenAI-compatible Chat Completions, multimodal input, streaming, and async image/video generation. The platform auto-selects the best channel; responses include router_metadata with the actual channel used (clients cannot specify channel).
Base URL
https://your-gateway.com/api/v1Authentication
Most endpoints require Authorization: Bearer YOUR_API_KEY. GET /health and GET /models are public.
Smart Routing
SeekRouter keeps multiple upstream channel mappings per model. You only choose model — default routing is OpenRouter-style price-weighted load balancing. Append :floor / :nitro / :free, or pass a provider object (sort, only, ignore, order). You cannot specify channel. Each response returns the channel used for audit and billing:
{
"channel": { "id": "...", "name": "OpenRouter" },
"router_metadata": {
"channel_id": "...",
"channel_name": "OpenRouter",
"model_used": "qwen/qwen-plus",
"latency_ms": 3507,
"fallback_used": false
},
"sr_id": "sr-e9c52d26"
}Note: OpenRouter's top-level provider: "Alibaba" is the upstream model vendor, not SeekRouter channel.name.
Endpoint Index
| Method | Path | Description |
|---|---|---|
| POST | /chat/completions | Chat / multimodal / sync image generation |
| POST | /messages | Anthropic Messages (Claude SDK / Claude Code) |
| POST | /generations | Async image/video generation (submit task) |
| GET | /generations/{id} | Query async task status |
| GET | /generations/{id}/result | Fetch async task result |
| GET | /credits | Org wallet: remaining / total_usage |
| GET | /key | This key usage, daily/weekly/monthly, remaining balance |
| GET | /activity | This key, last 30 UTC days by date × model × provider |
| GET | /generation | Look up one call by response id (not async /generations/{id}) |
| GET | /models | List models and pricing |
| GET | /models/{id} | Get single model details |
| GET | /health | Health check (no auth) |
Endpoint Details
Expand each endpoint for parameters, examples, and response fields.
Multimodal ContentPart
messages.content may be a string or ContentPart array. Supported types:
textTextPlain text; supported by all models
{"type": "text", "text": "Hi, could you help me..."}image_urlImageImage URL or Base64; detail: low/high/auto (default auto)
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg", "detail": "auto"}}video_urlVideoVideo URL or Base64; detail: low/high (default low)
{"type": "video_url", "video_url": {"url": "https://example.com/clip.mp4"}}file_urlFilePDF and documents via URL or Base64
{"type": "file_url", "file_url": {"url": "https://example.com/report.pdf"}}audio_inputAudioBase64 audio; format: wav, mp3, etc.
{"type": "audio_input", "audio_input": {"data": "base64_audio_string", "format": "wav"}}Model Capability Matrix
| Model | Text | Img in | Vid in | Img out | Vid out | Reason | Tools | Endpoint |
|---|---|---|---|---|---|---|---|---|
GPT-4o / GPT-5 gpt-4o / gpt-5 | ✓ | ✓ | — | — | — | — | ✓ | /chat/completions |
DeepSeek V3 / R1 deepseek-v3 / deepseek-r1 | ✓ | — | — | — | — | ✓ | — | /chat/completions |
Kimi K2.5 / K2.6 kimi-k2.5 / kimi-k2.6 | ✓ | ✓ | ✓ | — | — | ✓ | — | /chat/completions |
Gemini 2.5 Flash gemini-2.5-flash | ✓ | ✓ | — | — | — | ✓ | ✓ | /chat/completions |
Gemini 2.5 Flash Image gemini-2.5-flash-image | — | — | — | ✓ | — | — | — | /chat/completions |
NanoBanana nanobanana | — | — | — | ✓ | — | — | — | /chat/completions |
GLM-4.5V / GLM-5V glm-4.5v / glm-5v | ✓ | ✓ | ✓ | — | — | ✓ | ✓ | /chat/completions |
HappyHorse happyhorse | ✓ | — | — | — | — | — | ✓ | /chat/completions |
Seedream 5.0 Lite seedream-5.0-lite | — | ✓ | — | ✓ | — | — | — | /generations |
Seedance 2.0 seedance-2.0 | — | ✓ | — | — | ✓ | — | — | /generations |
Hunyuan Video hunyuan-video | — | ✓ | — | — | ✓ | — | — | /generations |
Error Codes
| HTTP | Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid request parameters |
| 400 | unsupported_model | Model not found or unavailable |
| 400 | context_length_exceeded | Input exceeds model context limit |
| 400 | modality_not_supported | Model does not support requested modality |
| 401 | invalid_api_key | Invalid or missing API key |
| 402 | insufficient_quota | Insufficient credits or quota |
| 404 | not_found | Resource not found (e.g. invalid task ID) |
| 413 | content_too_large | Request body too large |
| 422 | content_filter | Blocked by content filter |
| 429 | rate_limit_exceeded | Rate limit exceeded |
| 500 | internal_error | Internal gateway error |
| 502 | upstream_error | Upstream provider error |
| 503 | service_unavailable | Service temporarily unavailable |
| 504 | upstream_timeout | Upstream request timeout |
OpenAPI / Interactive Debug
Machine-readable OpenAPI spec and Swagger UI for Postman import, SDK generation, or Try it out.