Skip to main content
POST
/
v1
/
scoped-jwt
Create Scoped Jwt
curl --request POST \
  --url https://api.example.com/v1/scoped-jwt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_key_name": "<string>",
  "models": [
    "<string>"
  ],
  "expires_delta": 123,
  "expires_at": 123,
  "spending_limit": 123
}
'
{
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

xi-api-key
string | null

Body

application/json
api_key_name
string
required
models
string[] | null

allow inference only to the specified model names

expires_delta
integer | null

how many seconds in the future should the token be valid for

expires_at
integer | null

unix timestamp when the token should expire

spending_limit
number | null

only allow spending that much USD until the token becomes invalid

Response

Successful Response

token
string
required

The newly minted scoped JWT ready for use