Usage
Get daily usage buckets for the current user.
Number of usage buckets to skip.
0Maximum number of usage buckets to return.
10Start time as Unix timestamp.
End time as Unix timestamp.
The endpoint to get usage for.
Router names to filter usage by.
Key ID to filter usage by.
Successful Response
Type of the object.
listTotal number of usage buckets.
Offset of the usage buckets list.
Limit of the usage buckets list.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Validation Error
GET /v1/usage?start_time=1&end_time=1 HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"total": 1,
"offset": 1,
"limit": 1,
"data": [
{
"object": "usage.bucket",
"start_time": 1,
"end_time": 1,
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"cost": 1,
"requests": 1,
"impacts": {
"kWh": 0,
"kgCO2eq": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}Get daily usage buckets for the current user.
Number of usage buckets to skip.
0Maximum number of usage buckets to return.
10Start time as Unix timestamp.
End time as Unix timestamp.
The endpoint to get usage for.
Router names to filter usage by.
Key ID to filter usage by.
Successful Response
Type of the object.
listTotal number of usage buckets.
Offset of the usage buckets list.
Limit of the usage buckets list.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Validation Error
GET /v1/me/usage?start_time=1&end_time=1 HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"total": 1,
"offset": 1,
"limit": 1,
"data": [
{
"object": "usage.bucket",
"start_time": 1,
"end_time": 1,
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"cost": 1,
"requests": 1,
"impacts": {
"kWh": 0,
"kgCO2eq": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}Last updated
Was this helpful?