Skip to main content
POST
Create a new API key
This endpoint requires a management API key. Standard Gateway API keys are not accepted.
The plaintext API key is returned once at creation time. The compatibility fields limit, limit_reset, and include_byok_in_limit are accepted; Phaseo currently treats include_byok_in_limit as compatibility-only and always excludes BYOK from this key limit field.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
name
string
required
Minimum string length: 1
Example:

"Analytics Service Key"

workspace_id
string<uuid>

Optional workspace override for internal callers.

scopes
Example:

"[\"chat.completions\",\"responses\"]"

limit
number | null

Optional spend limit in USD for this key.

Required range: x >= 0
limit_reset
enum<string>

Period used for the spend limit window.

Available options:
daily,
weekly,
monthly
include_byok_in_limit
boolean

Accepted for compatibility. Current Phaseo behavior always excludes BYOK from this limit field.

expires_at
string<date-time> | null
disabled
boolean
default:false
soft_blocked
boolean
default:false

Response

API key created

data
object
required
Last modified on August 12, 2026