Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա billing.payment.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

curl -X PUT https://api.zinndigital.com/v1/ai/credits/settings \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "auto_topup_enabled": <boolean> }'

Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում

Մանրամասներ

Automatic top-up is off by default and only the customer can turn it on. When it is on, running below the threshold buys the chosen pack once, with an hour between attempts so a declining card cannot be retried in a loop. Requires billing.payment.manage — turning this on is a decision to let us charge a saved card, which is the same audience as managing a provider key.

Հարցման մարմին

ԱնունՏեսակՊահանջվում էԻնչ է դա
auto_topup_enabledbooleanԱյո
auto_topup_pack_codestringՈչ
auto_topup_threshold_microsintegerՈչ0 keeps the shared low-balance threshold. Any other value below min_threshold_micros is a 422 — but only when auto_topup_enabled is true: refusing to let somebody…
auto_topup_monthly_cap_microsintegerՈչ0 uses the computed default. A ceiling smaller than one top-up is a 422: it is not a strict setting, it is an off switch wearing one — every attempt would exceed it and…

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
stateAiCreditStateԱյո
packsAiCreditPack[]Այո
settingsAiCreditSettingsԱյոThe customer's standing instruction about topping up, and what has become of it. Owner, 2026-08-24, reading /ai on production:…
historyAiCreditHistoryLine[]ԱյոThe 25 most recent movements, newest first.
funding_routesAiProviderFunding[]ԱյոWho pays for the next call, per provider. Read on the SAME request as the balance, so a screen cannot render a funding claim from one moment beside a balance from another.
spendsAiCreditSpend[]ԱյոEverything this credit buys — the metered surfaces derived from the engine's own meter, the credit-only spends that write no usage row, and the fixed-price AI products.

Այս վերջնակետի կողմից վերադարձվող սխալները

401 · 403 · 422 · 429