提供商集成

对于提供商

如果您想成为模型提供商并在 OpenRoute 上销售推理服务,请填写我们的表单开始。

要在 OpenRoute 上提供推理服务,您必须满足以下条件:

模型列表端点

您必须实现一个端点,返回应由 OpenRoute 提供的所有模型。在此端点,请返回您平台上所有可用模型的列表。以下是响应格式的示例:

{
  "data": [
    {
      // Required
      "id": "anthropic/claude-sonnet-4",
      "name": "Anthropic: Claude Sonnet 4",
      "created": 1690502400,
      "input_modalities": ["text", "image", "file"],
      "output_modalities": ["text", "image", "file"],
      "quantization": "fp8",
      "context_length": 1000000,
      "max_output_length": 128000,
      "pricing": {
        "prompt": "0.000008", // pricing per 1 token
        "completion": "0.000024", // pricing per 1 token
        "image": "0", // pricing per 1 image
        "request": "0", // pricing per 1 request
        "input_cache_reads": "0", // pricing per 1 token
        "input_cache_writes": "0" // pricing per 1 token
      },
      "supported_sampling_parameters": ["temperature", "stop"],
      "supported_features": [
        "tools",
        "json_mode",
        "structured_outputs",
        "web_search",
        "reasoning"
      ],
      // Optional
      "description": "Anthropic's flagship model...",
      "openroute": {
        "slug": "anthropic/claude-sonnet-4"
      },
      "datacenters": [
        {
          "country_code": "US" // `Iso3166Alpha2Code`
        }
      ]
    }
  ]
}

注意:pricing 字段采用字符串格式以避免浮点精度问题,并且必须以美元为单位。

有效的量化值包括:int4、int8、fp4、fp6、fp8、fp16、bf16、fp32。

有效的采样参数包括:temperature、top_p、top_k、repetition_penalty、frequency_penalty、presence_penalty、stop、seed。

有效的功能包括:tools、json_mode、structured_outputs、web_search、reasoning。

自动充值或发票

为了让 OpenRoute 使用提供商,我们必须能够自动支付推理费用。这可以通过自动充值或发票来实现。

正常运行时间监控和流量路由

OpenRoute 自动监控提供商可靠性,并根据正常运行时间指标调整流量路由。您的端点正常运行时间计算为:成功请求 ÷ 总请求(不包括用户错误)。

影响正常运行时间的错误:

  • 认证问题 (401)
  • 支付失败 (402)
  • 模型未找到 (404)
  • 所有服务器错误 (500+)
  • 中流错误
  • 以错误完成原因结束的成功请求

不影响正常运行时间的错误:

  • 错误请求 (400) - 用户输入错误
  • 负载过大 (413) - 用户输入错误
  • 速率限制 (429) - 单独跟踪
  • 地理限制 (403) - 单独跟踪

流量路由阈值:

  • 最少数据:正常运行时间计算开始前需要 100+ 请求
  • 正常路由:95%+ 正常运行时间
  • 降级状态:80-94% 正常运行时间 → 接收较低优先级
  • 停机状态:<80% 正常运行时间 → 仅用作备用

此系统确保流量自动流向最可靠的提供商,同时给临时问题时间来解决。

On this page