API Documentation

Share

KiteRouter is a multi-format AI gateway that accepts requests in OpenAI, Anthropic, and Gemini native formats. Send requests using the SDK you already use, point it at KiteRouter's base URL, and KiteRouter routes the request to the best active upstream provider.

It's Just One Line

Already using the OpenAI SDK? Just point it at KiteRouter:

diff
1 import OpenAI from 'openai'
2
3 const client = new OpenAI({
4+  baseURL: 'https://kiterouter.com/api/v1',   // ← add this
5-  apiKey: 'sk-...',
6+  apiKey: 'kr-your-api-key', // ← swap your key
7 })

That's it — same SDK, same methods, now with access to 100+ models from OpenAI, Anthropic, Google, and more.

Supported API Formats

FormatEndpointNotes
OpenAI/api/v1/chat/completionsStandard OpenAI-compatible request and response shape
Anthropic/api/v1/messagesNative Anthropic Messages API format
Gemini/api/v1/models/{model}:generateContentNative Gemini API format
StreamingSame endpoints with stream: trueServer-Sent Events for all formats
Models/api/v1/modelsLists KiteRouter model IDs available to your key

Info: Use whichever SDK you prefer — OpenAI, Anthropic, or Gemini. KiteRouter forwards requests to upstream providers and can rewrite the public model to the mapped upstream model.

Quick Start

  1. Create an API key in your dashboard
  2. Set the base URL to https://kiterouter.com/api/v1
  3. Use a KiteRouter model ID from Models or /api/v1/models
  4. Call any supported endpoint with your existing SDK
bash
1curl https://kiterouter.com/api/v1/chat/completions \
2  -H "Authorization: Bearer kr-your-api-key" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "gpt-4o-mini",
6    "messages": [
7      {"role": "user", "content": "Say hello in one sentence."}
8    ]
9  }'

Base URL

text
1https://kiterouter.com/api/v1

Ready to start building?

Get your API key and make your first request in under a minute.