Get a request log
/v1/logs/{id}Get a request log.
Returns one log row in full: everything the search returns, plus the request and response bodies when the organization stores them, the error message of a failed request, the declared tools and the guardrail details. Fails with 404 when there is no log with this id.
Requires access to the log's 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.
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.
Path parameters
idstringrequiredthe log's id, as returned in
idby the search
Responses
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.error_messagestringWhy a failed request failed, with the provider's own message when the provider refused it; null on success.
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.
declared_toolsmap<string, object>[]The tools declared on the request: each one's
nameand theschema_hashof its definition.request_bodystringThe request as sent, as JSON text, with inline images, files and audio elided. Null unless the organization stores request and response bodies.
response_bodystringThe response, as JSON text (a streamed answer is rebuilt whole), or the provider's error body on a failed request. Null unless the organization stores request and response bodies.
operation_typestringThe kind of operation, e.g.
embedding,transcription,image_generation,file_upload,batch_create,response_create,message_batch,system_oneoropenai_decision; null for chat and Claude Messages requests.file_size_bytesinteger<int64>The size of the uploaded file or audio, in bytes; only on file and audio operations.
mime_typestringThe media type of the uploaded file or audio; only on file and audio operations.
media_formatstringThe audio or response format of an audio or image operation, e.g.
mp3orjson.image_sizestringThe requested image size, e.g.
1024x1024; only on image operations.image_qualitystringThe requested image quality, e.g.
standardorhd; only on image operations.image_countinteger<int32>How many images were generated; only on image operations.
audio_duration_secondsnumber<double>The length of the audio, in seconds; only on audio operations.
voicestringThe voice used for text-to-speech; only on speech operations.
resolved_modelstringThe versioned model that answered when the request named an alias; only on System One and Decisions requests.
question_countinteger<int32>How many questions the request asked; only on System One and Decisions requests.
min_confidencenumber<double>The lowest confidence among the answers' choices and scores, 0 to 1; only on System One and Decisions requests.