API reference / Account
Usage history
Your recent API calls: which route, when, how long it took and whether it succeeded.
GET
/v1/usage- Authentication
- Bearer token
- Scope
- Any valid key
Before you integrate
- This reply is not wrapped in the usual request_id and result envelope; the fields are at the top level.
- The list holds your recent calls, not necessarily your whole history.
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X GET 'https://grappi.ai/v1/usage' \ -H "Authorization: Bearer $GRAPPI_API_KEY"
Sample response
{
"tenant_id": "ten_0123456789abcdef0123456789abcdef",
"total_calls": 2,
"events": [
{
"id": "evt_0123456789abcdef0123456789abcdef",
"tenant_id": "ten_0123456789abcdef0123456789abcdef",
"api": "POST /v1/verify/passport",
"units": 1,
"latency_ms": 412,
"success": true,
"at": "2026-11-01T09:30:00.000Z"
},
{
"id": "evt_fedcba9876543210fedcba9876543210",
"tenant_id": "ten_0123456789abcdef0123456789abcdef",
"api": "POST /v1/vehicle/dl",
"units": 1,
"latency_ms": 380,
"success": true,
"at": "2026-11-01T09:31:12.000Z"
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
tenant_id | string | Your account id. |
total_calls | integer | Number of usage records returned. |
events | array | One record per logged call. |
events[].id | string | Usage record id. |
events[].tenant_id | string | Your account id. |
events[].api | string | The route that was called, for example POST /v1/verify/passport. |
events[].units | integer | Units used; 1 per call, or the number of minutes for a voice call. |
events[].latency_ms | integer | How long the call took, in milliseconds. |
events[].success | boolean | Whether the call succeeded. |
events[].at | string | When the call was recorded, as an ISO 8601 UTC time. |
Errors
Every failure has the same shape. A call that fails on our side or at the data source is refunded to your wallet; a "no record found" answer is charged. See the error reference.