ai
POST /v1/ai/images/credentials/{credentialId}/test
Check an image key now, by generating a real image with it.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie billing.payment.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/ai/images/credentials/{credentialId}/test \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
credentialId (path) | Uuid | Tak | — |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
provider | AiImageProvider | Tak | 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 | Tak | — |
verified_at | object | Nie | 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 | Nie | 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 | Nie | — |
last_check_error | string | Nie | The provider's own words when the last check failed. Empty otherwise. |
broken_since | object | Nie | 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 | Nie | — |
created_at | string | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 429