Skip to main content
GET
/
v1
/
me
Introspect the calling key (whoami)
curl --request GET \
  --url https://api.pyai.com/v1/me \
  --header 'Authorization: Bearer <token>'
{
  "object": "identity",
  "key_id": "key_7f3a0b12",
  "org_id": "org_abc123",
  "project_id": "proj_abc123",
  "scopes": [
    "voice:synthesize",
    "hear:transcribe"
  ],
  "expires_at": 123,
  "plan": "payg",
  "limits": {
    "rps": 123,
    "burst": 123,
    "concurrency": 123,
    "monthly_units": 123,
    "daily_unit_cap": 123
  },
  "credit": {
    "gated": true,
    "available_cents": 123
  },
  "key_budget_cents": 123
}

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:
["voice:synthesize", "hear:transcribe"]
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.