POST
Create an admin API key

Authorizations

Authorization
string
header
required

Provide your API key in the Authorization header using Bearer auth

Body

application/json

Create an API key

name
string
required

Name

Maximum string length: 128
Example:

"prod-server"

credit_limit_usd
number

Spending limit (USD), unlimited if omitted; ignored for admin keys

Required range: x >= 0
Example:

50

expires_at
integer<int64>

Expiry time (Unix seconds); never expires if omitted

Response

OK

API key (project inference key or organization admin key); the plaintext is returned only on creation

id
string

Key ID (key_ prefix)

Example:

"key_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"

object
string

organization.project.api_key or organization.admin_api_key

Example:

"organization.project.api_key"

name
string

Name

redacted_value
string

Redacted key, e.g. sk-gi-AbCd…

Example:

"sk-gi-AbCd…"

value
string

Plaintext key, returned only on creation; store it safely

project_id
string

Project (null for admin keys)

status
string

Status: active / disabled / revoked

Example:

"active"

credit_limit_usd
number

Spending limit (USD); null means unlimited

used_usd
number

Amount used (USD)

created_at
integer<int64>

Creation time (Unix seconds)

last_used_at
integer<int64>

Last used time (Unix seconds)

expires_at
integer<int64>

Expiry time (Unix seconds); null means never