The operator to use for filtering options













Beta Observability Chat Completion Events Fields Endpoints












Examples
Real world code examples
Get Chat Completion Fields
GET /v1/observability/chat-completion-fields
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.fields.list()
# Handle response
print(res)
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.fields.list()
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/chat-completion-fields \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/observability/chat-completion-fields \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"field_definitions": [
{
"label": "approved",
"name": "My resource",
"supported_operators": [
"lt"
],
"type": "ENUM"
}
],
"field_groups": [
{
"label": "approved",
"name": "My resource"
}
]
}{
"field_definitions": [
{
"label": "approved",
"name": "My resource",
"supported_operators": [
"lt"
],
"type": "ENUM"
}
],
"field_groups": [
{
"label": "approved",
"name": "My resource"
}
]
}Get Chat Completion Field Options
GET /v1/observability/chat-completion-fields/{field_name}/options
field_name
operator
200
Successful Response
options
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.fields.fetch_options(field_name="<value>", operator="startswith")
# Handle response
print(res)
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.fields.fetch_options(field_name="<value>", operator="startswith")
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{}{}Get Chat Completion Field Options Counts
POST /v1/observability/chat-completion-fields/{field_name}/options-counts
field_name
filter_params
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.fields.fetch_option_counts(field_name="<value>")
# Handle response
print(res)
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.fields.fetch_option_counts(field_name="<value>")
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options-counts \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/observability/chat-completion-fields/{field_name}/options-counts \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"counts": [
{
"count": 87,
"value": "approved"
}
]
}{
"counts": [
{
"count": 87,
"value": "approved"
}
]
}