Skip to main content
POST
Create Scoped Jwt
When called with an API key, the key needs the account_scoped_jwt scope (about scopes).

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
x-api-key
string | null

Body

application/json
api_key_name
string | null

name of the api key that signs the token; defaults to the api key making the call. Deprecated when calling with an api key: omit it to sign with that key

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

Required range: 0 < x <= 32054400
expires_at
integer | null

unix timestamp when the token should expire; must be in the future and at most 32054400 seconds from now

spending_limit
number | null

only allow spending that much USD until the token becomes invalid

Required range: x > 0

Response

Successful Response

token
string
required

The newly minted scoped JWT ready for use