Configs2026年4月6日·1 分钟阅读

OpenRouter — Unified LLM API with Smart Routing

Single API endpoint for 200+ LLM models with automatic fallbacks, price comparison, and usage tracking. Route to the cheapest or fastest model that fits your needs. 3,000+ stars.

AI
AI Open Source · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key="sk-or-...")
response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4-20250514", messages=[{"role": "user", "content": "你好"}]
)

简介

OpenRouter 是一个统一 API 网关,GitHub 3,000+ stars。一个 API Key 访问 200+ LLM 模型,支持自动降级、实时价格比较和智能路由。适合需要多模型访问而不想管理多个 API 密钥的开发者。


🙏

来源与感谢

Created by OpenRouter. Licensed under MIT.

openrouter — ⭐ 3,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产