v1

latestSwagger 2.02026-08-04232286653.5 KB
LimitedUsageAPIKey

Create a new limited usage api key owned by the logged in user, of type specified by usage parameter.

A successful response from this resource will contain json-encoded details of the limited usage API key. This is the only time the customer will be able to view the api key associated with the API key id.

post/users/limited-usage-api-key

Query parameters

usage'inference' | 'observability' required

Request body

aliasstring
expires_atstring required
project_idstring

Optional project ID the token is scoped to

Example request

{
  "alias": "token1",
  "expires_at": "2021-12-03T19:58:34Z",
  "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Response

Example response

{
  "api_key_info": {
    "alias": "newAPIKey",
    "api_key": "R7p5XctCQMuGlpVBmVdqzA",
    "created_at": "2021-11-03T22:16:27Z",
    "expires_at": "2021-12-03T19:58:34Z",
    "key_id": "R7p5XctCQMuGlpVBmVdqzA",
    "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "usage": "inference"
  }
}