Logging
Get MCP cost histogram
Returns time-bucketed MCP tool call cost data.
AuthorizationBearer <token>
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Query Parameters
tool_names?string
Comma-separated list of tool names to filter by
server_labels?string
Comma-separated list of server labels to filter by
status?string
Comma-separated list of statuses to filter by (processing, success, error)
virtual_key_ids?string
Comma-separated list of virtual key IDs to filter by
llm_request_ids?string
Comma-separated list of LLM request IDs to filter by
start_time?string
Start time filter (RFC3339 format)
Format
date-timeend_time?string
End time filter (RFC3339 format)
Format
date-timemin_latency?number
Minimum latency filter (milliseconds)
max_latency?number
Maximum latency filter (milliseconds)
content_search?string
Search in tool arguments and results
Response Body
curl -X GET "https://loading/{AI_GATEWAY_URL}/api/mcp-logs/histogram/cost?tool_names=string&server_labels=string&status=string&virtual_key_ids=string&llm_request_ids=string&start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&min_latency=0&max_latency=0&content_search=string"{
"buckets": [
{
"timestamp": "2019-08-24T14:15:22Z",
"total_cost": 0
}
],
"bucket_size_seconds": 0
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}