Back to library
AI
best practice

Monitor Real-Time Token Costs and Usage Stats

Track your daily token and API expenditure directly in the terminal.

Monitor your AI development costs in real-time by using the /stats command to display a summary of your daily token spend and usage.

Qwen

The Scenario

You are working on a high-velocity project and need to verify your API usage and token expenditure to stay within development budgets.

Before & after

The old way

Developers manually log into API provider dashboards or check cloud billing consoles once a month, spending 15–20 minutes to calculate costs.

With AI

Run /stats regularly to see a precise breakdown of your daily spending in under 30 seconds.

The Prompt

/stats

Included in version 0.18.4, the /stats command helps developers monitor their resource consumption without leaving the terminal environment.

Source

Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs
"/stats shows your daily token spend, /voice lets you speak instead of type."