ai
GET /v1/ai/summary
The organization's AI position — balance, funding route, usage.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění sites.view; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X GET https://api.zinndigital.com/v1/ai/summary \
-H "Authorization: Bearer zdk_live_…"Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id (query) | Uuid | Ne | 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… |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
credit_balance_micros | integer | Ano | — |
credit_currency | string | Ano | 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> | Ano | 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[] | Ano | Who pays for the next call to each provider, and whether its key works. |
included_daily_micros | integer | Ano | — |
included_remaining_micros | integer | Ano | — |
credentials | AiCredential[] | Ano | — |
usage_30d | AiUsageLine[] | Ano | — |
open_proposals | integer | Ano | — |
site_builder | SiteBuilderTrial | Ano | 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… |
Chyby, které může tento koncový bod vrátit
401 · 403 · 422 · 429