图像(Images)原生OpenAI格式
查询同步生图请求扣费
通过 request_id 查询一次同步生图请求(/v1/images/generations)的实际扣费金额。
request_id 来源:调用同步生图接口后,从响应头 X-Oneapi-Request-Id 获取。
账单记录在请求完成后异步落库,建议延迟 1–2 秒再调用本接口,避免记录尚未写入。
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
request_id*string
请求 ID,从同步接口响应头 X-Oneapi-Request-Id 获取
Response Body
application/json
application/json
curl -X GET "https://loading/v1/requests/string"{
"code": "success",
"data": {
"request_id": "202607230903305897000BWuRdDUMM8oRJWK4",
"model": "doubao-seedream-5-0-260128",
"amount": "0.235790",
"prompt_tokens": 1,
"completion_tokens": 16384,
"total_tokens": 16385,
"use_time": 36,
"created_at": 1784797446
}
}{
"code": "not_found",
"message": "billing record not found"
}Last updated on