Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Observability Chat Completion Events Endpoints

(beta) Search, retrieve, and analyze chat completion events.

Get Chat Completion Events

POST /v1/observability/chat-completion-events/search

200

Successful Response

Playground

Test the endpoints live

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.chat_completion_events.search(search_params={
        "filters": None,
    }, page_size=50)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/observability/chat-completion-events/search \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "search_params": {
    "filters": null
  }
}'

200

{
  "completion_events": {}
}

Alternative to /search that returns only the IDs and that can return many IDs at once

POST /v1/observability/chat-completion-events/search-ids

200

Successful Response

completion_event_ids
*array<string>

Playground

Test the endpoints live

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.chat_completion_events.search_ids(search_params={
        "filters": {
            "field": "<value>",
            "op": "lt",
            "value": "<value>",
        },
    })

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/observability/chat-completion-events/search-ids \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "search_params": {
    "filters": null
  }
}'

200

{
  "completion_event_ids": [
    "ipsum eiusmod"
  ]
}

Get Chat Completion Event

GET /v1/observability/chat-completion-events/{event_id}

200

Successful Response

chat_transcription_events
*array<ChatTranscriptionEvent>
correlation_id
*string
created_at
*date-time
enabled_tools
*array<map<any>>
event_id
*string
extra_fields
*map<boolean|integer|number|string|date-time|array<string>|null>
nb_input_tokens
*integer
nb_messages
*integer
nb_output_tokens
*integer
request_messages
*array<map<any>>
response_messages
*array<map<any>>

Playground

Test the endpoints live

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.chat_completion_events.fetch(event_id="e79bf81b-b37f-425e-9dff-071a54592e44")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/observability/chat-completion-events/{event_id} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "chat_transcription_events": [
    {
      "audio_url": "ipsum eiusmod",
      "model": "consequat do",
      "response_message": [
        null
      ]
    }
  ],
  "correlation_id": "reprehenderit ut dolore",
  "created_at": "2025-10-07T20:56:01.974Z",
  "enabled_tools": [
    [
      null
    ]
  ],
  "event_id": "occaecat dolor sit",
  "extra_fields": [
    null
  ],
  "nb_input_tokens": 87,
  "nb_messages": 14,
  "nb_output_tokens": 56,
  "request_messages": [
    [
      null
    ]
  ],
  "response_messages": [
    [
      null
    ]
  ]
}

Get Similar Chat Completion Events

GET /v1/observability/chat-completion-events/{event_id}/similar-events

200

Successful Response

Playground

Test the endpoints live

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.chat_completion_events.fetch_similar_events(event_id="b7be6e08-d068-45fc-b77a-966232e92fd6")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/observability/chat-completion-events/{event_id}/similar-events \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "completion_events": {}
}

Run Judge on an event based on the given options

POST /v1/observability/chat-completion-events/{event_id}/live-judging

200

Successful Response

analysis
*string
answer
*string|number

Playground

Test the endpoints live

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.chat_completion_events.judge(event_id="dfcd5582-1373-4de5-af51-987464da561c", judge_definition={
        "name": "<value>",
        "description": "total plain self-confidence candid hungrily partial astride cruelly brr",
        "model_name": "<value>",
        "output": {
            "type": "CLASSIFICATION",
            "options": [
                {
                    "value": "<value>",
                    "description": "indeed insolence delightfully following",
                },
            ],
        },
        "instructions": "<value>",
        "tools": [],
    })

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/observability/chat-completion-events/{event_id}/live-judging \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "judge_definition": {
    "description": "ipsum eiusmod",
    "instructions": "consequat do",
    "model_name": "reprehenderit ut dolore",
    "name": "occaecat dolor sit",
    "output": {
      "options": [
        {
          "description": "nostrud",
          "value": "aute aliqua aute commodo"
        }
      ]
    },
    "tools": [
      "irure"
    ]
  }
}'

200

{
  "analysis": "ipsum eiusmod",
  "answer": "consequat do"
}