Skip to main content
GET
Introspect the calling key (whoami)

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Response

The calling key's identity and limits.

The identity the gateway resolved for the calling key, plus its enforced limits and credit posture. Returned by GET /v1/me.

object
string
Example:

"identity"

key_id
string

The calling key's id.

Example:

"key_7f3a0b12"

org_id
string
Example:

"org_abc123"

project_id
string
Example:

"proj_abc123"

env
enum<string>

Key environment. test keys run in the sandbox tier (daily unit cap, no credit gate).

Available options:
test,
live
status
enum<string>

Key status.

Available options:
active,
revoked
org_status
enum<string>

Owning org status; suspended explains a 403 org_suspended.

Available options:
active,
suspended
scopes
string[]

Granted scopes. A missing scope here explains a 403 insufficient_scope.

Example:
expires_at
integer | null

Key expiry (Unix ms); null = non-expiring.

plan
string

Billing plan id.

Example:

"payg"

limits
object

Per-key gateway limits (what the edge actually enforces).

credit
object

Prepaid-credit posture. Explains a 402 credit_exhausted.

key_budget_cents
integer | null

Per-key monthly spend cap (USD cents); null = no per-key budget. Hitting it is a 402 key_budget_exceeded.