ai
POST /v1/ai/images/credentials/{credentialId}/test
Check an image key now, by generating a real image with it.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.payment.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/ai/images/credentials/{credentialId}/test \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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.payment.manage.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
credentialId (path) | Uuid | Oui | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
provider | AiImageProvider | Oui | 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… |
label | string | Oui | — |
verified_at | object | Non | 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 | Non | 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 | Non | — |
last_check_error | string | Non | The provider's own words when the last check failed. Empty otherwise. |
broken_since | object | Non | 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_at | object | Non | — |
created_at | string | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 429