Search and filter your request logs using structured filters, free-text search, and sorting.
X-API-KEY header, or JWT authentication via the Authorization: Bearer header.
filters array — multiple filters are combined with AND logic.
| Field | Type | Description |
|---|---|---|
pl_id | identifier | PromptLayer request ID |
prompt_id | identifier | Associated prompt template ID |
engine | string | Model name (e.g. gpt-4o, claude-sonnet-4-20250514) |
provider_type | string | Provider (e.g. openai, anthropic) |
input_text | string | Prompt input content |
output_text | string | LLM output content |
prompt_version_number | numeric | Prompt template version |
input_tokens | numeric | Input token count |
output_tokens | numeric | Output token count |
cost | numeric | Request cost in USD |
latency_ms | numeric | Latency in milliseconds |
request_start_time | datetime | When the request started (ISO 8601) |
request_end_time | datetime | When the request ended (ISO 8601) |
status | status | Request status (success, error, etc.) |
is_json | boolean | Whether output is JSON |
is_tool_call | boolean | Whether the request used tool calling |
is_plain_text | boolean | Whether output is plain text |
tags | array | Tags attached to the request |
metadata | nested | Metadata key-value pairs |
metadata_keys | array | List of metadata keys present |
tool_names | array | Names of tools used |
output | nested | Flattened output key-value pairs (JSON and tool call output only) |
output_keys | array | List of keys present in the flattened output |
input_variables | nested | Flattened input variable key-value pairs |
input_variable_keys | array | List of input variable keys |
output, metadata, and input_variables fields are flattened from nested objects into searchable key-value pairs using dot-notation (e.g. result.status). See the Search Data Model guide for details on how different output types are indexed and when to use key_equals vs key_contains.String fields (engine, provider_type)
| Operator | Description |
|---|---|
is | Exact match |
is_not | Not equal |
in | Matches any value in a list |
not_in | Does not match any value in a list |
Text fields (input_text, output_text)
| Operator | Description |
|---|---|
contains | Text contains the value (partial match) |
not_contains | Text does not contain the value |
starts_with | Text starts with the value |
ends_with | Text ends with the value |
Numeric fields (cost, latency_ms, input_tokens, output_tokens)
| Operator | Description | Example value |
|---|---|---|
eq | Equal | 100 |
neq | Not equal | 100 |
gt | Greater than | 0.01 |
gte | Greater than or equal | 0.01 |
lt | Less than | 1000 |
lte | Less than or equal | 1000 |
between | Within a range (inclusive) | [100, 500] |
is_null | Value is null | — |
is_not_null | Value is not null | — |
Datetime fields (request_start_time, request_end_time)
| Operator | Description | Example value |
|---|---|---|
is | Exact match | "2025-03-15T00:00:00Z" |
before | Before this time | "2025-03-15T00:00:00Z" |
after | After this time | "2025-03-14T00:00:00Z" |
between | Within a time range | ["2025-03-14T00:00:00Z", "2025-03-15T00:00:00Z"] |
Boolean fields (is_json, is_tool_call, is_plain_text)
| Operator | Description |
|---|---|
is_true | Field is true |
is_false | Field is false |
Array fields (tags, metadata_keys, tool_names, etc.)
Nested fields (metadata, output, input_variables)
nested_key parameter to specify which key to filter on.| Operator | Description |
|---|---|
key_equals | The value for the given key exactly matches |
key_not_equals | The value for the given key does not match |
key_contains | The value for the given key contains the search term |
in | The value for the given key matches any in a list |
not_in | The value for the given key matches none in a list |
is_empty | The key does not exist |
is_not_empty | The key exists |
key_equals and key_not_equals perform exact matching, which works best with short, discrete values like IDs, status codes, and enum-like strings.key_contains performs partial text matching, which is better suited for longer text values or when you only know part of the value.key_contains instead.filter_group to combine filters with AND/OR logic. Groups can be nested recursively.
q parameter performs a fuzzy prefix search across the prompt input and LLM output text. Combine it with filters to narrow results.
request_start_time (default, descending)input_tokensoutput_tokenscostlatency_msstatussort_by and sort_order must be provided together.
API key for authentication.
Search and filter request logs with structured filters, free-text search, sorting, and pagination.
List of structured filters. Multiple filters are combined with AND logic.
Nested filter group with AND/OR logic. Use this for complex queries.
Free-text search query. Searches across the prompt input and LLM output text using fuzzy prefix matching.
Page number for pagination. Defaults to 1.
x >= 1Number of results per page. Defaults to 10, maximum 25.
1 <= x <= 25Field to sort results by.
request_start_time, input_tokens, output_tokens, cost, latency_ms, status Sort direction. Must be provided together with sort_by.
asc, desc When true, includes the prompt template name in each result item. Defaults to false.
Paginated list of matching request logs.
Paginated search results.
Indicates the request was successful.
List of matching request log summaries.
Current page number.
Total number of pages.
Number of results per page.
Total number of matching results.
Whether there are more pages after the current one.
Whether there are pages before the current one.
Next page number, or null if on the last page.
Previous page number, or null if on the first page.