Skip to main content
POST
Mint a short-lived, gateway-only API key bound to an agent

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Path Parameters

agent_id
string
required

The agent record id (agents.id) to bind the key to.

Query Parameters

org_id
string

Target organization (defaults to the caller's primary org).

Body

application/json
session_id
string

The gateway conversation/session id to bind the key to, if known at mint time.

Response

The minted key. key is the cleartext secret — returned once, never again.

key_id
string
required
key
string
required

The cleartext key — shown once.

key_prefix
string
required
scopes
enum<string>[]
required

Always exactly ['gateway'].

Available options:
gateway
kind
enum<string>
required
Available options:
session
agent_id
string
required
session_id
string | null
required
expires_at
string<date-time>
required
created_at
string<date-time>
required