> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mixlayer.com/api-reference/platform-api/analytics/get-sequences/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mixlayer.com/_mcp/server. # List inference sequences GET https://api.mixlayer.com/v1/organizations/{org_id}/analytics/sequences When authenticated with an API key, this operation requires `api-read`. Reference: https://docs.mixlayer.com/api-reference/platform-api/analytics/get-sequences ## Authentication - `Authorization` header (bearer token, required) — Console user session or Mixlayer API key supplied as a Bearer token. ## Request ### Path parameters - `org_id` (string, required) — Organization ID ### Query parameters - `range_start` (long, required) — Inclusive Unix timestamp in milliseconds; must be greater than zero. - `range_end` (long, required) — Exclusive Unix timestamp in milliseconds; must be greater than `range_start`. - `f` (list of string, optional) — Repeated filters in `[!]:` form. - `after` (string, optional) — Opaque pagination cursor. - `limit` (integer, optional, default: 50) — Maximum rows; defaults to 50 and is capped at 500. - `include_total` (boolean, optional, default: false) — Include the total matching row count; defaults to false. ## Response ### 200 Inference sequences - `data` (ApiDataResponseSequencesResponseData, required) — Cursor-paginated inference sequences. ## Errors ### 400 Bad Request Error Query parameters are missing or invalid. - `error` (ApiErrorBody, required) — Structured error details. ### 401 Unauthorized Error Authentication is missing or invalid. - `error` (ApiErrorBody, required) — Structured error details. ### 403 Forbidden Error The authenticated principal cannot perform this operation. - `error` (ApiErrorBody, required) — Structured error details. ### 404 Not Found Error The requested resource is not visible to the authenticated principal. - `error` (ApiErrorBody, required) — Structured error details. ### 500 Internal Server Error An unexpected server or database error occurred. - `error` (ApiErrorBody, required) — Structured error details. ### 503 Service Unavailable Error Analytics is not configured - `error` (ApiErrorBody, required) — Structured error details. ## Types ### ApiDataResponseSequencesResponseData Cursor-paginated inference sequences. - `sequences` (list of Sequence, required) — Sequences in the current page. - `next_cursor` (string, optional, nullable) — Cursor for the next page, or null when this is the last page. - `total` (long, optional, nullable) — Total matching sequence count when requested, otherwise null. ### ApiErrorBody Structured error details returned by the platform API. - `message` (string, required) — Human-readable error message. - `code` (string, optional, nullable) — Stable machine-readable error code, when available. - `details` (any, optional) — Error-specific structured context, when available. ### Sequence API-facing sequence shape. `org_id`, `event_id`, `version`, `gateway_instance`, and `ingest_ts` are intentionally omitted. - `cached_input_tokens` (long, required) — Number of cached input tokens. - `call_source` (string, required) — API surface that initiated the request, such as chat completions. - `gateway_latency_ms` (long, required) — Gateway processing latency in milliseconds. - `input_tokens` (long, required) — Number of non-cached input tokens. - `model` (string, required) — Model SKU used by the request. - `output_tokens` (long, required) — Number of generated output tokens. - `result` (string, required) — Request result, such as `success` or `error`. - `seq_duration_ms` (long, required) — Total sequence duration in milliseconds. - `seq_id` (string, required) — Stable identifier for the inference request sequence. - `timestamp` (long, required) — Sequence start time as Unix milliseconds. - `tool_calls` (list of string, required) — Tool names called during the request. - `api_key_id` (string, optional, nullable) — API key identifier used by the request, when available. - `client_ip` (string, optional, nullable) — Client IP address, when recorded. - `client_ua` (string, optional, nullable) — Client user-agent string, when recorded. - `error_code` (string, optional, nullable) — Machine-readable error code for a failed request. - `error_message` (string, optional, nullable) — Recorded error message for a failed request. ## Examples **Response** ```json { "data": { "sequences": [ { "cached_input_tokens": 1, "call_source": "string", "gateway_latency_ms": 1, "input_tokens": 1, "model": "string", "output_tokens": 1, "result": "string", "seq_duration_ms": 1, "seq_id": "string", "timestamp": 1, "tool_calls": [ "string" ], "api_key_id": "string", "client_ip": "string", "client_ua": "string", "error_code": "string", "error_message": "string" } ], "next_cursor": "string", "total": 1 } } ``` **SDK Code** ```python import requests url = "https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences" querystring = {"range_end":"1","range_start":"1"} headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences?range_end=1&range_start=1'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences?range_end=1&range_start=1" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences?range_end=1&range_start=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences?range_end=1&range_start=1") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.mixlayer.com/v1/organizations/org_id/analytics/sequences?range_end=1&range_start=1', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ```