OptionalcursorBase64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
OptionalenvironmentOptional filter for observations where the environment is one of the provided values.
OptionalexpandComma-separated list of metadata keys to return non-truncated. By default, metadata values over 200 characters are truncated. Use this parameter to retrieve full values for specific keys. Example: "key1,key2"
OptionalfieldsComma-separated list of field groups to include in the response.
Available groups: core, basic, time, io, metadata, model, usage, prompt, metrics, trace_context.
If not specified, core and basic field groups are returned.
Example: "basic,usage,model"
OptionalfilterJSON string containing an array of filter conditions. When provided, this takes precedence over query parameter filters (userId, name, type, level, environment, fromStartTime, ...).
Each filter condition has the following structure:
[
{
"type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null"
"column": string, // Required. Column to filter on (see available columns below)
"operator": string, // Required. Operator based on type:
// - datetime: ">", "<", ">=", "<="
// - string: "=", "contains", "does not contain", "starts with", "ends with", "matches"
// - stringOptions: "any of", "none of"
// - categoryOptions: "any of", "none of"
// - arrayOptions: "any of", "none of", "all of"
// - number: "=", ">", "<", ">=", "<="
// - stringObject: "=", "contains", "does not contain", "starts with", "ends with", "matches"
// - numberObject: "=", ">", "<", ">=", "<="
// - boolean: "=", "<>"
// - null: "is null", "is not null"
"value": any, // Required (except for null type). Value to compare against. Type depends on filter type
"key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata
}
]
id (string) - Observation IDtype (string) - Observation type (SPAN, GENERATION, EVENT)name (string) - Observation nametraceId (string) - Associated trace IDstartTime (datetime) - Observation start timeendTime (datetime) - Observation end timeenvironment (string) - Environment taglevel (string) - Log level (DEBUG, DEFAULT, WARNING, ERROR)statusMessage (string) - Status messageversion (string) - Version taguserId (string) - User IDsessionId (string) - Session IDtraceName (string) - Name of the parent tracetraceTags (arrayOptions) - Tags from the parent tracetags (arrayOptions) - Alias for traceTagslatency (number) - Latency in seconds (calculated: end_time - start_time)timeToFirstToken (number) - Time to first token in secondstokensPerSecond (number) - Output tokens per secondinputTokens (number) - Number of input tokensoutputTokens (number) - Number of output tokenstotalTokens (number) - Total tokens (alias: tokens)inputCost (number) - Input cost in USDoutputCost (number) - Output cost in USDtotalCost (number) - Total cost in USDmodel (string) - Provided model name (alias: providedModelName)promptName (string) - Associated prompt namepromptVersion (number) - Associated prompt versioninput (string) - Observation input. Supports accelerated indexed literal search with the matches operator.output (string) - Observation output. Supports accelerated indexed literal search with the matches operator.metadata (stringObject/numberObject/categoryOptions) - Metadata key-value pairs. Use key parameter to filter on specific metadata keys.The matches operator is only supported for input, output, and stringObject metadata filters. It performs indexed literal search with token-boundary pruning using the events table text indexes. Case sensitivity differs by target: input and output matches are case-insensitive, while metadata value matches are case-sensitive. Unlike SQL LIKE, % and _ are treated as literal characters. Use contains for legacy substring semantics where the API allows it. Any v2 input or output filter must be accompanied by at least one = or matches filter on input or output; standalone contains, starts with, ends with, and does not contain filters on these columns are rejected.
[
{
"type": "string",
"column": "type",
"operator": "=",
"value": "GENERATION"
},
{
"type": "number",
"column": "latency",
"operator": ">=",
"value": 2.5
},
{
"type": "stringObject",
"column": "metadata",
"key": "environment",
"operator": "=",
"value": "production"
},
{
"type": "string",
"column": "output",
"operator": "matches",
"value": "needle"
}
]
OptionalfromRetrieve only observations with a start_time on or after this datetime (ISO 8601).
OptionallevelOptional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR").
OptionallimitNumber of items to return per page. Maximum 1000, default 50.
OptionalnameOptionalparentOptionalparseDeprecated. Setting this to true will return a 400 error.
Input/output fields are always returned as raw strings.
Remove this parameter or set it to false.
OptionaltoRetrieve only observations with a start_time before this datetime (ISO 8601).
OptionaltraceOptionaltypeFilter by observation type (e.g., "GENERATION", "SPAN", "EVENT", "AGENT", "TOOL", "CHAIN", "RETRIEVER", "EVALUATOR", "EMBEDDING", "GUARDRAIL")
OptionaluserOptionalversionOptional filter to only include observations with a certain version.
Example