Search request logs
/v1/logsSearch request logs.
Returns one page of log rows matching every filter given, newest first unless sort_by says otherwise, with the total count. A row covers one request: chat, Claude Messages, embeddings, audio, images, files, batches, Responses API, Decisions and System One calls. Request and response bodies are not in the rows; read one log for them. Text filters match exactly unless noted.
With workspace_id, requires access to that workspace: an organization owner or admin, a member of the workspace, an organization-scoped va_ key with the admin role, or a va_ key scoped to the workspace. Without it, requires an organization owner or admin, or an organization-scoped va_ key with the admin role. Errors: 400 for a date-time that is not ISO 8601 with an offset, or an unknown sort_by.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Query parameters
providerstringonly requests to this provider, as stored: upper case with underscores, e.g.
OPENAImodelstringonly requests for this model id, as sent
organizationstringthe organization's slug
workspace_idstring<uuid>only this workspace's requests (UUID)
user_idstringonly requests attributed to this end user (the request's
userfield)virtual_key_slugstringonly requests made with this virtual key (
vk-...)config_slugstringonly requests routed through this routing config
guardrail_slugstringonly requests this guardrail applied to (
gr-...), alone or with othersguardrail_statusstringonly requests whose combined guardrail result is this:
PASS,MONITOR,REDACT,BLOCKorBYPASSstatusstringsuccess(status code below 400) orerror(400 and above); anything else is ignoredcache_statusstringonly requests with this cache result:
HIT,SEMANTIC_HIT,MISS,BYPASS,DISABLEDorREFRESHstart_timestringonly requests at or after this time (ISO 8601 date-time with offset)
end_timestringonly requests before this time (ISO 8601 date-time with offset)
searchstringtext to find anywhere in the stored request or response body, case-insensitive; only matches logs whose bodies were stored
min_costnumber<double>only requests that cost at least this much, in USD
max_costnumber<double>only requests that cost at most this much, in USD
min_duration_msinteger<int64>only requests that took at least this long, in milliseconds
max_duration_msinteger<int64>only requests that took at most this long, in milliseconds
min_tokensinteger<int32>only requests with at least this many total tokens
max_tokensinteger<int32>only requests with at most this many total tokens
sort_bystringthe field to sort by:
created_at(default),provider,model,status_code,duration_ms,prompt_tokens,completion_tokens,total_tokens,cost,cache_status,retry_count,fallback_provider,virtual_key_slug,config_slug,guardrail_slug,guardrail_status,organization,workspace_id,user_idorstreamingsort_dirstringascordesc(default)pageinteger<int32>the page to return, starting at 1 (default 1)
page_sizeinteger<int32>rows per page, default 50, at most 100 (a larger value is lowered to 100)
request_idstringonly the request with this request id (the
X-Request-IDit ran under)operation_typestringonly this kind of operation, e.g.
embedding,transcription,translation,image_generation,image_edit,file_upload,batch_create,response_create,message_batch,system_oneoropenai_decision(chat and Claude Messages requests have none)tool_scan_statusstringonly requests whose tool-result scan had this result:
PASS,MONITOR,REDACTorBLOCK;FLAGGEDmatches any of the last three
Responses
totalinteger<int64>How many logs match the search, over all pages.
pageinteger<int32>This page's number, starting at 1.
page_sizeinteger<int32>The most logs a page holds.
dataobject[]The logs on this page.
Child attributes
idstringThe log's id (UUID). Use it to read the log in full.
request_idstringThe request id the call ran under: the caller's
X-Request-ID, or one the gateway generated. For a Message Batch request,<batch id>/<custom_id>.created_atstring<date-time>When the request was logged (ISO 8601 date-time).
providerstringThe provider the request went to, upper case with underscores, e.g.
OPENAIorVERTEX_AI.modelstringThe model id the request asked for.
status_codeinteger<int32>The HTTP status the request ended with. 499 means the caller disconnected during a stream.
duration_msinteger<int64>How long the request took at the gateway, in milliseconds.
streamingbooleanWhether the response was streamed.
organizationstringThe slug of the organization the request belongs to.
user_idstringThe end user the caller attributed the request to (the request's
userfield, ormetadata.user_idon Claude Messages); null when none was sent.prompt_tokensinteger<int32>Input tokens, cached input included. Null when the provider reported no usage.
completion_tokensinteger<int32>Output tokens. Null when the provider reported no usage.
total_tokensinteger<int32>Input plus output tokens. Null when the provider reported no usage.
costnumber<double>What the request cost, in USD, including the platform markup on a PLATFORM virtual key. 0 on a cache hit; null when the model has no price.
cost_saved_usdnumber<double>What a cache hit would have cost, in USD (
costis 0 on a hit); null on every other request.cache_statusstringThe response cache result:
HIT,SEMANTIC_HIT,MISS,BYPASS,DISABLEDorREFRESH.retry_countinteger<int32>How many times the gateway retried the call (see
x-retry-count).fallback_providerstringThe fallback provider that served the request when the primary failed; null when no fallback was used.
virtual_key_slugstringThe virtual key the request was made with (
vk-...); null for direct provider credentials.workspace_idstring<uuid>The workspace the request belongs to (UUID); null when it has none.
config_slugstringThe routing config the request was routed through; null when none was used.
guardrail_slugstringThe guardrails that applied to the request, comma-separated (
gr-...); null when none did.guardrail_statusstringThe combined guardrail result over the input and output checks:
PASS,MONITOR,REDACT,BLOCKorBYPASS; null when no guardrail applied.tool_scan_statusstringThe result of the scan of the tool results the request fed back to the model:
PASS,MONITOR,REDACTorBLOCK; null when the request carried no tool results.initiatorstringMCP_SERVERwhen the MCP Gateway made this request on behalf of an MCP server's sampling request; null otherwise.mcp_server_slugstringThe MCP server whose sampling request this request answered; null otherwise.
regionstringThe AWS region that served the request and holds this log, e.g.
us-east-2; null on logs written before it was recorded.tool_call_namesstring[]The function names the model asked to call, in the order it asked; null or empty when it asked for none.
tool_result_countinteger<int32>How many tool results (tool-role messages) the request carried.
declared_tool_countinteger<int32>How many tools the caller declared on the request.