cURL
curl --request POST \ --url http://localhost:8000/api/usage/events \ --header 'Content-Type: application/json' \ --data ' { "session_id": "<string>", "user_id": "<string>", "provider": "<string>", "event_type": "stt_minutes", "quantity": 123, "unit_cost": 123, "total_cost": 123, "agent_id": "<string>" } '
{ "id": "<string>", "session_id": "<string>", "user_id": "<string>", "provider": "<string>", "event_type": "stt_minutes", "quantity": "<string>", "unit_cost": "<string>", "total_cost": "<string>", "created_at": "2023-11-07T05:31:56Z", "agent_id": "<string>" }
Log a usage event from the agent worker.
stt_minutes
llm_tokens
tts_characters
Successful Response
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$