ai

PUT /v1/ai/credits/settings

Turn automatic top-up on or off.

Minden ai végpont

Az összes fejlesztői dokumentáció

Hitelesítés

Küldjön egy API-kulcsot bearer tokenként. A kulcsnak rendelkeznie kell a(z) billing.payment.manage jogosultsággal; az ezzel nem rendelkező kulcsok esetén a rendszer 403-as hibát ad vissza 404 helyett.

Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.

Próbálja ki

Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.

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

Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban

Részletek

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.

Kérés törzse

NévTípusKötelezőMi ez
auto_topup_enabledbooleanIgen
auto_topup_pack_codestringNem
auto_topup_threshold_microsintegerNem0 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_microsintegerNem0 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…

Válasz

NévTípusKötelezőMi ez
stateAiCreditStateIgen
packsAiCreditPack[]Igen
settingsAiCreditSettingsIgenThe customer's standing instruction about topping up, and what has become of it. Owner, 2026-08-24, reading /ai on production:…
historyAiCreditHistoryLine[]IgenThe 25 most recent movements, newest first.
funding_routesAiProviderFunding[]IgenWho 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[]IgenEverything 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.

Hibák, amelyeket ez a végpont visszaadhattatlan

401 · 403 · 422 · 429