v3

latestOpenAPI 3.0.02026-08-081996601.2 MB
Query History

List query histories

Lists the history of previous queries. Use this API to track query performance and to debug individual queries.

Filter the results with corpus_key or chat_id. Set limit to the maximum number of query histories to list.

get/v2/queries

Query parameters

corpus_keystring

The corpus_key used in the query.

started_afterstring date-time

Queries that started after a particular ISO date-time.

started_beforestring date-time

Queries that started before a particular ISO date-time.

chat_idstring

The chat_id of the query. Returns all queries in the specified chat.

history_idstring

The history_id of the query to use as a filter.

limitinteger

The maximum number of query histories to list.

page_keystring

The opaque cursor returned in metadata.page_key of the previous response. Omit it to fetch the first page.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Response

An array of previous query histories.

Example response

{
  "queries": [
    {
      "id": "qry_1234567890",
      "corpus_key": "eu_carbon",
      "started_at": "2025-06-01T12:00:00Z",
      "latency_millis": 50,
      "chat_id": "chat_1234567890",
      "generation": "The carbon reduction efforts by EU banks in 2023 show a significant increase, with a 20% rise in initiatives driven by regulatory pressure.",
      "factual_consistency_score": 0.98
    }
  ]
}