Skip to main content
POST
cURL
This endpoint is experimental. Baseten can change or remove it without notice.
Related guide: Create a sandbox access token.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json
scopes
enum<string>[]
required

What the token should grant access to. Only sandboxes is supported today; the token then authenticates against the sandbox API.

Minimum array length: 1

What a token minted by POST /v1/token grants access to.

Available options:
sandboxes
Example:

Response

200 - application/json
token
string
required

Short-lived bearer token for the sandbox API. Send it as Authorization: Bearer .

expires_at
string<date-time>
required

Token expiry in ISO 8601 format. Tokens cannot be renewed; request a new one.