ai

POST /v1/ai/images/credentials

Store an image-provider key for this organization.

सर्व ai एंडपॉइंट्स

सर्व डेव्हलपर कागदपत्रे

प्रमाणीकरण

बेरर टोकन म्हणून API की पाठवा. की मध्ये billing.payment.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.

जिथे तुमचा ऑर्गनायझेशन आयडी (organization id) जाईल

हा एंडपॉइंट JSON बॉडीमधील फील्ड म्हणून org_id घेतो.

तुमची संस्था आयडी (organisation id) तुमच्या डॅशबोर्डवरील API की स्क्रीनवर, की च्या बाजूला आहे. तुम्ही केलेल्या प्रत्येक कॉलमधील तोच आयडी असतो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

curl -X POST https://api.zinndigital.com/v1/ai/images/credentials \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "provider": <AiImageProvider>, "api_key": <string> }'

साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

Puts the key in Vault and records a pointer. Any existing live key for the same provider is revoked in the same transaction. ⭐ The key is tested immediately, by generating a real image, and the result is on the response. An auth probe is green against a model id that no longer exists, so the only check worth returning is one that actually draws something. A key that does not work is still stored and still a 201 — the row records last_check_ok: false and the provider's own words in last_check_error, because "we saved it and it does not work" is the successful outcome of this request and a 4xx would leave the screen unable to say why. Requires billing.payment.manage.

विनंती मुख्य भाग

नावप्रकारआवश्यकहे काय आहे
providerAiImageProviderहोयAn image-generation provider. ⛔ Deliberately a different enum from the text provider on AiCredential: Anthropic publishes no image model and xAI publishes no text model we…
api_keystringहोयThe key itself. Written straight to Vault and never returned.
labelstringनाही
org_idUuidनाहीUUIDv7 identifier — sortable by creation time (docs/02 §8).

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
idUuidहोयUUIDv7 identifier — sortable by creation time (docs/02 §8).
providerAiImageProviderहोयAn image-generation provider. ⛔ Deliberately a different enum from the text provider on AiCredential: Anthropic publishes no image model and xAI publishes no text model we…
labelstringहोय
verified_atobjectनाहीThe last time a real image generation on this key succeeded. ⛔ null means never proven, not broken. Moved only by a generation, never by a cheap auth probe: a probe proves…
last_checked_atobjectनाहीThe last time any check ran, pass or fail. Separate from verified_at so "we have not looked recently" is distinguishable from "we looked and it failed".
last_check_okobjectनाही
last_check_errorstringनाहीThe provider's own words when the last check failed. Empty otherwise.
broken_sinceobjectनाहीWhen the key first failed after last passing, or null if it is not currently broken. ⭐ This is what makes "notify on transition to broken, never per check" possible — a key…
last_used_atobjectनाही
created_atstringहोय

ही एंडपॉइंट परत करू शकेल अशा त्रुटी

401 · 403 · 422 · 429