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 زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول 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… |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 422 · 429