LLM Log Analyzer: Tokens, Cost and Latency
Paste your LLM request logs as JSON or JSONL and see total tokens, cost, latency percentiles, error rate and your most expensive calls. Reads Anthropic and OpenAI usage fields. Runs in your browser.
Paste your logs
How to use the LLM Log Analyzer
- Export your request logs as JSON, a JSON array or JSONL (one object per line) and paste them in.
- Click Analyze logs. The tool finds the model, token usage, latency and errors in each record.
- Enter the price per million input and output tokens for each model, from your provider’s pricing page.
- Read total tokens and cost, latency percentiles, error rate and the five most expensive requests.
- Use Load sample to see the format and how the numbers are shown.
Frequently asked questions
Which log formats does it read?
Records with a usage object that has input_tokens and output_tokens (the fields in Anthropic’s Messages API response) or prompt_tokens, completion_tokens and total_tokens (the fields in OpenAI’s usage object). It also looks for usage inside response or response.body, plus flat fields on the record itself.
How does it find latency and errors?
Latency comes from latency_ms, duration_ms, elapsed_ms or response_time_ms, or from latency, duration or elapsed in seconds. A record counts as an error if it has an error field or a status or status_code of 400 or higher.
Why are prices not built in?
Prices change and differ by model and tier, so the tool asks you to enter them. Copy the per-million-token input and output prices from your provider’s official pricing page.
How are cached tokens handled?
Anthropic cache read and write tokens are shown separately when present, and they are not priced here because cache reads and writes have their own rates. Check your provider’s pricing page for those.
What are p50 and p95?
The median (p50) is the latency half of requests beat. The p95 is the latency that 95 percent of requests beat, so it shows how slow your slower calls are. Both use the nearest-rank method.
Are my logs uploaded?
No. The logs are parsed in your browser and nothing is sent anywhere. Avoid pasting logs that contain secrets or personal data into any website.