I stopped reading logs but the raw API requests – here's where my tokens go cost-xray captures actual API requests from AI coding agents (Claude Code, Codex) and breaks down each token and cost by source within the request.
Cost-xray is a new tool designed to monitor and analyze API requests made by AI coding agents like Claude Code and Codex. Unlike traditional log-based tools, it captures raw API requests to provide a detailed breakdown of token usage and costs, including system prompts and tool schemas. The tool offers a real-time TUI for intuitive visualization of session and source-specific expenses, aiding in AI agent cost optimization and debugging. AI
IMPACT Provides developers with granular cost and token usage insights for AI coding agents, enabling better optimization.