Ga naar inhoud

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.

MethodePadWat het doetStand
GET/v1/accountOrganisatie en sleutel opvragenOp 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

StatusBetekenis
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).

Velden 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. Een van: api_key, personal_token, keycloak_token
  • key object
    Service-key metadata, null for a personal token. Never the secret. kan null zijn
  • personal_token object
    Personal-token metadata, null for a service key. Default token lifetime 90 days. kan null zijn
  • user object
    The approving user for PATs; null for service keys. No client-supplied identity. kan null zijn
  • 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
    Een van: key, organization
  • fair_use[].limit integer
    Null while the value is not set (TBD). min. 0 · kan null zijn
  • fair_use[].used integer
    min. 0
  • fair_use[].resets_at string (date-time)
  • rate_limit object
  • rate_limit.requests_per_minute integer
    min. 0 · kan null zijn
  • 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 · kan null zijn
  • 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 (binnenkort)
prudai leo account