Retrieve your API usage statistics. View token consumption, request counts, and billing information for your account.
Retrieve usage statistics with optional filtering and pagination.
{
"start_date": "string (optional, ISO 8601)",
"end_date": "string (optional, ISO 8601)",
"model": "string (optional, filter by model)",
"limit": "number (optional, default: 100)",
"offset": "number (optional, default: 0)"
}start_date: Filter usage from this date (ISO 8601 format)
end_date: Filter usage until this date (ISO 8601 format)
model: Filter by specific model identifier
limit: Maximum number of results to return (default: 100)
offset: Number of results to skip for pagination (default: 0)
curl -X GET https://api.nextcraftai.com/v1/uses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"{
"data": [
{
"id": "usage_123",
"date": "2024-01-15",
"model": "gemini-2.0-flash-exp",
"tokens": 15000,
"requests": 45,
"cost": 0.15
}
],
"total": {
"tokens": 15000,
"requests": 45,
"cost": 0.15
},
"pagination": {
"limit": 100,
"offset": 0,
"total": 1
}
}data: Array of usage entries with id, date, model, tokens, requests, and cost
total: Aggregated totals across all matching entries
pagination: Pagination metadata including limit, offset, and total count