五折到 9 月 1 日
促销到 9 月 1 日——Qwen3.8-27B 和 DeepSeek-V4-Flash 半价。之后回到标价。id 不变,API 不变。
| 模型 | 标价(入 / 出 per 1M) | 促销到 9 月 1 日 |
|---|---|---|
qwen/qwen3.8-27b | $0.30 / $3.25 | $0.15 / $1.625 |
deepseek/deepseek-v4-flash | $0.14 / $0.28 | $0.07 / $0.14 |
Qwen3.8-27B:262K 上下文、思考、工具——适合一直开着写代码的 27B。DeepSeek-V4-Flash:500K 上下文,聊天很快。发布说明。
怎么调
把 OpenAI SDK 指到 AnyRouter,或用 AI SDK。两边同一条 model 字符串——已经是促销价。
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: "qwen/qwen3.8-27b",
messages: [{ role: "user", content: "Summarize this diff in three bullets." }],
})
console.log(res.choices[0]?.message.content)import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"
const anyrouter = createAnyRouter()
const { text } = await generateText({
model: anyrouter("qwen/qwen3.8-27b"),
prompt: "Summarize this diff in three bullets.",
})
console.log(text)编程 agent:anyr login 然后 anyr claude --model "qwen/qwen3.8-27b"(setup)。不写代码:playground。
相关文章
Use AnyRouter with the Vercel AI SDK
@anyr/ai-sdk-provider wraps the AnyRouter gateway as a standard Vercel AI SDK provider. Call createAnyRouter(), pass a provider/model id, and generateText, streamText, and generateObject work unchanged — switching models is a one-string edit.
Run coding agents through one gateway
Point Claude Code, Codex, OpenCode, Cursor, or any OpenAI-compatible tool at AnyRouter and get one key for every model, unified billing, per-request audit logs, and app attribution. Two environment variables — or one npx command with the anyr CLI launcher.
Use the OpenAI SDK with any model
The official openai package for Python and TypeScript doesn't have to mean OpenAI models. Override base_url and api_key, keep every other call the same, and address 170+ models across 28+ providers as provider/model strings — including OpenAI's own.
What is AnyRouter? A plain-English guide to AI model routing
An AI model router lets you call many LLMs through one API. Here's what AnyRouter is, why it exists, and whether it's useful for your next project.