跳转到内容

OpenRouter

OpenRouter 用一个统一的 API 提供多家服务商的模型,方便你快速切换和比较不同模型。

官网: openrouter.ai

  1. 访问 OpenRouter,使用 Google 或 GitHub 账号登录。

  2. 打开 Keys 页面,复制已有 Key,或新建一个 Key。

也可以直接在 Dline 设置中点击 Get OpenRouter API Key,在浏览器中完成授权后自动获取 Key。

通用步骤见模型配置。

  1. 点击 Dline 面板标题栏的 Settings 按钮。

  2. 在 Provider 中选择 OpenRouter。

  3. 把 Key 粘贴到 OpenRouter API Key 输入框。填写后,输入框旁边会显示账户余额。

  4. 在 Model 中搜索并选择模型。

Key 只保存在本机,并且只用于从本扩展发起 API 请求。

  • 价格: OpenRouter 按底层模型的价格计费,详见 OpenRouter Models。
  • 提示缓存: OpenRouter 会把缓存请求转发给支持缓存的底层模型。哪些模型支持缓存,见 OpenRouter Models。
  • 路由: 模型信息区域提供服务商排序选项,可以控制 OpenRouter 把请求路由给哪些底层服务商。