文档

查询日用量

请求地址

https://api.xiaomimimo.com/v1/platform/usage/daily?start_date=2026-10-01&end_date=2026-10-02

请求头

接口支持以下两种认证方式,请选择其中一种添加到请求头中(本接口需使用普通 API Key sk-):

api-key: $MIMO_API_KEY

查询参数

参数 类型 必填 说明
start_date string 是 开始日期,UTC 自然日,格式 YYYY-MM-DD
end_date string 是 结束日期,UTC 自然日,格式 YYYY-MM-DD,与 start_date 的跨度不得超过 31 天

说明

  • 查询区间为闭区间,end_date 晚于今天时按已有数据返回。

  • 可查询的最早日期为 2026-09-01。区间与可查询范围无交集(end_date 早于起始日,或 start_date 晚于今天)时返回空列表,不报错。

  • 无分页,一次返回区间内全部记录。同一天内模型记录排在插件记录之前。

响应

  • objectstring
    对象类型。
    可选值:list
  • dataarray
    用量记录数组,元素为模型记录或插件记录。
    隐藏子属性
    data.datestring
    用量日期,格式 YYYY-MM-DD。
    data.resource_typestring
    记录类型。
    可选值:model(模型)、plugin(插件)
    data.namestring
    名称。模型记录为模型名,插件记录为插件名。
    data.masked_api_keystring
    产生该用量的 API Key(脱敏后的值)。
    data.currencystring
    币种。
    data.consumed_amountstring
    消费金额,6 位小数。
    data.request_countinteger
    请求次数。
    data.input_cache_hit_amountstring
    输入缓存命中金额,6 位小数。仅模型记录返回。
    data.input_cache_miss_amountstring
    输入缓存未命中金额,6 位小数。仅模型记录返回。
    data.output_amountstring
    输出金额,6 位小数。仅模型记录返回。
    data.total_tokensinteger
    总 Token 数。仅模型记录返回。
    data.input_cache_hit_tokensinteger
    输入缓存命中 Token 数。仅模型记录返回。
    data.input_cache_miss_tokensinteger
    输入缓存未命中 Token 数。仅模型记录返回。
    data.output_tokensinteger
    输出 Token 数。仅模型记录返回。
    data.audio_transcription_secondsinteger
    音频转写秒数,无音频转写时为 null。仅模型记录返回。
    data.inference_typestring
    推理类型。仅模型记录返回。
    可选值:online(在线)、batch(批量)

接口返回金额口径说明

用量消费金额(折后消费金额)

  • 含义:推理请求产生、扣除折扣优惠后、抵扣赠金之前的应付消耗金额。

  • 计算公式:折后消费金额 = 原始金额 − 折扣减免金额

  • 备注:本接口仅返回折后消费金额,不返回原始金额、折扣减免、赠金核销相关数据;以上信息请通过日账单接口查询。

curl --location --request GET 'https://api.xiaomimimo.com/v1/platform/usage/daily?start_date=2026-11-02&end_date=2026-11-02' \
--header 'Authorization: Bearer $MIMO_API_KEY'
响应
{
  "object": "list",
  "data": [
    {
      "date": "2026-10-02",
      "resource_type": "model",
      "name": "mimo-v2.6-pro",
      "masked_api_key": "sk-****abcd",
      "currency": "CNY",
      "consumed_amount": "0.012345",
      "input_cache_hit_amount": "0.001000",
      "input_cache_miss_amount": "0.003000",
      "output_amount": "0.008345",
      "total_tokens": 1000,
      "input_cache_hit_tokens": 400,
      "input_cache_miss_tokens": 300,
      "output_tokens": 300,
      "request_count": 2,
      "audio_transcription_seconds": null,
      "inference_type": "online"
    },
    {
      "date": "2026-10-02",
      "resource_type": "plugin",
      "name": "web-search",
      "masked_api_key": "sk-****abcd",
      "currency": "CNY",
      "consumed_amount": "0.000500",
      "request_count": 1
    }
  ]
}
更新时间 2026 年 11 月 03 日

Copyright©2026 Xiaomi. All Rights Reserved | Cookie Policy | Cookie Preferences

We use cookies and similar technologies of our own to ensure the proper functioning of the website, customize content according to user preferences and analyze users' interactions on the website, as well as their browsing habits. You can find more information in our Cookie Policy. Select an option or go to Cookie Settings to manage your preferences. Learn More.