Skip to main content
POST
/
v1
/
keys
Create a virtual key with a budget
curl --request POST \
  --url https://api.example.com/v1/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "CI pipeline key",
  "budgetUsd": 50,
  "rpmLimit": 60,
  "tpmLimit": 100000,
  "ownerId": {},
  "teamId": {}
}
'

Authorizations

Authorization
string
header
required

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

Body

application/json
label
string
required
Example:

"CI pipeline key"

keyClass
enum<string>
required
Available options:
interactive,
ci
budgetUsd
number
required

Monthly budget in USD

Example:

50

rpmLimit
object | null

Max requests per minute. null or 0 = unlimited.

Example:

60

tpmLimit
object | null

Max tokens per minute. null or 0 = unlimited.

Example:

100000

ownerId
object | null

User who owns/uses this key. Must belong to the caller’s tenant. Omitted or null = ownerless (CI/service key).

teamId
object | null

Cost-center team this key bills to. Must belong to the caller’s tenant. When omitted and ownerId is set, defaults to that owner’s current team. Explicit null = unassigned (no team).

Response

201

Key created — rawKey shown once