ai
POST /v1/ai/credentials/{credentialId}/test
Test a stored AI provider key now.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.payment.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/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
Runs a **real, tiny completion with our own prompts and tool format** on the key — not the free authentication probe. ⚖️ The owner's requirement, verbatim: *"it must test it works with our system and prompts."* Authenticating and *working with our prompts* are different claims, and a screen showing only the first as a green tick is a control that cannot see the failure it exists to catch. Costs a fraction of a cent on the customer's own key, which is why it is only ever run on save, weekly, or when a person presses the button. Requires `billing.payment.manage`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
credentialId (path) | Uuid | Sim | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
ok | boolean | Sim | — |
exercised_prompt | boolean | Sim | ⭐ Whether a **real call with our own prompts** was made. `false` means we proved only that the key authenticates — a narrower claim a screen showing just "working" would erase,… |
detail | string | Não | — |
model | string | Não | — |
latency_ms | integer | Não | — |
state | string<untested, working, broken> | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 404 · 429