Developer Documentation

SeekRouter API Documentation

Developer-facing AI gateway API: one integration for 100+ models, OpenAI-compatible, smart channel routing, multimodal input, and async generation. Covers auth, endpoints, examples, and error codes. Use Swagger UI for interactive testing.

Quick Start

  1. Sign up — Log in to the dashboard and create an organization
  2. Add credits — Your org needs sufficient credits to call the API (402 = insufficient balance)
  3. Create an API Key — Dashboard → API Keys; copy the full key (shown once only)
  4. 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.

Header
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-01

Unified 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/v1

Authentication

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

MethodPathDescription
POST/chat/completionsChat / multimodal / sync image generation
POST/messagesAnthropic Messages (Claude SDK / Claude Code)
POST/generationsAsync image/video generation (submit task)
GET/generations/{id}Query async task status
GET/generations/{id}/resultFetch async task result
GET/creditsOrg wallet: remaining / total_usage
GET/keyThis key usage, daily/weekly/monthly, remaining balance
GET/activityThis key, last 30 UTC days by date × model × provider
GET/generationLook up one call by response id (not async /generations/{id})
GET/modelsList models and pricing
GET/models/{id}Get single model details
GET/healthHealth 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:

textText

Plain text; supported by all models

{"type": "text", "text": "Hi, could you help me..."}
image_urlImage

Image URL or Base64; detail: low/high/auto (default auto)

{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg", "detail": "auto"}}
video_urlVideo

Video URL or Base64; detail: low/high (default low)

{"type": "video_url", "video_url": {"url": "https://example.com/clip.mp4"}}
file_urlFile

PDF and documents via URL or Base64

{"type": "file_url", "file_url": {"url": "https://example.com/report.pdf"}}
audio_inputAudio

Base64 audio; format: wav, mp3, etc.

{"type": "audio_input", "audio_input": {"data": "base64_audio_string", "format": "wav"}}

Model Capability Matrix

ModelTextImg inVid inImg outVid outReasonToolsEndpoint
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

HTTPCodeDescription
400invalid_requestInvalid request parameters
400unsupported_modelModel not found or unavailable
400context_length_exceededInput exceeds model context limit
400modality_not_supportedModel does not support requested modality
401invalid_api_keyInvalid or missing API key
402insufficient_quotaInsufficient credits or quota
404not_foundResource not found (e.g. invalid task ID)
413content_too_largeRequest body too large
422content_filterBlocked by content filter
429rate_limit_exceededRate limit exceeded
500internal_errorInternal gateway error
502upstream_errorUpstream provider error
503service_unavailableService temporarily unavailable
504upstream_timeoutUpstream request timeout

OpenAPI / Interactive Debug

Machine-readable OpenAPI spec and Swagger UI for Postman import, SDK generation, or Try it out.