ai
GET /v1/ai/summary
The organization's AI position — balance, funding route, usage.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione sites.view; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X GET https://api.zinndigital.com/v1/ai/summary \
-H "Authorization: Bearer zdk_live_…"Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Everything the AI page needs in one request: the Zinn® AI credit balance, which funding route the **next** call would take, the org's own provider keys, 30 days of metered usage and how many agent proposals are waiting. `funding_route` is derived from the same function the next call will use, never re-implemented — a screen that computes its own answer eventually tells a customer they are on their own key while we bill them. Requires `sites.view`.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id (query) | Uuid | No | Which organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it. Omitting it in a multi-org account is a `422` that says… |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
credit_balance_micros | integer | Sì | — |
credit_currency | string | Sì | The ledger's denomination. USD, with display converted per request off the cached FX rates — the same pattern `listExtras` uses, and for the same reason: every provider quotes u… |
funding_route | string<byo, credits, included, none, mixed> | Sì | Which route the NEXT call would take, for the organization as a whole. `none` means there is no way to fund one. `mixed` is the honest answer when the providers disagree, and it… |
funding_routes | AiProviderFunding[] | Sì | Who pays for the next call to each provider, and whether its key works. |
included_daily_micros | integer | Sì | — |
included_remaining_micros | integer | Sì | — |
credentials | AiCredential[] | Sì | — |
usage_30d | AiUsageLine[] | Sì | — |
open_proposals | integer | Sì | — |
site_builder | SiteBuilderTrial | Sì | The **one-time** free allowance for the AI site builder. One grant per organization, for ever — not monthly, and not per site. `granted` is true because the credit was actually… |
Errori che questo endpoint può restituire
401 · 403 · 422 · 429