Logs export feature is only available for Production and Enterprise users.

At Portkey, we understand the importance of data analysis and reporting for businesses and teams. That’s why we provide a comprehensive logs export feature for our paid users. With this feature, you can easily request and obtain your Portkey logs data in a structured JSON format, allowing you to gain valuable insights into your LLM usage, performance, costs, and more.

Requesting Logs Export

To submit a data export request, simply follow these steps:

  1. Ensure you are an admin of your organization on Portkey.
  2. Send an email to [email protected] with the subject line Logs Export - [Your_Organization_Name].
  3. In the email body,
    • Specify the time frame for which you require the logs data. Pro plan supports logs export of last 30 days.
    • Share names of the specific columns you require (see the ”Exported Data” section below for a complete list of available columns).
  4. Our team will process your request and provide you with the exported logs data in JSON format.

Note: Portkey only supports data exports in the JSONL format, and can not process exports in any other formats at the moment.

Exported Data

The exported logs data will include the following columns:

Column NameColumn Description / Property
created_atTimestamp of the request
request.bodyRequest JSON payload (as seen in the Portkey logs)
response.bodyResponse JSON payload (as seen in the Portkey logs)
is_successRequest success status (1 = success, 0 = failure)
ai_orgAI provider name
ai_modelAI model name
req_unitsNumber of tokens in the request
res_unitsNumber of tokens in the response
total_unitsTotal number of tokens (request + response)
costCost of the request in cents (USD)
cost_currencyCurrency of the cost (USD)
request_urlFinal provider API URL
request_methodHTTP request method
response_status_codeHTTP response status code
response_timeResponse time in milliseconds
cache_statusCache status (SEMANTIC HIT, HIT, MISS, DISABLED)
cache_typeCache type (SIMPLE, SEMANTIC)
stream_modeStream mode status (TRUE, FALSE)
retry_success_countNumber of retries after which request was successful
trace_idTrace ID for the request
modeConfig top level strategy (SINGLE, FALLBACK, LOADBALANCE)
virtual_keyVirtual key used for the request
runtimeRuntime environment
runtime_versionRuntime environment version
sdk_versionPortkey SDK version
configConfig ID used for the request
prompt_slugPrompt ID used for the request
prompt_version_idVersion number of the prompt template slug
metadata.keyCustom metadata key
metadata.valueCustom metadata value

With this comprehensive data, you can analyze your API usage patterns, monitor performance, optimize costs, and make data-driven decisions for your business or team.

Support

If you have any questions or need assistance with the logs export feature, reach out to the Portkey team at [email protected] or hop on to our Discord server.