ai

PUT /v1/ai/credits/settings

Turn automatic top-up on or off.

Të gjitha pikat e skajshme ai

Autentifikimi

Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen billing.payment.manage; një çelës pa të refuzohet me 403, jo 404.

Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.

Provoje

Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.

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> }'

Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së

Detajet

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.

Trupi i kërkesës

EmriLlojiKërkohetÇfarë është kjo
auto_topup_enabledbooleanPo
auto_topup_pack_codestringJo
auto_topup_threshold_microsintegerJo`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 sw…
auto_topup_monthly_cap_microsintegerJo`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 noth…

Përgjigja

EmriLlojiKërkohetÇfarë është kjo
stateAiCreditStatePo
packsAiCreditPack[]Po
settingsAiCreditSettingsPoThe customer's standing instruction about topping up, and what has become of it. Owner, 2026-08-24, reading `/ai` on production: *"The auto top section doesnt allow you to selec…
historyAiCreditHistoryLine[]PoThe 25 most recent movements, newest first.
funding_routesAiProviderFunding[]PoWho 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[]PoEverything 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.

Gabimet që ky pikëndalim mund të kthejë

401 · 403 · 422 · 429