Logging

Get a single log entry

GET/api/logs/{id}

Retrieves a single log entry by its ID.

Path Parameters

id*string

Log entry ID

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:8080/api/logs/string"
{
  "id": "string",
  "parent_request_id": "string",
  "provider": "string",
  "model": "string",
  "status": "processing",
  "object": "string",
  "timestamp": "2019-08-24T14:15:22Z",
  "number_of_retries": 0,
  "fallback_index": 0,
  "latency": 0,
  "cost": 0,
  "selected_key_id": "string",
  "selected_key_name": "string",
  "virtual_key_id": "string",
  "virtual_key_name": "string",
  "routing_engines_used": [
    "string"
  ],
  "routing_rule_id": "string",
  "routing_rule_name": "string",
  "stream": true,
  "raw_request": "string",
  "raw_response": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "token_usage": {
    "prompt_tokens": 0,
    "prompt_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "image_tokens": 0,
      "cached_read_tokens": 0,
      "cached_write_tokens": 0
    },
    "completion_tokens": 0,
    "completion_tokens_details": {
      "text_tokens": 0,
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "citation_tokens": 0,
      "num_search_queries": 0,
      "reasoning_tokens": 0,
      "image_tokens": 0,
      "rejected_prediction_tokens": 0
    },
    "total_tokens": 0,
    "cost": {
      "input_tokens_cost": 0,
      "output_tokens_cost": 0,
      "reasoning_tokens_cost": 0,
      "citation_tokens_cost": 0,
      "search_queries_cost": 0,
      "request_cost": 0,
      "total_cost": 0
    }
  },
  "error_details": {
    "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"
    }
  },
  "input_history": [
    {
      "role": "assistant",
      "name": "string",
      "content": "string",
      "tool_call_id": "string",
      "refusal": "string",
      "audio": {
        "id": "string",
        "data": "string",
        "expires_at": 0,
        "transcript": "string"
      },
      "reasoning": "string",
      "reasoning_details": [
        {
          "id": "string",
          "index": 0,
          "type": "reasoning.summary",
          "summary": "string",
          "text": "string",
          "signature": "string",
          "data": "string"
        }
      ],
      "annotations": [
        {
          "type": "string",
          "url_citation": {
            "start_index": 0,
            "end_index": 0,
            "title": "string",
            "url": "string",
            "sources": {},
            "type": "string"
          }
        }
      ],
      "tool_calls": [
        {
          "index": 0,
          "type": "string",
          "id": "string",
          "function": {
            "name": "string",
            "arguments": "string"
          }
        }
      ]
    }
  ],
  "responses_input_history": [
    {
      "id": "string",
      "type": "message",
      "status": "in_progress",
      "role": "assistant",
      "content": "string",
      "call_id": "string",
      "name": "string",
      "arguments": "string",
      "output": {},
      "action": {},
      "error": "string",
      "queries": [
        "string"
      ],
      "results": [
        {}
      ],
      "summary": [
        {
          "type": "summary_text",
          "text": "string"
        }
      ],
      "encrypted_content": "string"
    }
  ],
  "output_message": {
    "role": "assistant",
    "name": "string",
    "content": "string",
    "tool_call_id": "string",
    "refusal": "string",
    "audio": {
      "id": "string",
      "data": "string",
      "expires_at": 0,
      "transcript": "string"
    },
    "reasoning": "string",
    "reasoning_details": [
      {
        "id": "string",
        "index": 0,
        "type": "reasoning.summary",
        "summary": "string",
        "text": "string",
        "signature": "string",
        "data": "string"
      }
    ],
    "annotations": [
      {
        "type": "string",
        "url_citation": {
          "start_index": 0,
          "end_index": 0,
          "title": "string",
          "url": "string",
          "sources": {},
          "type": "string"
        }
      }
    ],
    "tool_calls": [
      {
        "index": 0,
        "type": "string",
        "id": "string",
        "function": {
          "name": "string",
          "arguments": "string"
        }
      }
    ]
  },
  "responses_output": [
    {
      "id": "string",
      "type": "message",
      "status": "in_progress",
      "role": "assistant",
      "content": "string",
      "call_id": "string",
      "name": "string",
      "arguments": "string",
      "output": {},
      "action": {},
      "error": "string",
      "queries": [
        "string"
      ],
      "results": [
        {}
      ],
      "summary": [
        {
          "type": "summary_text",
          "text": "string"
        }
      ],
      "encrypted_content": "string"
    }
  ],
  "embedding_output": [
    [
      0
    ]
  ],
  "params": {},
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "string",
        "description": "string",
        "parameters": {
          "type": "string",
          "description": "string",
          "required": [
            "string"
          ],
          "properties": {},
          "enum": [
            "string"
          ],
          "additionalProperties": true
        },
        "strict": true
      },
      "custom": {
        "format": {
          "type": "string",
          "grammar": {
            "definition": "string",
            "syntax": "lark"
          }
        }
      },
      "cache_control": {
        "type": "ephemeral",
        "ttl": "string"
      }
    }
  ],
  "tool_calls": [
    {
      "index": 0,
      "type": "string",
      "id": "string",
      "function": {
        "name": "string",
        "arguments": "string"
      }
    }
  ],
  "speech_input": {},
  "transcription_input": {},
  "image_generation_input": {},
  "speech_output": {},
  "transcription_output": {},
  "image_generation_output": {},
  "cache_debug": {},
  "metadata": {},
  "selected_key": {},
  "virtual_key": {},
  "passthrough_request_body": "string",
  "passthrough_response_body": "string",
  "routing_engine_logs": {},
  "is_large_payload_request": true,
  "is_large_payload_response": true,
  "rerank_output": {},
  "video_generation_input": {},
  "video_generation_output": {},
  "video_retrieve_output": {},
  "video_list_output": {},
  "video_delete_output": {},
  "video_download_output": {},
  "list_models_output": {}
}
{
  "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"
  }
}