ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
Баталгаажуулалт
API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь sites.view эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.
Таны байгууллагын дугаар орох газар
Энэ төгсгөл цэг нь org_id-г асуулгын параметр болгон авдаг. Үүнийг орхивол дуудлага таны бүх түрээсийн дэд модыг хамрах бөгөөд дуудлагыг зөвхөн нэг байгууллагаар хязгаарлахын тулд үүнийг илгээнэ үү.
Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.
Туршиж үзэх
Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.
curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
-H "Authorization: Bearer zdk_live_…"Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй API рүү хүсэлт илгээх тул та бодит хариуг харах боломжтой болно. Энэ төгсгөлийн цэгийг API консол дээр нээх
Дэлгэрэнгүй
One allowance per organization per calendar month, sized by how many sites the organization has — not per site. Free grants from staff are added to it. Checks run from the **support ticket form are free and unmetered** and never appear in `used`: a customer who has exhausted their allowance can still open a ticket and still gets a full check on their site. `in_good_standing` is false while an account is suspended or unpaid, which pauses metered checks only — the ticket path and previously-purchased results are unaffected. 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. |
Хариу үйлдэл
| Нэр | Төрөл | Заавал шаардлагатай | Энэ юу вэ |
|---|---|---|---|
tier | string | Тийм | The tier this organization falls into. |
monthly | integer | Тийм | Checks from the tier |
granted | integer | Тийм | Extra checks granted by staff that have not expired. |
total | integer | Тийм | `monthly` + `granted`. |
used | integer | Тийм | Billable checks used this period. Ticket and staff checks are never counted. |
remaining | integer | Тийм | — |
exhausted | boolean | Тийм | The monthly allowance is spent. ⛔ This does NOT mean checks are refused — see `credit_checks`. Rendering "0 left" on this field alone tells a customer whose credit covers hundre… |
credit_checks | integer | Үгүй | How many further checks the organization's Zinn® AI credit would cover once the allowance is gone. The allowance is the *included* tier of the one meter; beyond it a check is fu… |
exhausted_entirely | boolean | Үгүй | Out of allowance AND out of credit — the only state in which a self-serve check is actually refused. |
in_good_standing | boolean | Тийм | False while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable. |
period_start | string | Тийм | — |
Энэ төгсгөл цэгээс буцааж болох алдаанууд
401 · 403 · 422 · 429