跳转到主要内容
GET
/
api
/
v1
/
transactions
curl https://api.arouter.ai/api/v1/transactions \
  -H "Authorization: Bearer lr_live_xxxx"
curl https://api.arouter.ai/api/v1/transactions \
  -H "Authorization: Bearer lr_live_xxxx"

响应

{
  "transactions": [
    {
      "id": "txn_xxx",
      "type": "usage",
      "amount": -0.0042,
      "description": "openai/gpt-5.4 - 500 input tokens, 200 output tokens",
      "created_at": "2026-04-03T10:00:00Z"
    },
    {
      "id": "txn_yyy",
      "type": "credit",
      "amount": 50.0,
      "description": "Credit purchase",
      "created_at": "2026-04-01T09:00:00Z"
    }
  ]
}
字段描述
id唯一交易 ID
type交易类型,如 usagecredit
amount信用购买为正值,使用费用为负值
description交易的人类可读描述
created_at交易记录时间的 RFC3339 时间戳

说明

  • 结果按从新到旧排序。
  • 使用费用反映规范化的 ARouter 核算,包括适用时的缓存 Token 和推理 Token。
  • 如需控制台导出以及按模型或 API key 分组,请参阅活动导出