Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API endpoints for tracking usage and costs
GET /api/mcp/usage/summary
startDate
endDate
{ "totalCost": 45.23, "totalCalls": 1250, "totalInputTokens": 2500000, "totalOutputTokens": 750000, "byProvider": { "anthropic": { "cost": 30.15, "calls": 800 }, "openai": { "cost": 15.08, "calls": 450 } }, "byModel": { "claude-3-5-sonnet": { "cost": 25.00, "calls": 600 }, "gpt-4o": { "cost": 15.08, "calls": 450 } }, "period": { "start": "2026-01-01T00:00:00Z", "end": "2026-01-19T23:59:59Z" } }
curl -X GET "https://costhawk.ai/api/mcp/usage/summary?startDate=2026-01-01" \ -H "Authorization: Bearer ch_sk_your_token"
GET /api/mcp/usage/by-tag
tagKey
project
environment
limit
[ { "tag": "project", "value": "chatbot", "cost": 25.50, "calls": 600, "percentage": 56.4 }, { "tag": "project", "value": "search", "cost": 19.73, "calls": 650, "percentage": 43.6 } ]
curl -X GET "https://costhawk.ai/api/mcp/usage/by-tag?tagKey=project" \ -H "Authorization: Bearer ch_sk_your_token"