Ping AI Connection
POSThttps://api.confident-ai.com/v1/ai-connections/{aiConnectionId}/ping
Calls the AI connection's endpoint once with a sample test case and reports whether it answered and could be parsed. The verdict replaces the connection's stored active.
curl -X POST "https://api.confident-ai.com/v1/ai-connections/{aiConnectionId}/ping" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"multiturn": false
}'{
"success": true,
"data": {
"active": true,
"error": null,
"statusCode": 200,
"timeTaken": 1.42,
"request": {
"query": "What is 1+1?"
},
"response": {
"choices": [
{
"message": {
"content": "1+1 is 2"
}
}
]
},
"actualOutput": "1+1 is 2",
"invalidActualOutput": false
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aiConnectionIdstringRequiredThe id of the AI connection.
Request body
multiturnbooleanVerify the connection over a multi-turn conversation instead of a single call. Defaults to
false.
Response
The result of the ping. A connection that failed the ping also returns 200 — read active for the verdict.
successbooleanIndicates if the request was successful.
dataobjectThe result of calling the endpoint.
Show 15 propertiesHide 15 properties
activebooleanWhether the endpoint answered and its response could be parsed. This replaces the connection's stored
active.errorstringThe category of failure, such as
Invalid Endpoint. Null whenactive. ReadstatusCodeandresponsefor the cause.statusCodeintegerThe status the endpoint returned.
408for a timeout,500when the call could not be made at all.timeTakennumberHow long the call took, in seconds.
requestobjectThe body that was sent, with payload placeholders resolved.
responseobjectThe endpoint's response body. When the call itself failed this carries the reason, and it is also where you can see the real response shape behind a wrong key path.
rawResponsestringThe unparsed response, for endpoints that do not return JSON.
actualOutputstringWhat was extracted as the output. Check it to confirm
actualOutputKeyPathreads the field you expect.retrievalContextlist of stringsWhat was extracted as the retrieval context.
toolsCalledlist of objectsWhat was extracted as the tools called.
stateobjectWhat was extracted as the state.
invalidActualOutputbooleanThe output was found but is not a valid type.
invalidRetrievalContextbooleanThe retrieval context was found but is not a list of strings.
invalidToolsCalledbooleanThe tools called were found but are not valid tool calls.
invalidStatebooleanThe state was found but could not be read.
deprecatedbooleanIndicates if this endpoint is deprecated.