Sessions

This endpoint returns session logs for requests made through AI Runtime Control, including request and response data and metadata, for debugging and audit purposes.

Data model

A session log. Other than `firewall_enabled` (always present), `firewall_*` fields are only present when AI Firewall ran on a request in this session. They're absent (not merely empty) otherwise, so their absence and an empty value mean different things.

created_atstringThe date and time the session was created, in RFC 3339 format. Required. Read-only.
firewall_enabledbooleanWhether AI Firewall was enabled for this session's virtual key. Required.
firewall_incomplete_reasonstringWhy AI Firewall inspection was incomplete, if applicable. Present only when AI Firewall ran and inspection didn't complete.
firewall_outcomestringThe outcome AI Firewall reached for this session. Present only when AI Firewall ran.
firewall_policystringThe AI Firewall policy that was applied. Present only when AI Firewall ran.
firewall_stagestringThe AI Firewall stage that produced the outcome (for example, the request or response stage). Present only when AI Firewall ran.
idstringThe unique identifier of the session. Required. Read-only.
input_tokensintegerThe total input tokens consumed in this session. Required.
logsarrayThe request and response pairs recorded for this session. Required.
modelstringThe AI model identifier used. Required.
output_tokensintegerThe total output tokens generated in this session. Required.
primary_providerstringThe ID of the provider connection originally requested, before any failover occurred.
providerstringThe name of the provider connection that ultimately served the session. Required.
provider_connection_idstringThe ID of the provider connection that ultimately served the session. Required.
requestsintegerThe number of requests made in this session. Required.
updated_atstringThe date and time the session was last updated, in RFC 3339 format. Required. Read-only.
violationsintegerThe number of AI Firewall violations detected in this session. Required.
virtual_key_idstringThe ID of the virtual key used for this session. Required.
virtual_key_namestringThe display name of the virtual key used for this session.
attrsobjectAdditional attributes recorded for this request/response pair.
requeststringThe raw request data.
responsestringThe raw response data.
limitintegerThe limit value used when making the request.
next_cursorstringThe cursor to use to request the next page of results. null when there are no more results.
prev_cursorstringThe cursor to use to request the previous page of results. null when there is no previous page.
sortstringThe sort value used when making the request.
totalintegerThe count of results matching the request.
metaobjectMetadata about the request.

Endpoints

Get session logs

GET/ai-runtime-control/v1/sessions