OmniAgent 文档

OpenRouter

本文介绍如何在 OmniAgent 中配置 OpenRouter 模型服务。

OpenRouter 在 Anthropic API 与各大模型提供商之间提供了一层统一的中转与管理,支持自动故障转移、用量统计与组织预算控制。

获取 API Key

  1. 登录 OpenRouter 官网,注册或登录账号。

  2. 进入 Settings → Keys 页面。

    image-20260306152259207

  3. 点击 Create Key,复制生成的 API Key。

    image-20260306152344167

    密钥仅在创建时显示一次,请立即保存到安全位置。

在 OmniAgent 中配置

  1. 打开 OmniAgent 的 系统设置 -> API Key 页面。

  2. 点击 + 添加,选择提供商 其他

  3. 配置信息

    • Base URL: 填写需要使用的 Base URL(见下方列表)。
    • 模型:填写需要使用的模型名称。
    • API Key: 填入您刚刚获取的 OpenRouter API Key。

image-20260228182954882

常用服务商 Base URL 参考

如需填写 Base URL,可参考下表选择对应服务商地址:

服务商Base URL推荐模型
Qwenhttps://dashscope.aliyuncs.com/apps/anthropicqwen3.5-plus
DeepSeekhttps://api.deepseek.com/anthropicdeepseek-chat
Kimihttps://api.moonshot.ai/anthropic kimi-k2.5
GLMhttps://open.bigmodel.cn/api/anthropicGLM-4.7
MiniMaxhttps://api.minimax.com/anthropicMiniMax-M2.5
Anthropichttps://api.anthropic.com/v1claude-sonnet-4-6

注意事项

  • Base URL: OpenRouter 使用 https://openrouter.ai/api 作为端点,与 Anthropic API 格式完全兼容。

OpenRouter 支持 Anthropic API 兼容格式,您可以在任何支持 Anthropic SDK 的工具中,将 Base URL 替换为 https://openrouter.ai/api 后直接使用 OpenRouter API Key 接入。

On this page