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

Me

Get User

get

Get information about the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful Response

application/json
objectconst: userInfoOptional

The user info object type.

Default: userInfo
idintegerRequired

The user ID.

emailstringRequired

The user email.

namestring · nullableOptional

The user name.

organizationinteger · nullableOptional

The user organization ID.

budgetnumber · nullableOptional

The user budget. If None, the user has unlimited budget.

expiresinteger · nullableOptional

The user expiration timestamp. If None, the user will never expire.

priorityintegerOptional

The user priority (higher = higher priority). This value influences scheduling/queue priority for non-streaming model invocations.

Default: 0
createdintegerRequired

The user creation timestamp.

updatedintegerRequired

The user update timestamp.

Other propertiesanyOptional
get/v1/me/info
GET /v1/me/info HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "object": "userInfo",
  "id": 1,
  "email": "text",
  "name": "text",
  "organization": 1,
  "budget": 1,
  "permissions": [
    "admin"
  ],
  "limits": [
    {
      "router_id": 1,
      "type": "tpm",
      "value": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "expires": 1,
  "priority": 0,
  "created": 1,
  "updated": 1,
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Update User

patch

Update information about the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

The user update request.

namestring · nullableOptional

The user name.

emailstring · max: 254 · nullableOptional

The user email.

current_passwordstring · max: 72 · nullableOptional

The current user password.

passwordstring · max: 72 · nullableOptional

The new user password. If None, the user password is not changed.

Other propertiesanyOptional
Responses
204

Successful Response

No content

patch/v1/me/info
PATCH /v1/me/info HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "name": "text",
  "email": "text",
  "current_password": "text",
  "password": "text",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

No content

Get Keys

get

Get all your tokens.

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

The offset of the tokens to get.

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

The limit of the tokens to get.

Default: 10
order_bystring · enumOptional

The field to order the tokens by.

Default: idPossible values:
order_directionstring · enumOptional

The direction to order the tokens by.

Default: ascPossible values:
Responses
200

Successful Response

application/json
objectconst: listOptionalDefault: list
Other propertiesanyOptional
get/v1/me/keys
GET /v1/me/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "list",
  "data": [
    {
      "object": "key",
      "id": 1,
      "name": "text",
      "token": "text",
      "expires": 1,
      "created": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Create Key

post

Create a new API key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

The token creation request.

namestringRequired
expiresinteger · nullableOptional

Timestamp in seconds

Other propertiesanyOptional
Responses
201

Successful Response

application/json
idintegerRequired
tokenstringRequired
Other propertiesanyOptional
post/v1/me/keys
POST /v1/me/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "name": "text",
  "expires": 1,
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
{
  "id": 1,
  "token": "text",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Key

get

Get your token by id.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keyintegerRequired

The key ID of the key to get.

Responses
200

Successful Response

application/json
objectconst: keyOptionalDefault: key
idintegerRequired
namestringRequired
tokenstringRequired
expiresinteger · nullableOptional
createdintegerRequired
Other propertiesanyOptional
get/v1/me/keys/{key}
GET /v1/me/keys/{key} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "key",
  "id": 1,
  "name": "text",
  "token": "text",
  "expires": 1,
  "created": 1,
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Delete Key

delete

Delete a API key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keyintegerRequired

The key ID of the key to delete.

Responses
204

Successful Response

No content

delete/v1/me/keys/{key}
DELETE /v1/me/keys/{key} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get Usage

get

Get usage for the current user.

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

The offset of the usages to get.

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

The limit of the usages to get.

Default: 10
start_timeinteger · nullableOptional

Start time as Unix timestamp (if not provided, will be set to 30 days ago)

end_timeinteger · nullableOptional

End time as Unix timestamp (if not provided, will be set to now)

endpointstring · enum · nullableOptional

The endpoint to get usage for.

Possible values:
Responses
200

Successful Response

application/json
objectconst: listOptional

Object type.

Default: list
Other propertiesanyOptional
get/v1/me/usage
GET /v1/me/usage HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "list",
  "data": [
    {
      "object": "me.usage",
      "model": "text",
      "key": "text",
      "endpoint": "text",
      "method": "text",
      "status": 1,
      "usage": {
        "prompt_tokens": 1,
        "completion_tokens": 1,
        "total_tokens": 1,
        "cost": 1,
        "impacts": {
          "kWh": 0,
          "kgCO2eq": 0,
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "metrics": {
          "latency": 1,
          "ttft": 1,
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "created": 1,
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Last updated

Was this helpful?