API 키 사용량 조회
Management key required. 삭제된 키를 포함하여 요청 수와 정산된 USD 비용을 조회합니다.
URL의 api_key_id는 모델 API 키 생성(POST /public/v1/api-keys) 응답의 id이며, 형식은 ak_...입니다. 비활성화, 삭제, 한도 설정, 사용량 조회에 필요하므로 저장하세요. 응답의 key(apikey-...)는 모델 호출용이며, 관리 호출의 인증 헤더에는 계속 mgmt-...를 사용합니다.
Management key required. Use a Management API Key (mgmt-...) for your Team, created by a Team Owner. Requests use the Team associated with that key.
Includes disabled, expired and deleted keys and keys in archived projects. Only API-key-based sources are counted; a user with the same internal ID is excluded. See ResourceUsage for accounting semantics. Unknown or repeated query parameters are rejected.
Authorization
ManagementKeyBearer Management key required. Send Authorization: Bearer mgmt-....
In: header
Path Parameters
The id returned by Create a model API key (POST /public/v1/api-keys). Copy the complete ak_... value into this path parameter. Use the mgmt-... management key in the authorization header; the returned key (apikey-...) is for model calls.
^ak_[0-9A-Za-z]{22}$Query Parameters
Inclusive RFC 3339 start after the Unix epoch, aligned to a UTC hour boundary. Maximum window is 31 days.
date-timeExclusive RFC 3339 end, aligned to a UTC hour boundary and strictly after from.
date-timeResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/public/v1/api-keys/ak_0123456789ABCDEFGHIJKL/usage?from=2026-11-01T00%3A00%3A00Z&to=2026-11-02T00%3A00%3A00Z"{ "object": "api_key_usage", "api_key_id": "ak_0123456789ABCDEFGHIJKL", "from": "2026-11-01T00:00:00Z", "to": "2026-11-02T00:00:00Z", "requests": 12, "successes": 10, "failures": 2, "amount": { "value": "1.230000", "currency": "usd" }, "request_id": "req_example"}Last updated on