OriginTensorDOCS
返回主站 创建 API Key
生产实践 · API v1

模型目录与计费

读取公开定价 JSON,理解每 1M tokens 单价、缓存价格、图像分档与成本估算。

OpenAI 兼容Anthropic 原生更新于 2026-12-05
管理 API Key

Catalog

三个数据来源

来源用途鉴权
公开定价页人工查看模型、说明与价格。否
https://origintensor.com/api/pricing机器可读的公开模型与价格投影。否
GET https://api.origintensor.com/v1/models当前令牌可请求的模型列表。是

api.origintensor.com/api/pricing 与主站的公开定价 JSON 不是同一个服务。公开目录请使用 origintensor.com/api/pricing。

Pricing JSON

公开定价结构

Public pricing sample
{
  "success": true,
  "generated_at": 1796480846,
  "count": 293,
  "data": [
    {
      "model_name": "glm-5.3",
      "kind": "text",
      "usd": {"in": 0.99, "out": 1.815, "cache": 0.33},
      "added_at": 1786665600
    }
  ]
}

上面的数值仅用于说明字段结构。价格与目录会变化,请以实时接口为准。

Units

文本价格单位

文本模型的 usd.in、usd.out 与 usd.cache 表示每 1M tokens 的美元价格,分别对应非缓存输入、输出与缓存读取。

Cost estimation
def estimate_text_cost_usd(prompt_tokens, completion_tokens, cached_tokens, price):
    billable_input = max(0, prompt_tokens - cached_tokens)
    return (
        billable_input * price["in"]
        + cached_tokens * price["cache"]
        + completion_tokens * price["out"]
    ) / 1_000_000

price = {"in": 0.99, "out": 1.815, "cache": 0.33}
print(estimate_text_cost_usd(4200, 320, 4000, price))

这是估算,不是账单。实际计费还可能受到模型倍率、渠道配置、思考 token、缓存写入与上游用量上报影响。最终以账户账单和用量明细为准。

Image pricing

图像分档价格

Tiered image price
{
  "model_name": "moxie-diffusion-xl",
  "kind": "image",
  "unit": "image",
  "tiers": [
    {"size": "512x512", "usd": 0.0068},
    {"size": "1024x1024", "usd": 0.0102},
    {"size": "2048x2048", "usd": 0.0136}
  ]
}

图像价格按张或尺寸档位计算。不同模型可能支持不同尺寸集合,默认档位也不一定等于你的业务最优档位。

Cost controls

成本控制清单

  • 为每次请求记录模型、输入/输出/缓存 token 与估算费用。
  • 对长上下文、推理模式和图像尺寸设置预算上限。
  • 定期对比模型质量、TTFT、TPS 与单任务成本,而不只看 token 单价。
  • 使用稳定前缀提升缓存命中率,但避免缓存过期知识。
  • 对异常高消耗请求设置告警与熔断。
输入 API 名称、参数、错误码或场景,例如「stream」「429」「Anthropic」「缓存」。