v1

latestOpenAPI 3.1.02026-07-13154170539.0 KB
Logs

Query Logs Post

Query logs via POST request.

This endpoint accepts the exact same parameters as GET /logs, but via request body instead of query parameters. This is useful for:

  • Large filter expressions that would exceed URL length limits
  • Filter expressions containing base64-encoded images (e.g., embed_image('data:image/png;base64,...'))
  • Complex sorting expressions

Example with image embedding:

{
    "project_name": "my-project",
    "filter_expr": "cosine(image_embedding, embed_image('data:image/png;base64,iVBORw0KG...')) < 0.3",
    "limit": 10
}
post/v0/logs/query

Request body

project_namestring required

Project name

contextstring nullable

Context name

column_contextstring nullable

The context (prepending '/' seperated field names) from which to retrieve the logs.

filter_exprstring nullable

Boolean string to filter entries. Supports embed_image() for image similarity queries.

sortingstring nullable

JSON-encoded dict mapping either static column names (e.g. timestamp) or full Python2SQL expressions (e.g. cosine(embed('search text'), embedding_vector)) to sort directions ("ascending" or "descending"). The first key is the primary sort field; subsequent keys break ties.

group_sortingstring nullable

Sorting configuration for groups when using group_by

from_idsstring nullable

Log IDs to include

exclude_idsstring nullable

Log IDs to exclude

from_fieldsstring nullable

Fields to include

exclude_fieldsstring nullable

Fields to exclude

limitinteger nullable
offsetinteger
group_bystring[] nullable

Fields to group by

group_limitinteger nullable

Maximum number of groups to return at each level

group_offsetinteger

Number of groups to skip at each level

group_depthinteger nullable

Maximum depth of nested groups to return

nested_groupsboolean

If True, groups are returned as a nested structure

groups_onlyboolean

If True, only return groups without full logs list

return_timestampsboolean

When groups_only is True, return timestamps with log IDs

return_ids_onlyboolean

If True, return only log IDs instead of full entries

randomizeboolean

If true, return logs in a deterministic random order

seedstring nullable

Seed for deterministic random ordering

value_limitinteger nullable

Maximum number of characters to return for string values

group_thresholdinteger nullable

When set, entries that appear in at least this many logs will be grouped together

Example request

{
  "project_name": "eval-project",
  "context": "training",
  "column_context": "subjects/science/physics",
  "filter_expr": "len(output) > 200 and temperature == 0.5",
  "sorting": "{\"timestamp\": \"descending\", \"round(score, 2)\": \"ascending\"}",
  "from_ids": "0&1&2",
  "exclude_ids": "0&1&2",
  "from_fields": "score&response",
  "exclude_fields": "score&response",
  "group_by": [
    "model",
    "temperature"
  ]
}

Response

Successful Response

{"stackTrail":"paths:/v0/logs/query:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}