ai

PUT /v1/ai/credits/settings

Turn automatic top-up on or off.

सभी ai एंडपॉइंट्स

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास billing.payment.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

यह एंडपॉइंट कोई संगठन आईडी नहीं लेता है। आपकी कुंजी पहले से ही उस संगठन की पहचान करती है जिससे वह संबंधित है, और प्रतिक्रिया उसी के दायरे में है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

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 कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव 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 sw…
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 noth…

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
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: *"The auto top section doesnt allow you to selec…
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