ai

POST /v1/ai/images/credentials/{credentialId}/test

Check an image key now, by generating a real image with it.

Todos os endpoints de ai

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.manage; uma chave sem ela é recusada com 403, e não 404.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

curl -X POST https://api.zinndigital.com/v1/ai/images/credentials/{credentialId}/test \
  -H "Authorization: Bearer zdk_live_…"

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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

Parâmetros

NomeTipoObrigatórioO que é
credentialId (path)UuidSim

Resposta

NomeTipoObrigatórioO que é
idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
providerAiImageProviderSimAn 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…
labelstringSim
verified_atobjectNãoThe 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_atobjectNãoThe 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_okobjectNão
last_check_errorstringNãoThe provider's own words when the last check failed. Empty otherwise.
broken_sinceobjectNãoWhen 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_atobjectNão
created_atstringSim

Erros que este endpoint pode retornar

401 · 403 · 404 · 429