ai
POST /v1/ai/credentials/{credentialId}/test
Test a stored AI provider key now.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.payment.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/ai/credentials/{credentialId}/test \
-H "Authorization: Bearer zdk_live_…"Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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`.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
credentialId (path) | Uuid | Sì | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
ok | boolean | Sì | — |
exercised_prompt | boolean | Sì | ⭐ 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 | No | — |
model | string | No | — |
latency_ms | integer | No | — |
state | string<untested, working, broken> | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 404 · 429