ai
GET /v1/ai/summary
The organization's AI position — balance, funding route, usage.
Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.view; ключ без него се отхвърля с 403, а не с 404.
Където отива идентификаторът на вашата организация
Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.
ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X GET https://api.zinndigital.com/v1/ai/summary \
-H "Authorization: Bearer zdk_live_…"Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
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`.
Параметри
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
org_id (query) | Uuid | Не | 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… |
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
credit_balance_micros | integer | Да | — |
credit_currency | string | Да | 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> | Да | 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[] | Да | Who pays for the next call to each provider, and whether its key works. |
included_daily_micros | integer | Да | — |
included_remaining_micros | integer | Да | — |
credentials | AiCredential[] | Да | — |
usage_30d | AiUsageLine[] | Да | — |
open_proposals | integer | Да | — |
site_builder | SiteBuilderTrial | Да | 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… |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429