Skip to content

Prudai Developer API: account

The organisation and the key the call runs as.

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/accountThe calling principal, organisation and limit status (phase 1)In production

The calling principal, organisation and limit status (phase 1)

GET /v1/account

Planned for phase 1. Free and not booked. Service keys require account:organizations:read; personal tokens use the user’s current app account-read rights. Returns non-secret credential metadata, the organisation, and current fair-use and rate-limit status. key is null for personal tokens; personal_token and user are null for service keys. A personal token acts on /v1 only when its products contain prudai (otherwise 403 insufficient_scope), and only while its user is still a member of the organisation (403 membership_required). Its rights follow the user’s current role: every member gets the sources_read and chat bundles plus account:organizations:read; account:usage:read and account:credits:read need a current Owner or Admin role.

  • State: in production.
  • Scope: account:organizations:read
  • Approval: none, no extra step.

Responses

StatusMeaning
200Principal and organisation status.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • object string
    account
  • auth_kind string
    Exchanged Keycloak tokens have null key metadata. The bearer credential kind; personal tokens use current user permissions, service keys use scopes. One of: api_key, personal_token, keycloak_token
  • key object
    Service-key metadata, null for a personal token. Never the secret. may be null
  • personal_token object
    Personal-token metadata, null for a service key. Default token lifetime 90 days. may be null
  • user object
    The approving user for PATs; null for service keys. No client-supplied identity. may be null
  • organization object
  • organization.id string
    Public organisation id.
  • organization.name string
  • fair_use array<object>
    Fair-use limits of the free operations that apply to this key.
  • fair_use[].limit_name string
  • fair_use[].scope string
    One of: key, organization
  • fair_use[].limit integer
    Null while the value is not set (TBD). min 0 · may be null
  • fair_use[].used integer
    min 0
  • fair_use[].resets_at string (date-time)
  • rate_limit object
  • rate_limit.requests_per_minute integer
    min 0 · may be null
  • rate_limit.organization_requests_per_minute integer
    Shared minute allowance across all keys in this organisation. min 1
  • rate_limit.used integer
    Admitted calls in this key’s current minute window, including this account request. min 0
  • rate_limit.resets_at string (date-time)
    When this key’s current minute window resets.
  • rate_limit.organization_used integer
    Admitted calls in the organisation’s shared minute window. min 0
  • rate_limit.organization_resets_at string (date-time)
    When the shared organisation minute window resets.
  • rate_limit.concurrent_requests integer
    min 0 · may be null
  • credits_available number
    Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.
curl
curl -s "https://api.prudai.com/v1/account" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo account