cURL
curl --request GET \ --url https://agentgate.mynewapi.com/api/v1/usage/work-orders/{workOrderId} \ --header 'Authorization: Bearer <token>'
{ "success": true, "data": { "totalInputTokens": 123, "totalOutputTokens": 123, "totalCachedInputTokens": 123, "totalCostUsd": 123, "executionCount": 123, "workOrderCount": 123, "totalDurationMs": 123, "byModel": {}, "periodStart": "<string>", "periodEnd": "<string>" } }
Get usage summary for a specific work order
curl https://agentgate.mynewapi.com/api/v1/usage/work-orders/wo_abc123 \ -H "Authorization: Bearer YOUR_API_KEY"
Show properties
{ "success": true, "data": { "totalInputTokens": 45200, "totalOutputTokens": 8500, "totalCachedInputTokens": 28000, "totalCostUsd": 1.23, "executionCount": 3, "workOrderCount": 1, "totalDurationMs": 125000, "byModel": { "claude-sonnet-4-20250514": { "inputTokens": 45200, "outputTokens": 8500, "cachedInputTokens": 28000, "costUsd": 1.23, "executionCount": 3 } }, "periodStart": "2024-01-15T10:30:00.000Z", "periodEnd": "2024-01-15T10:35:25.000Z" } }