GET /ai/spend
What the cloud model steps have cost today, this week and this month, with this month's cost by macro.
Details #
Amounts are in cents. Steps that run on this Mac with Apple Intelligence cost nothing and are not counted.
curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:48080/ai/spend
{ "today": 12.5, "week": 80.2, "month": 311, "monthlyCapDollars": 5, "byMacro": [ { "macroId": "m1", "name": "Tidy notes", "cents": 280, "todayCents": 12.5 } ] }
monthlyCapDollars is null when Settings > AI has no monthly cap. Make with AI and Fix with AI appear as one row without a macroId.
Parameters #
curl --unix-socket "$SWITCHBOARD_HOME/engine.sock" -X GET http://localhost/ai/spend
What model steps have cost: today, this week, this month, and this month by macro. The Unix socket needs no token; loopback 127.0.0.1:48080 needs Authorization: Bearer <api-token>.