Skip to main content
curl --request POST \
  --url https://app.voker.ai/api/v1/events \
  --header "Authorization: Bearer $VOKER_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "agent": "customer-support-agent",
    "agent_version": "v1",
    "event_name": "llm",
    "fingerprint_id": "123",
    "person": "user_123",
    "properties": {
      "api": "openai-chat-completions",
      "inputs": {
        "messages": [
          {
            "content": "You are a helpful assistant.",
            "role": "system"
          },
          {
            "content": "Can you help me?",
            "role": "user"
          }
        ],
        "model": "gpt-4o"
      },
      "output": {
        "choices": [
          {
            "finish_reason": "stop",
            "index": 0,
            "message": {
              "content": "Hello! How can I assist you today?",
              "role": "assistant"
            }
          }
        ],
        "id": "chatcmpl-123",
        "model": "gpt-4o-2024-08-06",
        "usage": {
          "completion_tokens": 9,
          "completion_tokens_details": {
            "accepted_prediction_tokens": 0,
            "audio_tokens": 0,
            "reasoning_tokens": 0,
            "rejected_prediction_tokens": 0
          },
          "prompt_tokens": 99,
          "prompt_tokens_details": {
            "audio_tokens": 0,
            "cached_tokens": 0
          },
          "total_tokens": 108
        }
      }
    },
    "session": "session_456"
  }'
Creating an event requires supplying a fingerprint. See how to create a fingerprint here.
Agents, Agent Versions, People, and Sessions that are provided but do not exist will be created.

Create Event

POST /api/v1/events

Request body

event_name
string
required
Type of the event. Currently, only "llm" is supported.
properties
object
required
LLM event properties.inputs includes the body of the llm call and output includes the response from the llm call in the provider specific format.
fingerprint_id
string
required
The fingerprint of the client that generated the event.
agent
string
required
The name of the agent associated with the event. (If this agent does not exist, it will be created.)
agent_version
string
The name of the agent version associated with the event. (If this agent version does not exist, it will be created. If an agent version is not supplied, a default version will be used.)
person
string
The unique identifier of the person associated with the event.If the person does not exist, it will be created.
session
string
required
The unique identifier of the session associated with the event.
Responses
Successful response.
{ "type": "fingerprint-not-found" }