Skip to main content
POST
/
events
Create a new event
curl --request POST \
  --url https://api.honeyhive.ai/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "{\"event_type\":\"model\",\"event_name\":\"llm_call\",\"inputs\":{\"prompt\":\"hello\"},\"outputs\":{\"response\":\"hi\"},\"config\":{\"model\":\"gpt-4\",\"temperature\":0.7},\"metadata\":{\"cost\":0.00008,\"completion_tokens\":23,\"prompt_tokens\":35},\"source\":\"sdk-python\",\"duration\":1500,\"start_time\":1700000000000,\"end_time\":1700000001500}"
}
'
{
  "event_id": "7f22137a-6911-4ed3-bc36-110f1dde6b66",
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event
string
required

JSON-encoded event object string. Must be valid JSON containing at minimum event_type (one of: chain, model, tool, session) and inputs (object). Fields like event_id and session_id are auto-generated if not provided.

Response

Event created successfully

Response after creating an event

success
boolean
required
event_id
string