Skip to main content

Get Costs

GET
string
required
/v1/costs
Query costs with filters.

Query Parameters

agent_id
string
Filter by agent ID
customer_id
string
Filter by customer ID
start_date
string
Start date (ISO 8601)
end_date
string
End date (ISO 8601)
costs
array
List of costs
total
number
Total cost amount
curl -X GET "https://api.valmi.io/v1/costs?agent_id=agent_abc123&start_date=2024-01-01&end_date=2024-01-31" \
  -H "Authorization: Bearer sk_api_abc123xyz"
{
  "costs": [
    {
      "id": "cost_xyz789",
      "agent_id": "agent_abc123",
      "cost_type": "llm",
      "amount": 100.50,
      "currency": "USD",
      "period": "2024-01"
    }
  ],
  "total": 100.50
}