Get Costs
string
required
/v1/costs
Query Parameters
string
Filter by agent ID
string
Filter by customer ID
string
Start date (ISO 8601)
string
End date (ISO 8601)
array
List of costs
number
Total cost amount
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
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
}
Query and manage cost allocation
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
}