Prudai Developer API: account
De organisatie en de sleutel waarmee de aanroep draait.
Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.
| Methode | Pad | Wat het doet | Stand |
|---|---|---|---|
GET | /v1/account | Organisatie en sleutel opvragen | Op productie |
Organisatie en sleutel opvragen
GET /v1/account
The calling principal, organisation and limit status (phase 1).
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.
- Stand: op productie.
- Scope:
account:organizations:read - Goedkeuring:
none, geen extra stap.
Antwoorden
| Status | Betekenis |
|---|---|
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). |
Velden 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. Een van:api_key,personal_token,keycloak_tokenkey
Service-key metadata, null for a personal token. Never the secret. kannullzijnpersonal_token
Personal-token metadata, null for a service key. Default token lifetime 90 days. kannullzijnuser
The approving user for PATs; null for service keys. No client-supplied identity. kannullzijnorganizationorganization.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
Een van:key,organizationfair_use[].limit
Null while the value is not set (TBD). min. 0 · kannullzijnfair_use[].used
min. 0fair_use[].resets_atrate_limitrate_limit.requests_per_minute
min. 0 · kannullzijnrate_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 · kannullzijncredits_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