价格目录 API

价格目录 API

GET /x-pricing

返回某个租户的完整价格目录。价格表本身是公开数据,可匿名访问;携带 API Key 时返回该账号的最终价格。

请求

方式目录所属租户倍率
携带 Authorization: Bearer <key>该账号所属租户账号的 Rates × Factor
匿名,?oid=<租户 ID>(或 ?owner=)指定租户1
匿名,无参数租户 1(root)1
# 公开目录
curl "$XSI_BASE_URL/x-pricing"

# 当前账号的最终价格
curl "$XSI_BASE_URL/x-pricing" -H "Authorization: Bearer $XSI_API_KEY"
  • 携带了 Authorization 但 Key 无效时直接返回 401,不会退回公开目录。
  • 只接受 GET;OPTIONS 返回 204;其他方法返回 405 method not allowed。
  • 响应带 Cache-Control: no-cache。

响应

{
  "object": "pricing_catalog",
  "oid": 1,
  "public": false,
  "currency": "CNY",
  "unit_notes": {
    "per_1m_tokens": "Token prices are displayed per 1M tokens.",
    "per_minute": "Voice duration is displayed per minute and billed per second.",
    "per_image": "Image size prices are displayed per generated image.",
    "per_second": "Video resolution prices are displayed per generated second.",
    "per_call": "Call prices are displayed per request."
  },
  "generated_at": "2026-11-19T00:00:00Z",
  "user": {"id": 42, "oid": 1, "rates": 1, "factor": 1, "multiplier": 1},
  "data": [
    {
      "id": "gpt-6.2-sol",
      "category": "ChatPricing",
      "kind": "chat",
      "unit": "per_1m_tokens",
      "base": {"InputText": 2, "CachedText": 0.1, "CacheWrite": 2.5, "OutputText": 10, "FastTokenMultiplier": 2, "Rates": 7},
      "effective": {"InputText": 2, "CachedText": 0.1, "CacheWrite": 2.5, "OutputText": 10, "FastTokenMultiplier": 2, "Rates": 7},
      "final": {"InputText": 14, "CachedText": 0.7, "CacheWrite": 17.5, "OutputText": 70, "FastTokenMultiplier": 2},
      "rates": {"model": 7, "user": 1, "factor": 1, "effective": 7},
      "override": false,
      "custom": false
    }
  ]
}
字段说明
user仅携带 Key 时出现
data[].category、kind价格表分类:ChatPricing/chat、ImgPricing/image、VideoPricing/video、AudioPricing/audio、RerankPricing/rerank、CallPricing/call、FineTuningPricing/fine_tuning
data[].unitper_1m_tokens、per_image、per_second、per_minute、per_call
base系统默认价格(服务商原币种原价)
effective叠加租户 PRICING 覆盖后的价格(原价)
final人民币最终价,按字段换算:价格字段 × 模型 Rates(长上下文档位可有自己的 Rates)× 账号 Rates × Factor;对话、微调与 Rerank 的 Call 只乘账号倍率;InputThreshold、FastTokenMultiplier 保留原值;不含 Rates 字段
rates模型倍率、账号倍率、价格系数及其乘积
override是否与系统默认不同
custom是否为租户新增的模型

final 中的 Token 单价尚未应用快速档位(fast/ultrafast)倍率。每次请求的扣费方式见《计费与价格》。

相关文档