ai
PUT /v1/ai/credits/settings
Turn automatic top-up on or off.
प्रमाणीकरण
बेरर टोकन म्हणून API की पाठवा. की मध्ये billing.payment.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.
या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.
प्रयत्न करा
कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.
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 विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा
तपशील
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_enabled | boolean | होय | — |
auto_topup_pack_code | string | नाही | — |
auto_topup_threshold_micros | integer | नाही | 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_micros | integer | नाही | 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… |
प्रतिसाद
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
state | AiCreditState | होय | — |
packs | AiCreditPack[] | होय | — |
settings | AiCreditSettings | होय | The customer's standing instruction about topping up, and what has become of it. Owner, 2026-08-24, reading /ai on production:… |
history | AiCreditHistoryLine[] | होय | The 25 most recent movements, newest first. |
funding_routes | AiProviderFunding[] | होय | 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. |
spends | AiCreditSpend[] | होय | 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