ai
GET /v1/ai/summary
The organization's AI position — balance, funding route, usage.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.view; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X GET https://api.zinndigital.com/v1/ai/summary \
-H "Authorization: Bearer zdk_live_…"Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | Uuid | Não | 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… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
credit_balance_micros | integer | Sim | — |
credit_currency | string | Sim | 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> | Sim | 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[] | Sim | Who pays for the next call to each provider, and whether its key works. |
included_daily_micros | integer | Sim | — |
included_remaining_micros | integer | Sim | — |
credentials | AiCredential[] | Sim | — |
usage_30d | AiUsageLine[] | Sim | — |
open_proposals | integer | Sim | — |
site_builder | SiteBuilderTrial | Sim | 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… |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429