For the complete documentation index, see llms.txt. This page is also available as Markdown.

Usage

Get Usages

get

Get daily usage buckets for the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetintegerOptional

Number of usage buckets to skip.

Default: 0
limitinteger · min: 1 · max: 100Optional

Maximum number of usage buckets to return.

Default: 10
start_timeintegerRequired

Start time as Unix timestamp.

end_timeintegerRequired

End time as Unix timestamp.

endpointstring · enum · nullableOptional

The endpoint to get usage for.

Possible values:
modelsstring[] · nullableOptional

Router names to filter usage by.

key_idinteger · nullableOptional

Key ID to filter usage by.

Responses
200

Successful Response

application/json
objectconst: listOptional

Type of the object.

Default: list
totalintegerRequired

Total number of usage buckets.

offsetintegerRequired

Offset of the usage buckets list.

limitintegerRequired

Limit of the usage buckets list.

Other propertiesanyOptional
get/v1/usage
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"
}
Deprecated

Get Usages

get

Get daily usage buckets for the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetintegerOptional

Number of usage buckets to skip.

Default: 0
limitinteger · min: 1 · max: 100Optional

Maximum number of usage buckets to return.

Default: 10
start_timeintegerRequired

Start time as Unix timestamp.

end_timeintegerRequired

End time as Unix timestamp.

endpointstring · enum · nullableOptional

The endpoint to get usage for.

Possible values:
modelsstring[] · nullableOptional

Router names to filter usage by.

key_idinteger · nullableOptional

Key ID to filter usage by.

Responses
200

Successful Response

application/json
objectconst: listOptional

Type of the object.

Default: list
totalintegerRequired

Total number of usage buckets.

offsetintegerRequired

Offset of the usage buckets list.

limitintegerRequired

Limit of the usage buckets list.

Other propertiesanyOptional
get/v1/me/usage
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?