For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chatbot Models

Lists all trained models for a chatbot

get

Required Permission: chatbots.models.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Responses
200

List of all models.

application/json
errorstringOptional

Optional error message.

get/v1/chatbots/{chatbotId}/models
GET /v1/chatbots/{chatbotId}/models HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "models": [
    {
      "id": "modl_59aBv7wzR9cxd1Pxyz",
      "name": "2025-10-02_de",
      "created": "2025-10-02T10:00:00Z",
      "updated": "2025-10-02T10:15:00Z",
      "trainingStatus": {
        "status": "Succeeded",
        "percentComplete": 100,
        "startDateTime": "2025-10-02T10:00:00Z",
        "endDateTime": "2025-10-02T10:15:00Z"
      },
      "evaluationStatus": {
        "status": "Succeeded",
        "percentComplete": 100,
        "startDateTime": "2025-10-02T10:00:00Z",
        "endDateTime": "2025-10-02T10:15:00Z"
      },
      "estimatedEndDateTime": "2025-10-02T10:20:00Z",
      "cluJobId": "clu-job-123",
      "trainingMode": "standard",
      "state": "trained",
      "cluModelId": "clu-model-456",
      "lastTrainingDurationInSeconds": 900,
      "lastTrainedDateTime": "2025-10-02T10:15:00Z",
      "expirationDate": "2026-10-02T10:15:00Z",
      "modelTrainingConfigVersion": "v2",
      "enoughExamples": true
    }
  ],
  "error": "text"
}

Retrieves a specific trained model

get

Required Permission: chatbots.models.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

modelIdstringRequired

The ID of the model to be retrieved.

Responses
200

Details of the model.

application/json
errorstringOptional

Optional error message.

get/v1/chatbots/{chatbotId}/models/{modelId}
GET /v1/chatbots/{chatbotId}/models/{modelId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "model": {
    "id": "modl_59aBv7wzR9cxd1Pxyz",
    "name": "2025-10-02_de",
    "created": "2025-10-02T10:00:00Z",
    "updated": "2025-10-02T10:15:00Z",
    "trainingStatus": {
      "status": "Succeeded",
      "percentComplete": 100,
      "startDateTime": "2025-10-02T10:00:00Z",
      "endDateTime": "2025-10-02T10:15:00Z"
    },
    "evaluationStatus": {
      "status": "Succeeded",
      "percentComplete": 100,
      "startDateTime": "2025-10-02T10:00:00Z",
      "endDateTime": "2025-10-02T10:15:00Z"
    },
    "estimatedEndDateTime": "2025-10-02T10:20:00Z",
    "cluJobId": "clu-job-123",
    "trainingMode": "standard",
    "state": "trained",
    "cluModelId": "clu-model-456",
    "lastTrainingDurationInSeconds": 900,
    "lastTrainedDateTime": "2025-10-02T10:15:00Z",
    "expirationDate": "2026-10-02T10:15:00Z",
    "modelTrainingConfigVersion": "v2",
    "enoughExamples": true
  },
  "error": "text"
}

Retrieves evaluation results for a specific model

get

Required Permission: chatbots.models.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

modelIdstringRequired

The ID of the model to be evaluated.

Responses
200

Detailed evaluation metrics of the model.

application/json
errorstringOptional

Optional error message.

get/v1/chatbots/{chatbotId}/models/{modelId}/evaluation
GET /v1/chatbots/{chatbotId}/models/{modelId}/evaluation HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "evaluation": {
    "projectKind": "classification",
    "distribution": {
      "labelsDistribution": {
        "train": 80,
        "test": 20
      },
      "entities": [
        {
          "entityName": "Location",
          "labelsDistribution": {
            "train": 80,
            "test": 20
          },
          "examplesDistribution": {
            "train": 80,
            "test": 20
          }
        }
      ],
      "intents": [
        {
          "intentName": "GetWeather",
          "labelsDistribution": {
            "train": 80,
            "test": 20
          }
        }
      ]
    },
    "entitiesEvaluation": {
      "confusionMatrix": {
        "ANY_ADDITIONAL_PROPERTY": {
          "confusionMatrixEntries": [
            {
              "id": "entry1",
              "normalizedValue": 0.5,
              "rawValue": 50
            }
          ]
        }
      },
      "entities": {
        "ANY_ADDITIONAL_PROPERTY": {
          "f1": 0.95,
          "precision": 0.94,
          "recall": 0.96,
          "truePositiveCount": 96,
          "trueNegativeCount": 98,
          "falsePositiveCount": 2,
          "falseNegativeCount": 4
        }
      },
      "microF1": 0.95,
      "microPrecision": 0.94,
      "microRecall": 0.96,
      "macroF1": 0.92,
      "macroPrecision": 0.91,
      "macroRecall": 0.93
    },
    "evaluationOptions": {
      "kind": "combined",
      "trainingSplitPercentage": 80,
      "testSplitPercentage": 20
    },
    "intentsEvaluation": {
      "confusionMatrix": {
        "ANY_ADDITIONAL_PROPERTY": {
          "confusionMatrixEntries": [
            {
              "id": "entry1",
              "normalizedValue": 0.5,
              "rawValue": 50
            }
          ]
        }
      },
      "intents": {
        "ANY_ADDITIONAL_PROPERTY": {
          "f1": 0.95,
          "precision": 0.94,
          "recall": 0.96,
          "truePositiveCount": 96,
          "trueNegativeCount": 98,
          "falsePositiveCount": 2,
          "falseNegativeCount": 4
        }
      },
      "microF1": 0.95,
      "microPrecision": 0.94,
      "microRecall": 0.96,
      "macroF1": 0.92,
      "macroPrecision": 0.91,
      "macroRecall": 0.93
    },
    "modelGuidance": {}
  },
  "error": "text"
}

Last updated