ai

POST /v1/ai/images/credentials

Store an image-provider key for this organization.

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.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.

Inda ID ɗin kungiyar ku ke zuwa

Wannan ma'ajiyar tana karɓar org_id a matsayin fili a cikin jikin JSON.

Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.

Gwada

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

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

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

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.manage`.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
providerAiImageProviderEhAn 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 u…
api_keystringEhThe key itself. Written straight to Vault and never returned.
labelstringA'a
org_idUuidA'aUUIDv7 identifier — sortable by creation time (docs/02 §8).

Martani

SunaNau'iAna buƙataAbin da yake
idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
providerAiImageProviderEhAn 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 u…
labelstringEh
verified_atobjectA'aThe 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_atobjectA'aThe 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_okobjectA'a
last_check_errorstringA'aThe provider's own words when the last check failed. Empty otherwise.
broken_sinceobjectA'aWhen 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 br…
last_used_atobjectA'a
created_atstringEh

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 422 · 429