> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voker.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Event

> Create an [event](https://app.voker.ai/docs/concepts/events#events).

Creating an endpoint requires supplying a fingerprint. See how to create a fingerprint [here](https://app.voker.ai/docs/concepts/events#creating-a-fingerprint).

Agents, Agent Versions, People and Sessions that are provided but do not exist will be created.



## OpenAPI

````yaml /openapi.json post /api/v1/events
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://evals.voker.ai/api/v1
security: []
paths:
  /api/v1/events:
    post:
      summary: Create Event
      description: >-
        Create an [event](https://app.voker.ai/docs/concepts/events#events).


        Creating an endpoint requires supplying a fingerprint. See how to create
        a fingerprint
        [here](https://app.voker.ai/docs/concepts/events#creating-a-fingerprint).


        Agents, Agent Versions, People and Sessions that are provided but do not
        exist will be created.
      operationId: create_event_api_v1_events_post
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            examples:
              - Bearer 123
            type: string
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEventPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FingerprintNotFoundResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionIdEmptyResponse'
          description: Unprocessable Content
components:
  schemas:
    CreateEventPayload:
      properties:
        event_name:
          type: string
          const: llm
          title: Event Name
          description: Type of the event. Currently, only "llm" is supported.
        properties:
          $ref: '#/components/schemas/EventProperties'
          description: >-
            Event specific properties. For LLM events, this includes the inputs
            and outputs of the LLM call.
        fingerprint_id:
          type: string
          format: uuid
          title: Fingerprint Id
          description: >-
            The
            [fingerprint](https://app.voker.ai/docs/concepts/events#fingerprints)
            of the client that generated the event.
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
          description: >-
            The name of the
            [agent](https://app.voker.ai/docs/concepts/agents#agents) associated
            with the event.

                    If this agent does not exist, it will be created.
                    
        agent_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Version
          description: >-
            The name of the [agent
            version](https://app.voker.ai/docs/concepts/agents#agent-versions)
            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:
          anyOf:
            - type: string
            - type: 'null'
          title: Person
          description: >-
            The unique identifier of the
            [person](https://app.voker.ai/docs/concepts/people) associated with
            the event.

                    If the person does not exist, it will be created.
                    
        session:
          type: string
          title: Session
          description: >-
            The unique identifier of the
            [session](https://app.voker.ai/docs/concepts/events#event-sessions)
            associated with the event.
      type: object
      required:
        - event_name
        - properties
        - fingerprint_id
        - session
      title: CreateEventPayload
      description: >-
        Create an event.


        See [Creating an
        Event](https://app.voker.ai/docs/concepts/events#creating-an-event-via-sdk)
        for more information.
      examples:
        - 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
    FingerprintNotFoundResponse:
      properties:
        type:
          type: string
          const: fingerprint-not-found
          title: Type
          default: fingerprint-not-found
      type: object
      title: FingerprintNotFoundResponse
      description: Response model for fingerprint not found errors.
    SessionIdEmptyResponse:
      properties:
        type:
          type: string
          const: session-id-empty
          title: Type
          default: session-id-empty
      type: object
      title: SessionIdEmptyResponse
      description: Response model for session id empty errors.
    EventProperties:
      properties:
        api:
          type: string
          enum:
            - openai-chat-completions
            - openai-responses
            - gemini-models
            - gemini-interactions
            - anthropic-messages
            - anthropic-beta-messages
            - aisdk
          title: Api
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
        output:
          additionalProperties: true
          type: object
          title: Output
      type: object
      required:
        - api
        - inputs
        - output
      title: EventProperties
      description: >-
        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.

````