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.
| Method | Path | What it does | State |
|---|---|---|---|
GET | /v1/account | The 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
| Status | Meaning |
|---|---|
200 | Principal and organisation status. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, 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). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
Fields in data (200)
object
accountauth_kind
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_tokenkey
Service-key metadata, null for a personal token. Never the secret. may benullpersonal_token
Personal-token metadata, null for a service key. Default token lifetime 90 days. may benulluser
The approving user for PATs; null for service keys. No client-supplied identity. may benullorganizationorganization.id
Public organisation id.organization.namefair_use
Fair-use limits of the free operations that apply to this key.fair_use[].limit_namefair_use[].scope
One of:key,organizationfair_use[].limit
Null while the value is not set (TBD). min 0 · may benullfair_use[].used
min 0fair_use[].resets_atrate_limitrate_limit.requests_per_minute
min 0 · may benullrate_limit.organization_requests_per_minute
Shared minute allowance across all keys in this organisation. min 1rate_limit.used
Admitted calls in this key’s current minute window, including this account request. min 0rate_limit.resets_at
When this key’s current minute window resets.rate_limit.organization_used
Admitted calls in the organisation’s shared minute window. min 0rate_limit.organization_resets_at
When the shared organisation minute window resets.rate_limit.concurrent_requests
min 0 · may benullcredits_available
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 -s "https://api.prudai.com/v1/account" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo account