接入指南

LiteLLM 接入 Seedrise

在 LiteLLM 中使用 Seedrise:给每个模型 ID 加上 openai/ 前缀,把 api_base 设为 https://api.seedrise.ai/v1,并传入你的 Seedrise Key;litellm.completion() 和代理的 config.yaml 都适用。

更新于 2026-11-02

LiteLLM 设置一览

LiteLLM 参数Seedrise 对应值
modelopenai/ 加 Seedrise 模型 ID,例如 openai/claude-sonnet-5-5
api_basehttps://api.seedrise.ai/v1
api_key你的 Seedrise Key,在配置里写作 os.environ/SEEDRISE_API_KEY
Anthropic 格式调用 Claudeanthropic/claude-sonnet-5-5,api_base 设为 https://api.seedrise.ai(可选)

已于 2026-11-02 对照 LiteLLM 文档核对。

为什么把 Seedrise 接在 LiteLLM 后面

一个 api_base 调所有模型

Claude、GPT、Gemini、DeepSeek、Kimi 等共用一个 base URL 和一把 Key。每个模型在 model_list 里只占三行。

两层都有限额

开发者用 LiteLLM 虚拟 Key 和预算,底层再由 Seedrise Key 兜底:额度、模型白名单、IP 白名单和有效期。

一张账单,可选澳洲区域

控制台按 Key 和模型显示用量,每月一张美元或澳元账单。标注 AU 的模型可按需固定在悉尼或墨尔本。

五分钟接入

  1. 获取 Seedrise Key。 申请报价单,收到控制台账号后在控制台为你的 LiteLLM 部署创建一把 Key,开通它要调用的模型并设置月额度。
  2. 保存 Key。 在代理所在主机上把 Seedrise Key 导出为 SEEDRISE_API_KEY,同时设置 LiteLLM 自身用的 LITELLM_MASTER_KEY。LiteLLM 要求 master key 以 sk- 开头。
    bash
    export SEEDRISE_API_KEY="sk-..."      # your Seedrise key
    export LITELLM_MASTER_KEY="sk-..."    # admin key for your proxy
  3. 把模型写进 config.yaml。 每个 Seedrise 模型写作 openai/ 加模型 ID,api_base 设为 https://api.seedrise.ai/v1。model_name 是你的应用调用时用的名字。
    yaml
    model_list:
      - model_name: claude-sonnet-5-5
        litellm_params:
          model: openai/claude-sonnet-5-5
          api_base: https://api.seedrise.ai/v1
          api_key: os.environ/SEEDRISE_API_KEY
          timeout: 600
      - model_name: gpt-6.1-sol
        litellm_params:
          model: openai/gpt-6.1-sol
          api_base: https://api.seedrise.ai/v1
          api_key: os.environ/SEEDRISE_API_KEY
          timeout: 600
      - model_name: deepseek-v3.2
        litellm_params:
          model: openai/deepseek-v3.2
          api_base: https://api.seedrise.ai/v1
          api_key: os.environ/SEEDRISE_API_KEY
      - model_name: kimi-k2.5
        litellm_params:
          model: openai/kimi-k2.5
          api_base: https://api.seedrise.ai/v1
          api_key: os.environ/SEEDRISE_API_KEY
    
    general_settings:
      master_key: os.environ/LITELLM_MASTER_KEY
  4. 启动代理。 运行 litellm --config config.yaml。本页示例使用 4000 端口,与 LiteLLM 自己的文档一致。
    bash
    litellm --config config.yaml
  5. 发送测试请求。 用 master key 和配置里的某个 model_name 调用 http://localhost:4000/v1/chat/completions。
    bash
    curl http://localhost:4000/v1/chat/completions \
      -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Hello"}]}'

Python SDK,不经过代理

同样三项设置也可以直接用在 litellm.completion() 里。

python
import os
import litellm

response = litellm.completion(
    model="openai/claude-sonnet-5-5",
    api_base="https://api.seedrise.ai/v1",
    api_key=os.environ["SEEDRISE_API_KEY"],
    messages=[{"role": "user", "content": "Summarise this changelog in three bullets."}],
)
print(response.choices[0].message.content)

推荐先用的模型

上下文与输出上限截至 2026 年 11 月 1 日。Seedrise 全部模型及厂商公开标价见模型库。

模型litellm_params 中填写上下文窗口最大输出
Claude Sonnet 5.5openai/claude-sonnet-5-51,000,000128,000
Claude Opus 5.5openai/claude-opus-5-51,000,000128,000
GPT-6.1 Solopenai/gpt-6.1-sol1,050,000128,000
DeepSeek V3.2openai/deepseek-v3.2164,0008,000
Kimi K2.5openai/kimi-k2.5256,00016,000

通过 LiteLLM 的 Anthropic 路由使用 Claude

如果你依赖 Anthropic Messages 格式里的 Claude 功能,例如 cache_control 提示缓存,就用 anthropic/ 前缀加根 URL 路由 Claude。LiteLLM 会自动补上 /v1/messages。

yaml
model_list:
  - model_name: claude-sonnet-5-5
    litellm_params:
      model: anthropic/claude-sonnet-5-5
      api_base: https://api.seedrise.ai
      api_key: os.environ/SEEDRISE_API_KEY
      timeout: 600

注意事项

验证是否成功

bash
# models your proxy exposes
curl http://localhost:4000/v1/models -H "Authorization: Bearer $LITELLM_MASTER_KEY"

# models your Seedrise key can call
curl https://api.seedrise.ai/v1/models -H "Authorization: Bearer $SEEDRISE_API_KEY"

常见报错

状态码LiteLLM 异常含义处理方式
400BadRequestError请求格式错误,通常是模型 ID 写错或请求体不合法对照 GET /v1/models 检查模型 ID
401AuthenticationErrorKey 缺失、停用或过期到控制台检查 Key
403PermissionDeniedError该 Key 未开通此模型,或 IP 不在白名单调整 Key 的模型列表或白名单;记得加入代理的出口 IP
404NotFoundErrorapi_base 路径有误,或请求了 Seedrise 未提供的端点openai/ 模型的 api_base 以 /v1 结尾,并暂时避免调用 /v1/responses
429RateLimitError触发速率限制或额度用尽退避重试;在控制台调高或联系我们
5xxAPIError, ServiceUnavailableError上游或网关错误退避重试;网关会自动在路由间切换

仍未解决?发邮件到 support@seedrise.ai,附上响应头里的请求 ID、请求时间和模型 ID。

团队使用

团队共用一个代理,Seedrise Key 只放在服务器上,不放在个人电脑里。

LiteLLM 常见问题

接入 Seedrise 时 LiteLLM 用哪个 provider 前缀? +
用 openai/,api_base 设为 https://api.seedrise.ai/v1,你的 Key 上的所有模型都能调用。想用 Anthropic Messages 格式调用 Claude,也可以用 anthropic/,api_base 设为 https://api.seedrise.ai。
该写 openai/claude-sonnet-5-5 还是 claude-sonnet-5-5? +
两个都要写,位置不同。litellm_params.model 填 openai/claude-sonnet-5-5:LiteLLM 用前缀选择客户端,发往上游的是不带前缀的 ID。model_name 是你的应用调用时用的名字,直接用 Seedrise 的 ID 最省事。
LiteLLM 为什么返回 NotFoundError? +
通常是因为 api_base 少了 /v1,或者客户端调用了 Seedrise 暂不提供的 /v1/responses。先检查 base URL,再检查客户端用的端点。
通过 LiteLLM 能用提示缓存吗? +
Claude 请走 anthropic/ 路由。LiteLLM 会按 Anthropic Messages 格式原样传递 cache_control 块,缓存输入在账单上单独列出,按你报价单上的缓存读取价计费。详见套餐与价格。
推理能留在澳洲吗? +
可以。标注 AU 的模型(包括 Claude Opus、Sonnet、Haiku 5.5,DeepSeek V3.2 和 Kimi K2.5)可按需固定在悉尼或墨尔本。区域按 Key 设置,LiteLLM 配置无需改动。

准备好把 Seedrise 接到 LiteLLM 后面了吗?

1 个工作日内收到逐模型书面报价,然后是控制台账号和试用 Key。

获取报价单 →

另见:Cline 接入 · Claude Code 接入 · 完整文档 · 套餐与价格 · 安全与数据

Seedrise 是独立服务商,与 Anthropic 无关联,也未获 Anthropic 背书。Claude 是 Anthropic, PBC 的商标。