Documentation

Everything you need to integrate SeekRouter into your application.

Quick Start

SeekRouter provides an OpenAI-compatible API that routes requests to 100+ AI models from 20+ providers.

  1. Create an account at seekrouter.com
  2. Create an organization from the dashboard
  3. Add credits via Stripe payment
  4. Generate an API key and start making requests

Authentication

All API requests require a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer sr-your-api-key-here

API Reference

POST /api/v1/chat/completions

Creates a chat completion. Compatible with the OpenAI Chat Completions API.

Request Body

ParameterTypeRequiredDescription
modelstringYesModel ID (e.g. "deepseek/deepseek-chat")
messagesarrayYesArray of message objects with role and content
temperaturenumberNoSampling temperature (0-2). Default: 1
max_tokensintegerNoMaximum tokens in the response
streambooleanNoEnable streaming. Default: false
top_pnumberNoNucleus sampling parameter. Default: 1

Example Request (cURL)

curl https://seekrouter.com/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SEEKROUTER_API_KEY" \
  -d '{
  "model": "deepseek/deepseek-chat",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ]
}'

Example Request (Python)

from openai import OpenAI

client = OpenAI(
    base_url="https://seekrouter.com/api/v1",
    api_key="sr-your-api-key",
)

response = client.chat.completions.create(
    model="deepseek/deepseek-chat",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Example Request (Node.js)

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://seekrouter.com/api/v1',
  apiKey: 'sr-your-api-key',
});

const response = await client.chat.completions.create({
  model: 'deepseek/deepseek-chat',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Hello!' }
  ]
});

console.log(response.choices[0].message.content);

Response

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1709000000,
  "model": "deepseek/deepseek-chat",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 9,
    "total_tokens": 29
  }
}

Error Codes

CodeDescription
401Invalid or missing API key
402Insufficient credits
403App not approved or permission denied
404Model not found
429Rate limit exceeded
503Provider unavailable

Available Models

Use the model ID in the format provider/model-name. See the full list with pricing on the Models page.