Launch Week 02 wrapped — explore all five launches

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.

POST/v1/ai-connections/{aiConnectionId}/ping
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
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • aiConnectionIdstringRequired

    The id of the AI connection.

Request body

  • multiturnboolean

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

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The result of calling the endpoint.

    Show 15 propertiesHide 15 properties
    • activeboolean

      Whether the endpoint answered and its response could be parsed. This replaces the connection's stored active.

    • errorstring

      The category of failure, such as Invalid Endpoint. Null when active. Read statusCode and response for the cause.

    • statusCodeinteger

      The status the endpoint returned. 408 for a timeout, 500 when the call could not be made at all.

    • timeTakennumber

      How long the call took, in seconds.

    • requestobject

      The body that was sent, with payload placeholders resolved.

    • responseobject

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

    • rawResponsestring

      The unparsed response, for endpoints that do not return JSON.

    • actualOutputstring

      What was extracted as the output. Check it to confirm actualOutputKeyPath reads the field you expect.

    • retrievalContextlist of strings

      What was extracted as the retrieval context.

    • toolsCalledlist of objects

      What was extracted as the tools called.

    • stateobject

      What was extracted as the state.

    • invalidActualOutputboolean

      The output was found but is not a valid type.

    • invalidRetrievalContextboolean

      The retrieval context was found but is not a list of strings.

    • invalidToolsCalledboolean

      The tools called were found but are not valid tool calls.

    • invalidStateboolean

      The state was found but could not be read.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI