Skip to content
All releases
Added

Context-window floors on anyrouter/auto, free, byok, and the other virtual ids

Append [1m] or [500k] to any first-party virtual id to keep only members with at least that context window. Not a new listing — the same preset, with a token floor.

First-party virtual ids now accept a context-window suffix. [anyrouter/auto[1m]](https://anyrouter.dev/model/anyrouter/auto) and [anyrouter/auto[500k]](https://anyrouter.dev/model/anyrouter/auto) are the same preset as anyrouter/auto, with provider.min_context set to 1,000,000 or 500,000 tokens. The same spelling works on anyrouter/free, anyrouter/byok, anyrouter/coding, anyrouter/agent, anyrouter/hermes, anyrouter/cowork, and anyrouter/latest. There is no extra catalog row for the suffix.

Claude Code strips [1m] before the gateway, so anyr claude peels the floor into CLAUDE_CODE_EXTRA_BODY. A bare anyrouter/auto without the floor can still pick a high-usage member. Model pages list the shortcuts and can preview the ≥500k / ≥1M member list.

Try it in the Vercel AI SDK. createAnyRouter() reads ANYROUTER_API_KEY:

import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

const anyrouter = createAnyRouter()

const { text } = await generateText({
  model: anyrouter("anyrouter/auto[1m]"),
  prompt: "Summarize this diff in three bullets.",
})
console.log(text)
generateText with a 1M floor on auto.

Already on the OpenAI SDK? OpenAI SDK playbook:

OpenAI-compatible: SDK or curl.
import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "https://anyrouter.dev/api/v1",
  apiKey: process.env.ANYROUTER_API_KEY,
})

const res = await client.chat.completions.create({
  model: "anyrouter/auto[1m]",
  messages: [{ role: "user", content: "Hello" }],
})
console.log(res.choices[0]?.message.content)
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anyrouter/auto[1m]","messages":[{"role":"user","content":"Hello"}]}'

Or launch a coding agent through the anyr CLI:

Coding agents via the AnyRouter CLI.
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr claude --model "anyrouter/auto[1m]"
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr opencode --model "anyrouter/free[1m]"
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr codex --model "anyrouter/auto[500k]"

More: AI SDK · OpenAI SDK · coding agents · Claude Code.

No terminal? Open the playground and send a first message.

Try in playground
Looking for the full catalog? Browse all models.