Logs
List logs
POST
The Logs List endpoint allows you to retrieve past logs with specified filters.
Advanced filtering with operators:
This applies:
How to find your evaluator_id:
Supported operators for score filters:
Both
GET and POST methods are supported for listing logs. POST is recommended when using complex filters or when URL length limits might be exceeded. The same endpoint is also available at /api/request-logs/ (without /list/).Response fields
Each log in the response includes:Universal fields (All Span Types)
input(string): JSON-serialized representation of the span’s input dataoutput(string): JSON-serialized representation of the span’s output datalog_type(string): Type of span ("chat","embedding","workflow", etc.)
Evaluation Scores
scores(object): Map of evaluator scores{ evaluator_id: score_data }- Each evaluator’s score includes:
evaluator_name(string): Name of the evaluatorevaluator_slug(string): Slug identifier for the evaluatorscore_value(float): Numerical or boolean score value (booleans represented as 0.0 or 1.0)
- Each evaluator’s score includes:
Legacy compatibility
Forlog_type="chat", "completion", "text", or "response":prompt_messages(array): Full input messages array (extracted frominput)completion_message(object): Full output message object (extracted fromoutput)
log_type. See log types for details.Query parameters
You can add these parameters to the URL query string. For example:string
required
The start time for filtering logs in ISO 8601 format. If not provided, defaults to 1 hour ago.
Example
Example
string
required
The end time for filtering logs in ISO 8601 format. If not provided, defaults to current time.
Example
Example
string
required
The field to sort by. Default is
-id (same as sort by -timestamp, but with better performance).
- is for descending order, if not provided, it will be in ascending order.Properties
Properties
string
Sort by the ID of each request.
string
Sort by the cost of each request.
string
TTFT - useful for Voice AI applications
string
Generation time of each request.
string
Input / prompt tokens of each request.
string
Output / completion tokens of each request.
string
Total tokens of each request.
string
Sort by evaluator score. Use the evaluator’s UUID as the suffix. Example:
scores__d4f46e95-73ff-4166-8581-928c1a1b1589Example
Example
string
default:"false"
Whether to include logs from all environments.
is_test parameter will override this parameter.
Options: true, false.string
default:"false"
Whether the log is a test call or not. This parameter will override the
all_envs parameter.
Options: true, false.string
default:"false"
Whether to retrieve the available filtering options. Enabling this could slow down the response time.
Options:
true, false.number
default:100
The number of logs to return per page. Maximum is 1000.
number
default:1
The page number of the current logs.
string
Comma separated fields to be included in the response logs. This parameter allows you to specify which fields should be returned to improve performance and reduce response size.
include_fields guarantees the listed fields will be present in each log item, but it does not enforce exclusivity. The API may still return additional fields required for the endpoint (e.g., identifiers, pagination-related fields, or internal metadata).
Example
Example
URL-based Filtering (Quick Filters)
You can filter logs directly via URL query parameters without constructing POST body filters. This is useful for sharing filtered views, bookmarking, or building dynamic filter links.Basic Syntax
Simple filtering:Parameters
[value]: The filter value (required)[operator]: Comparison operator (optional, defaults to""for equality)""(empty): Exact match (is)"not": Not equal (is not)
[connector]: Logic connector (optional, defaults to"AND")"AND": Combine with previous filter using AND"OR": Combine with previous filter using OR
Field Auto-Detection
The system automatically detects how to handle each URL parameter:- Pagination/Sort parameters: Skipped (page, page_size, sort_by, etc.)
- Metadata fields starting with “metadata__”: Filter custom metadata
- Known log fields: Filter directly on that field
- Unknown fields: Treated as custom metadata (auto-prefix “metadata__“)
Known Log Fields
These fields can be filtered directly without themetadata__ prefix:
- Identifiers:
customer_identifier,custom_identifier,thread_identifier,prompt_id,unique_id - Tracing:
trace_unique_id,span_name,span_workflow_name - Provider/Model:
model,deployment_name,provider_id - Status:
status_code,status,error_message - Config:
environment,log_type,stream,temperature,max_tokens - Metrics:
cost,latency,tokens_per_second,time_to_first_token,prompt_tokens,completion_tokens,total_request_tokens
Map-type Fields (Double Underscore Prefix)
- Custom metadata:
metadata__<key>- Filter on custom metadata properties - Evaluator scores:
scores__<evaluator_id>- Filter/sort by evaluation scores (see below)
URL Filter Examples
Filter by customer identifier
Filter by customer identifier
Filter with operator (status code not equal to 200)
Filter with operator (status code not equal to 200)
Filter by custom metadata (auto-detected)
Filter by custom metadata (auto-detected)
Explicit metadata filter
Explicit metadata filter
Multiple filters with OR logic
Multiple filters with OR logic
Mixed known and unknown fields
Mixed known and unknown fields
Combining URL and POST Body Filters
URL filters and POST body filters can be combined. When there’s an overlap, URL filters take precedence.Example: Combined filters
Example: Combined filters
customer_identifier = "user_123"(from URL)status_code = 200(from POST body)
Limitations
- URL filters support only equality (
"") and not-equal ("not") operators - For complex operators (
gt,gte,lt,lte,contains, etc.), use POST body filters - Each field can only have one value in URL (no arrays)
- All URL values are treated as strings
Sorting and Filtering by Evaluation Scores
You can sort and filter logs by evaluator scores using thescores__ prefix pattern (consistent with metadata__ filtering).
Sorting by Scores
- The
evaluator_idis the key in thescoresobject returned in log responses - It’s the same as the UUID of the evaluator in your organization
- Example: If your scores object has
"d4f46e95-73ff-4166-8581-928c1a1b1589": {...}, usesort_by=-scores__d4f46e95-73ff-4166-8581-928c1a1b1589
Filtering by Scores
Use POST body filters to filter logs by score values:Filter logs with score greater than 4.0
Filter logs with score greater than 4.0
Filter logs with score less than or equal to 2.0
Filter logs with score less than or equal to 2.0
""(empty): Equal to"gt": Greater than"gte": Greater than or equal"lt": Less than"lte": Less than or equal"not": Not equal to
Body parameters
You can add these parameters to the request body:object
The filters be applied to the logs. For available options in the response body, use the
fetch_filters parameter.If you want to filter your custom properties, you should add
metadata__+ your custom property name. For example, if you want to filter your custom property my_custom_property, you should add metadata__my_custom_property to the filters.Example
Example
string
required
Default is "" (equal).
For a complete list of filter operators and examples, see the Filters API Reference.
Properties
Properties
string
Equal
Example
Example
string
case insensitive equal
string
Less than
string
Less than or equal
string
Greater than
string
Greater than or equal
string
Contains
string
Ends with
string
Starts with
string
Can be used in arrays or text
string
Check if the field is null
string
Case insensitive contains
string
Not equal