文档

查询日账单

请求地址

https://api.xiaomimimo.com/v1/platform/billing/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。区间与可查询范围无交集时返回空列表,不报错。

  • 无分页,一次返回区间内全部记录。结果按日期倒序,同一天按币种排序。

  • 汇总范围为 API 调用消费与赠金核销。

响应

  • objectstring
    对象类型。
    可选值:list
  • dataarray
    日账单记录数组。
    隐藏子属性
    data.datestring
    账单日期,格式 YYYY-MM-DD。
    data.currencystring
    币种。
    data.original_amountstring
    原始金额(原价),2 位小数。
    data.discount_amountstring
    折扣减免金额 = 原始金额 - 折后金额,2 位小数。
    data.gift_amountstring
    赠金抵扣金额,2 位小数。
    data.final_paid_amountstring
    实付金额 = 折后金额 - 赠金抵扣,2 位小数。

金额口径定义

  • 原始金额:按照公开标准单价 × Token 用量计算,未扣除任何折扣,仅作为基准参考。

  • 折扣减免金额:用户享受的定价优惠额度。

  • 折后消费金额(用量消费金额) :原始金额 − 折扣减免金额;为扣除折扣后、抵扣赠金之前的应付金额,也是用量接口返回的消费金额,对账基准项。

  • 赠金核销金额:使用赠金抵扣的金额,属于支付环节抵扣,不属于定价折扣。

  • 最终实付金额:折后消费金额 − 赠金核销金额,用户实际现金支出。

计算公式:

  • 折后消费金额 = 原始金额 − 折扣减免金额

  • 最终实付金额 = 折后消费金额 − 赠金核销金额

curl --location --request GET 'https://api.xiaomimimo.com/v1/platform/billing/daily?start_date=2026-10-31&end_date=2026-11-01' \
--header 'Authorization: Bearer $MIMO_API_KEY'
响应
{
  "object": "list",
  "data": [
    {
      "date": "2026-10-02",
      "currency": "CNY",
      "original_amount": "10.01",
      "discount_amount": "0.00",
      "gift_amount": "0.00",
      "final_paid_amount": "10.01"
    },
    {
      "date": "2026-10-01",
      "currency": "CNY",
      "original_amount": "5.00",
      "discount_amount": "0.50",
      "gift_amount": "1.00",
      "final_paid_amount": "3.50"
    }
  ]
}
更新时间 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.