ai
POST /v1/ai/images/credentials/{credentialId}/test
Check an image key now, by generating a real image with it.
Authentication
Send an API key as a bearer token. The key must carry the billing.payment.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/ai/images/credentials/{credentialId}/test \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
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.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
credentialId (path) | Uuid | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | Uuid | Yes | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
provider | AiImageProvider | Yes | 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 | Yes | — |
verified_at | object | No | 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 | No | 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 | No | — |
last_check_error | string | No | The provider's own words when the last check failed. Empty otherwise. |
broken_since | object | No | 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 | No | — |
created_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 429