GET /api/v1/usage
Returns your organization's current credit balance and recent API usage history. Useful for monitoring spend and debugging.
Query Parameters
limitintegerNumber of usage records to return (1–100). Defaults to 10.
afterstringISO 8601 date string. Only return records after this timestamp (e.g. 2026-04-01T00:00:00Z).
Example Request
cURL
curl https://terramind.com/api/v1/usage?limit=5 \
-H "Authorization: Bearer sk-tm-YOUR_KEY"Response
JSON response
{
"credits": {
"balance": 45230.5
},
"recentUsage": [
{
"id": "abc123",
"creditsUsed": 0.0023,
"usageType": "model",
"details": {
"modelName": "claude-sonnet-4-6",
"inputTokens": 42,
"outputTokens": 128,
"totalTokens": 170
},
"timestamp": "2026-04-14T10:30:00.000Z"
}
]
}Only API usage records are returned (source: "api"). The response includes a Cache-Control: no-store header since the credit balance changes in real time.