POST
/
monitor
/
trace
curl --request POST \
  --url https://api.getbasalt.ai/monitor/trace \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "qa-chatbot",
  "featureSlug": "qa-chatbot",
  "chainSlug": "qa-chatbot",
  "input": "What is the capital of France?",
  "output": "Paris",
  "metadata": {
    "sessionId": "456",
    "userType": "admin"
  },
  "organization": {
    "id": "123",
    "name": "ACME"
  },
  "user": {
    "id": "123",
    "name": "John Doe"
  },
  "startTime": "2021-01-01T00:00:00Z",
  "endTime": "2021-01-01T00:00:00Z",
  "experiment": {
    "id": "123"
  },
  "logs": [
    {
      "id": "123",
      "type": "generation",
      "name": "qa-chatbot",
      "startTime": "2021-01-01T00:00:00Z",
      "endTime": "2021-01-01T00:00:00Z",
      "metadata": {
        "sessionId": "456",
        "userType": "admin"
      }
    }
  ],
  "evaluators": [
    {
      "slug": "hallucination"
    }
  ],
  "evaluationConfig": {
    "sampleRate": 0.5
  }
}'
{
  "trace": {
    "id": "123"
  },
  "warning": "No prompt found with the given slug or no production version found or no prompt found with the given version or tag (production version also missing)"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

The trace created

The response is of type object.