ai
POST /v1/ai/images/credentials/{credentialId}/test
Check an image key now, by generating a real image with it.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea billing.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/ai/images/credentials/{credentialId}/test \
-H "Authorization: Bearer zdk_live_…"Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
The customer's own "check it now". Same mechanism as the scheduled sweep, so the answer on screen and the answer in the sweep can never disagree. ⛔ A `POST` and not a `GET` because it **costs money**: it draws an image on the customer's provider account. A GET that spends would be retried by every browser, proxy and prefetcher on the path. Requires `billing.manage`.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
credentialId (path) | Uuid | Da | — |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
provider | AiImageProvider | Da | 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 u… |
label | string | Da | — |
verified_at | object | Nu | 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_at | object | Nu | 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_ok | object | Nu | — |
last_check_error | string | Nu | The provider's own words when the last check failed. Empty otherwise. |
broken_since | object | Nu | 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 br… |
last_used_at | object | Nu | — |
created_at | string | Da | — |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 429