GET
/
chat
/
transaction
/
{uuid}
查询对话账单
curl --request GET \
  --url https://geekai.co/api/chat/transaction/{uuid} \
  --header 'Authorization: Bearer <token>'
{
  "request_id": "<string>",
  "amount": 123,
  "tokens": 123,
  "input_tokens": 123,
  "output_tokens": 123,
  "cache_hit_tokens": 123,
  "cache_write_tokens": 123,
  "billed_units": 123,
  "times": 123,
  "event": "<string>",
  "channel": "<string>",
  "discount": 123
}
查询指定对话的账单明细信息,对话IDuuid可以通过对话接口响应数据中的id字段获取,对于画图、视频生成等场景,需要通过响应数据的task_id进行查询。 查询结果中的 amount 字段表示此次对话消耗的金币数,单位为金币,100金币=1元。
注意:调用此接口需要通过系统 KEY 进行认证。此外,由于账单是异步生成的,拿到对话/任务响应结果后可能需要等待一段时间才能查询到对应的账单信息,这个时间通常是1-3s左右。

Authorizations

Authorization
string
header
required

系统KEY

Path Parameters

uuid
string<uuid>
required

资源唯一标识符

Response

200
application/json

成功响应

The response is of type object.