Get API Key

GET /api/v1/gateway/keys/{key_id}

Returns one key's full configuration (the full key string is never included).

Auth: this endpoint belongs to the console backend API (base URL https://portal.aiin1.ai — note, not api.portal.aiin1.ai). It requires an access_token obtained by logging in with a console account (valid 15 minutes); the sk-nex- API token does not work here. See Billing Reconciliation & Automated Usage Sync for the login flow.

Request parameters

Param In Type Required Description
key_id path string(uuid) yes Key ID

Example

curl -X GET https://portal.aiin1.ai/api/v1/gateway/keys/KEY_ID \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response

Field Type Required Description
id string(uuid) yes Key ID
org_id string(uuid) yes Organization ID
team_id string | null no Owning team ID
name string yes Key name
key string | null no Full key, returned only once at creation / rotation
key_prefix string yes Key prefix (for display)
models_allowed array<string> yes Allowed model list (empty = unrestricted)
rpm_limit integer yes Requests-per-minute limit
tpm_limit integer yes Tokens-per-minute limit
is_sandbox boolean yes Whether this is a sandbox key
allowed_ips array | null no IP allowlist (null = unrestricted)
spending_limit_usd string | null no Total spending cap (USD), null = unlimited
expires_at string | null no Expiry time
rotate_grace_until string | null no Grace-period end for the old key after rotation
status string yes Status
created_at string(datetime) yes Created at