Skip to content
OpenKey

Auto Router

OpenRouterReleased Nov 8, 2023

Your prompt will be processed by a meta-model and routed to one of dozens of models (see below), optimizing for the best possible output. To see which model was used,...

Try in playground
Context window
2M tokens
Input
text, image, audio, file, video
Output
text, image
Tokenizer
Router
Released
Nov 8, 2023

Pricing

Per 1M tokens. The provider price and our flat 3% fee are separate columns — what you pay is their sum.

Variable pricing — this router selects an underlying model per request, and you pay that model's price + 3%.

Supported parameters

  • frequency_penalty
  • include_reasoning
  • logit_bias
  • logprobs
  • max_completion_tokens
  • max_tokens
  • min_p
  • presence_penalty
  • reasoning
  • repetition_penalty
  • response_format
  • seed
  • stop
  • structured_outputs
  • temperature
  • tool_choice
  • tools
  • top_a
  • top_k
  • top_logprobs
  • top_p
  • web_search_options

Call it

OpenAI-compatible: point your SDK at api.openkey.ai/v1 and use model openrouter/auto.

Code sample language
curl https://api.openkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openrouter/auto",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openkey.ai/v1",
    api_key=os.environ["OPENKEY_API_KEY"],
)

completion = client.chat.completions.create(
    model="openrouter/auto",
    messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openkey.ai/v1",
  apiKey: process.env.OPENKEY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "openrouter/auto",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

What is Auto Router's context window?
Auto Router accepts up to 2M tokens of context.
Is Auto Router OpenAI-compatible?
Yes. Send requests to OpenKey's /v1/chat/completions endpoint with model "openrouter/auto" using any OpenAI SDK — only the base URL and API key change.
What inputs does Auto Router support?
Auto Router accepts text, image, audio, file, video input and produces text, image output.

More from OpenRouter

All OpenRouter models →