Ingest cost event
token_input, token_output, and model in your quality signal POST.
Body:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Track and query AI cost data via the REST API.
POST /api/v1/costs/events
token_input, token_output, and model in your quality signal POST.
Body:
{
"agent_id": "invoice-processor-v2",
"job_id": "job-001",
"model": "gpt-4o",
"provider": "openai",
"input_tokens": 1247,
"output_tokens": 312
}
{
"event_id": "uuid",
"cost_usd": 0.0343,
"cost_display": 0.03,
"display_currency": "USD"
}
GET /api/v1/costs/summary?days=30
{
"period_days": 30,
"total_cost_usd": 5481.89,
"total_cost_display": 5481.89,
"unattributed_cost_usd": 0,
"display_currency": "USD",
"daily_trend": [
{
"date": "2026-02-22",
"cost_usd": 190.54,
"cost_display": 190.54
}
]
}
GET /api/v1/costs/agents/{agent_id}?days=30
GET /api/v1/costs/departments
POST /api/v1/costs/budgets
{
"department": "Finance",
"month": "2026-03-01",
"budget_amount": 5000.00
}