Identity

Introspect the calling key (whoami)

Return the identity the gateway resolved for your key: key_id, org_id, project_id, environment (test/live), status, the granted scopes, and the rate-limit/credit posture. Any active key may call it (no special scope), so it is the fastest way to self-diagnose a 403 insufficient_scope (check scopes), a 402 credit_exhausted/key_budget_exceeded (check credit and key_budget_cents), or an org_suspended (org_status).

get/v1/me

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/me
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Response

The calling key's identity and limits.

objectstring
key_idstring

The calling key's id.

org_idstring
project_idstring
env'test' | 'live'

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

status'active' | 'revoked'

Key status.

org_status'active' | 'suspended'

Owning org status; suspended explains a 403 org_suspended.

scopesstring[]

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

expires_atinteger nullable

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

planstring

Billing plan id.

key_budget_centsinteger nullable

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

Example response

{
  "object": "identity",
  "key_id": "key_7f3a0b12",
  "org_id": "org_abc123",
  "project_id": "proj_abc123",
  "scopes": [
    "speak:synthesize",
    "hear:transcribe"
  ],
  "plan": "payg"
}

Changes

No recorded changes to this operation across all 1 revision of this API.