Me
Successful Response
The user info object type.
userInfoThe user ID.
The user email.
The user name.
The user organization ID.
The user budget. If None, the user has unlimited budget.
The user expiration timestamp. If None, the user will never expire.
The user priority (higher = higher priority). This value influences scheduling/queue priority for non-streaming model invocations.
0The user creation timestamp.
The user update timestamp.
GET /v1/me/info HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
}The user update request.
The user name.
The user email.
The current user password.
The new user password. If None, the user password is not changed.
Successful Response
No content
Validation Error
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
The offset of the tokens to get.
0The limit of the tokens to get.
10The field to order the tokens by.
idPossible values: The direction to order the tokens by.
ascPossible values: Successful Response
listValidation Error
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"
}The token creation request.
Timestamp in seconds
Successful Response
Validation Error
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"
}The key ID of the key to get.
Successful Response
keyValidation Error
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"
}The key ID of the key to delete.
Successful Response
No content
Validation Error
DELETE /v1/me/keys/{key} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The offset of the usages to get.
0The limit of the usages to get.
10Start time as Unix timestamp (if not provided, will be set to 30 days ago)
End time as Unix timestamp (if not provided, will be set to now)
The endpoint to get usage for.
Successful Response
Object type.
listValidation Error
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?