{
"transaction": {
"id": "uuid",
"project_id": "uuid",
"type": "deposit",
"amount": -12450,
"currency": "RUB",
"balance_before": 100000,
"balance_after": 87550,
"balance_currency": "RUB",
"deposit_balance_before": 80000,
"deposit_balance_after": 75000,
"bonus_balance_before": 10000,
"bonus_balance_after": 7000,
"profit_balance_before": 10000,
"profit_balance_after": 10000,
"period_start": "2019-08-24T14:15:22.123Z",
"period_end": "2019-08-24T14:15:22.123Z",
"messages_count": 234,
"total_tokens": 125340,
"description": "string",
"created_at": "2019-08-24T14:15:22.123Z",
"status": "pending",
"is_live": false,
"details_by_agent": {
"agent-123": {
"messages": 145,
"cost": 7820,
"tokens": 78450,
"type": "support",
"is_no_agent": false
},
"no_agent": {
"messages": 50,
"cost": 2500,
"tokens": 12000,
"type": "unknown",
"is_no_agent": true
}
},
"details_by_model": {
"gpt-4o": {
"messages": 200,
"cost": 10200,
"tokens": 105000
}
}
},
"by_agent": [
{
"agent_id": "uuid",
"agent_type": "Analytics",
"agent_name": "Analytics Agent #1",
"messages_count": 150,
"total_tokens": 75000,
"cost": 7500,
"cached_percentage": 25.5,
"prompt_tokens": 50000,
"completion_tokens": 25000,
"cached_tokens": 10000
}
],
"by_model": [
{
"model_name": "gpt-4o-mini",
"messages_count": 100,
"total_tokens": 50000,
"cost": 5000,
"prompt_tokens": 30000,
"completion_tokens": 20000,
"cached_tokens": 5000,
"cached_percentage": 10
}
],
"messages": [
{
"event_id": "uuid",
"dialog_id": "uuid",
"agent_id": "uuid",
"agent_type": "Analytics",
"agent_name": "Analytics Agent #1",
"model_name": "gpt-4o-mini",
"cost": 50,
"total_tokens": 500,
"prompt_tokens": 300,
"completion_tokens": 200,
"cached_tokens": 50,
"cached_percentage": 10,
"created_at": "2019-08-24T14:15:22.123Z"
}
]
}