ai

PUT /v1/ai/credits/settings

Turn automatic top-up on or off.

Dukkan ai wuraren ƙarshe

Tabbatar da Asali

Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin billing.payment.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.

Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.

Gwada

May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.

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

An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API

Bayani

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.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
auto_topup_enabledbooleanEh
auto_topup_pack_codestringA'a
auto_topup_threshold_microsintegerA'a`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_microsintegerA'a`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…

Martani

SunaNau'iAna buƙataAbin da yake
stateAiCreditStateEh
packsAiCreditPack[]Eh
settingsAiCreditSettingsEhThe 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[]EhThe 25 most recent movements, newest first.
funding_routesAiProviderFunding[]EhWho 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[]EhEverything 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.

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 422 · 429