trace
Query Traces
Overview
Getting Started
SDK/API
- Python SDK Reference
- TypeScript SDK Reference
How-to Guides
- Overview
- Conversational AI
- Retrieval-Augmented Generation
- Agentic AI
Cookbooks
- Use Cases
- Features
Integrations
Concepts
- Metrics
- Projects
- Logging
- Datasets
- Annotations
- Experiments
- Playground
API Reference
- health
- auth
- evaluate
- observe
- protect
- trace
- log_stream
- experiment
- feedback
- API Reference
References
trace
Query Traces
POST
/
v2
/
projects
/
{project_id}
/
traces
/
search
curl --request POST \
--url https://api.galileo.ai/v2/projects/{project_id}/traces/search \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '{
"filters": [
{
"case_sensitive": true,
"name": "input",
"operator": "eq",
"type": "text",
"value": "example input"
}
],
"log_stream_id": "00000000-0000-0000-0000-000000000000",
"pagination": {
"limit": 5,
"starting_token": 0
},
"sort": {
"ascending": false,
"name": "updated_at",
"sort_type": "column"
}
}'
{
"next_starting_token": 2,
"num_rows": 2,
"paginated": true,
"records": [
{
"created_at": "2025-05-14T16:06:33.844082Z",
"dataset_metadata": {},
"feedback_rating_info": {},
"id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"input": "Who is a smart LLM?",
"metrics": {
"duration_ns": 4
},
"name": "",
"output": "I am",
"project_id": "0d4e3799-3861-4759-875f-9ae14c167b0a",
"run_id": "74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db",
"tags": [],
"trace_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"type": "trace",
"user_metadata": {}
},
{
"created_at": "2025-05-14T16:06:33.844199Z",
"dataset_metadata": {},
"id": "1edc2401-24b4-448c-a392-b36932293061",
"input": [
{
"content": "Who is a smart LLM?",
"role": "user"
}
],
"metrics": {
"duration_ns": 4,
"num_input_tokens": 4,
"num_output_tokens": 2,
"num_total_tokens": 6
},
"name": "",
"output": {
"content": "I am",
"role": "user"
},
"parent_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"project_id": "0d4e3799-3861-4759-875f-9ae14c167b0a",
"run_id": "74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db",
"tags": [],
"trace_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"type": "llm",
"user_metadata": {}
}
]
}
Authorizations
Path Parameters
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
curl --request POST \
--url https://api.galileo.ai/v2/projects/{project_id}/traces/search \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '{
"filters": [
{
"case_sensitive": true,
"name": "input",
"operator": "eq",
"type": "text",
"value": "example input"
}
],
"log_stream_id": "00000000-0000-0000-0000-000000000000",
"pagination": {
"limit": 5,
"starting_token": 0
},
"sort": {
"ascending": false,
"name": "updated_at",
"sort_type": "column"
}
}'
{
"next_starting_token": 2,
"num_rows": 2,
"paginated": true,
"records": [
{
"created_at": "2025-05-14T16:06:33.844082Z",
"dataset_metadata": {},
"feedback_rating_info": {},
"id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"input": "Who is a smart LLM?",
"metrics": {
"duration_ns": 4
},
"name": "",
"output": "I am",
"project_id": "0d4e3799-3861-4759-875f-9ae14c167b0a",
"run_id": "74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db",
"tags": [],
"trace_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"type": "trace",
"user_metadata": {}
},
{
"created_at": "2025-05-14T16:06:33.844199Z",
"dataset_metadata": {},
"id": "1edc2401-24b4-448c-a392-b36932293061",
"input": [
{
"content": "Who is a smart LLM?",
"role": "user"
}
],
"metrics": {
"duration_ns": 4,
"num_input_tokens": 4,
"num_output_tokens": 2,
"num_total_tokens": 6
},
"name": "",
"output": {
"content": "I am",
"role": "user"
},
"parent_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"project_id": "0d4e3799-3861-4759-875f-9ae14c167b0a",
"run_id": "74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db",
"tags": [],
"trace_id": "1a0939d1-8b43-4fe3-a91c-196e2d9847e3",
"type": "llm",
"user_metadata": {}
}
]
}