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

# Push logs

> Push logs



## OpenAPI

````yaml /public-apis/openapi/logging.json post /v1/logging
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - logging
  description: API documentation for Maxim SDK logging endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/logging:
    post:
      tags:
        - SDK Logging
      summary: Push logs
      description: Push logs
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/TraceStart'
                - $ref: '#/components/schemas/TraceEnd'
                - $ref: '#/components/schemas/TraceAddGeneration'
                - $ref: '#/components/schemas/TraceAddInput'
                - $ref: '#/components/schemas/TraceAddSpan'
                - $ref: '#/components/schemas/TraceAddMetadata'
                - $ref: '#/components/schemas/TraceAddEvent'
                - $ref: '#/components/schemas/TraceAddFeedback'
                - $ref: '#/components/schemas/TraceAddRetrieval'
                - $ref: '#/components/schemas/TraceAddTag'
                - $ref: '#/components/schemas/TraceAddToolCall'
                - $ref: '#/components/schemas/TraceAddOutput'
                - $ref: '#/components/schemas/TraceEvaluate'
                - $ref: '#/components/schemas/TraceAddMetric'
                - $ref: '#/components/schemas/TraceAddToSession'
                - $ref: '#/components/schemas/TraceAddAttachment'
                - $ref: '#/components/schemas/SessionCreate'
                - $ref: '#/components/schemas/SessionEnd'
                - $ref: '#/components/schemas/SessionAddTrace'
                - $ref: '#/components/schemas/SessionAddFeedback'
                - $ref: '#/components/schemas/SessionAddTag'
                - $ref: '#/components/schemas/SessionEvaluate'
                - $ref: '#/components/schemas/SessionAddMetric'
                - $ref: '#/components/schemas/GenerationAddTraceGeneration'
                - $ref: '#/components/schemas/GenerationAddSpanGeneration'
                - $ref: '#/components/schemas/GenerationAddMessage'
                - $ref: '#/components/schemas/GenerationEnd'
                - $ref: '#/components/schemas/GenerationError'
                - $ref: '#/components/schemas/GenerationEvaluate'
                - $ref: '#/components/schemas/GenerationAddMetadata'
                - $ref: '#/components/schemas/GenerationAddResult'
                - $ref: '#/components/schemas/GenerationSetModel'
                - $ref: '#/components/schemas/GenerationSetModelParameters'
                - $ref: '#/components/schemas/GenerationAddTag'
                - $ref: '#/components/schemas/GenerationAddMetric'
                - $ref: '#/components/schemas/GenerationAddAttachment'
                - $ref: '#/components/schemas/SpanAddTraceSpan'
                - $ref: '#/components/schemas/SpanEnd'
                - $ref: '#/components/schemas/SpanEvaluate'
                - $ref: '#/components/schemas/SpanAddEvent'
                - $ref: '#/components/schemas/SpanAddGeneration'
                - $ref: '#/components/schemas/SpanAddMetadata'
                - $ref: '#/components/schemas/SpanAddRetrieval'
                - $ref: '#/components/schemas/SpanAddSpan'
                - $ref: '#/components/schemas/SpanAddToolCall'
                - $ref: '#/components/schemas/SpanAddTag'
                - $ref: '#/components/schemas/SpanAddError'
                - $ref: '#/components/schemas/SpanAddAttachment'
                - $ref: '#/components/schemas/RetrievalAddTag'
                - $ref: '#/components/schemas/RetrievalAddMetadata'
                - $ref: '#/components/schemas/RetrievalAddInput'
                - $ref: '#/components/schemas/RetrievalAddOutput'
                - $ref: '#/components/schemas/RetrievalEnd'
                - $ref: '#/components/schemas/RetrievalEvaluate'
                - $ref: '#/components/schemas/RetrievalAddMetric'
                - $ref: '#/components/schemas/ToolCallAddError'
                - $ref: '#/components/schemas/ToolCallAddMetadata'
                - $ref: '#/components/schemas/ToolCallAddResult'
                - $ref: '#/components/schemas/ToolCallAddTag'
      responses:
        '200':
          description: Successfully logged message
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Success status
                  entity:
                    type: string
                    description: Entity type
                  action:
                    type: string
                    description: Action performed
                  entityId:
                    type: string
                    description: Unique identifier for the entity
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TraceStart:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - start
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            name:
              type: string
              description: >-
                Name of the trace. If not provided, the trace will be created
                without a name.
            sessionId:
              type: string
              description: >-
                Unique identifier for the session. If not provided, the trace
                will be created without a session.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the trace. If not provided, the trace will be created
                without tags.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Trace: Start'
    TraceEnd:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - end
        entityId:
          type: string
          description: Unique identifier for the trace.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Trace: End'
    TraceAddGeneration:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-generation
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            generationId:
              type: string
              description: Unique identifier for the generation.
            model:
              type: string
              description: Model for the generation.
            provider:
              type: string
              enum:
                - openai
                - bedrock
                - anthropic
                - huggingface
                - azure
                - together
                - groq
                - google
              description: >-
                Provider for the generation. One of: 'openai', 'bedrock',
                'anthropic', 'huggingface', 'azure', 'together', 'groq',
                'google'.
            messages:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                      - user
                      - system
                      - model
                      - chatbot
                      - tool
                    description: Role of the message sender
                  content:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                  description: Content type
                                text:
                                  type: string
                                  description: Text content
                              required:
                                - type
                                - text
                              description: Text content object
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - image_url
                                  description: Content type
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: Image URL
                                    detail:
                                      type: string
                                      enum:
                                        - auto
                                        - low
                                        - high
                                      description: Image detail level
                                  required:
                                    - url
                                  description: Image URL configuration
                              required:
                                - type
                                - image_url
                              description: Image URL content object
                          description: Content schema
                      - nullable: true
                    description: Message content
                  tool_call_id:
                    type: string
                    description: Tool call ID for tool messages
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Tool call identifier
                        type:
                          type: string
                          enum:
                            - function
                          description: Tool call type
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Function name
                            arguments:
                              type: string
                              description: Function arguments as JSON string
                          required:
                            - name
                            - arguments
                          description: Function call details
                      required:
                        - id
                        - type
                        - function
                      description: Tool call object
                    description: Tool calls made by the assistant in this message
                required:
                  - role
                description: Message to send to the model
              description: Messages for the generation.
            modelParameters:
              type: object
              additionalProperties:
                nullable: true
              description: Model parameters for the generation.
            name:
              type: string
              description: >-
                Name of the generation. If not provided, the generation will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the generation. If not provided, the generation will be
                created without tags.
            maximPromptId:
              type: string
              description: 'Unique identifier for the maxim prompt. '
            maximPromptVersionId:
              type: string
              description: 'Unique identifier for the maxim prompt version. '
          required:
            - generationId
            - model
            - provider
            - messages
            - modelParameters
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Generation'
    TraceAddInput:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-input
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            input:
              type: string
              description: Input for the trace.
          required:
            - input
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Input'
    TraceAddSpan:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-span
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            spanId:
              type: string
              description: Unique identifier for the span.
            name:
              type: string
              description: >-
                Name of the span. If not provided, the span will be created
                without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the span. If not provided, the span will be created
                without tags.
          required:
            - spanId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Span'
    TraceAddMetadata:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-metadata
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the trace.
          required:
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Metadata'
    TraceAddEvent:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-event
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            eventId:
              type: string
              description: Unique identifier for the event.
            eventName:
              type: string
              description: Name of the event.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the event. If not provided, the event will be created
                without tags.
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: >-
                Metadata for the event. If not provided, the event will be
                created without metadata.
          required:
            - eventId
            - eventName
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Event'
    TraceAddFeedback:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-feedback
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            feedback:
              type: object
              properties:
                score:
                  type: number
                  description: Score for the feedback.
                comment:
                  type: string
                  description: >-
                    Comment for the feedback. If not provided, the feedback will
                    be created without a comment.
              required:
                - score
              description: Feedback for the trace.
          required:
            - feedback
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Feedback'
    TraceAddRetrieval:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-retrieval
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            retrievalId:
              type: string
              description: Unique identifier for the retrieval.
            name:
              type: string
              description: >-
                Name of the retrieval. If not provided, the retrieval will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the retrieval. If not provided, the retrieval will be
                created without tags.
          required:
            - retrievalId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Retrieval'
    TraceAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Tag'
    TraceAddToolCall:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-tool-call
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            toolCallId:
              type: string
              description: Unique identifier for the tool call.
            toolName:
              type: string
              description: Name of the tool call.
            description:
              type: string
              description: Description of the tool call.
            args:
              type: string
              description: Arguments for the tool call as a JSON string.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the tool call. If not provided, the tool call will be
                created without tags.
          required:
            - toolCallId
            - toolName
            - description
            - args
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Tool Call'
    TraceAddOutput:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-output
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            output:
              type: string
              description: Output for the trace.
          required:
            - output
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Output'
    TraceEvaluate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - evaluate
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            evaluators:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                Evaluators for the trace. If not provided, the trace will be
                created without evaluators.
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Variables for the evaluator. If not provided, the evaluator will
                be created without variables.
          required:
            - evaluators
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Evaluate'
    TraceAddMetric:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-metric
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            metricName:
              type: string
              description: Name of the metric.
            metricValue:
              type: number
              description: Value of the metric.
          required:
            - metricName
            - metricValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Metric'
    TraceAddToSession:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-to-session
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            sessionId:
              type: string
              description: Unique identifier for the session.
          required:
            - sessionId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add to Session'
    TraceAddAttachment:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - trace
        action:
          type: string
          enum:
            - add-attachment
        entityId:
          type: string
          description: Unique identifier for the trace.
        data:
          type: object
          properties:
            attachmentId:
              type: string
              description: Unique identifier for the attachment.
            url:
              type: string
              format: uri
              description: URL of the attachment.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the attachment. If not provided, the attachment will be
                created without tags.
            metadata:
              type: object
              additionalProperties:
                type: string
              description: >-
                Metadata for the attachment. If not provided, the attachment
                will be created without metadata.
          required:
            - attachmentId
            - url
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Trace: Add Attachment'
    SessionCreate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - create
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            name:
              type: string
              description: >-
                Name of the session. If not provided, the session will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the session. If not provided, the session will be
                created without tags.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Session: Create'
    SessionEnd:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - end
        entityId:
          type: string
          description: Unique identifier for the session.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Session: End'
    SessionAddTrace:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - add-trace
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            traceId:
              type: string
              description: Unique identifier for the trace.
            name:
              type: string
              description: >-
                Name of the trace. If not provided, the trace will be created
                without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the trace. If not provided, the trace will be created
                without tags.
          required:
            - traceId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Session: Add Trace'
    SessionAddFeedback:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - add-feedback
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            feedback:
              type: object
              properties:
                score:
                  type: number
                  description: Score for the feedback.
                comment:
                  type: string
                  description: >-
                    Comment for the feedback. If not provided, the feedback will
                    be created without a comment.
              required:
                - score
              description: Feedback for the session.
          required:
            - feedback
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Session: Add Feedback'
    SessionAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Session: Add Tag'
    SessionEvaluate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - evaluate
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            evaluators:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                Evaluators for the session. If not provided, the session will be
                created without evaluators.
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Variables for the evaluator. If not provided, the evaluator will
                be created without variables.
          required:
            - evaluators
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Session: Evaluate'
    SessionAddMetric:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - session
        action:
          type: string
          enum:
            - add-metric
        entityId:
          type: string
          description: Unique identifier for the session.
        data:
          type: object
          properties:
            metricName:
              type: string
              description: Name of the metric.
            metricValue:
              type: number
              description: Value of the metric.
          required:
            - metricName
            - metricValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Session: Add Metric'
    GenerationAddTraceGeneration:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-trace-generation
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            traceId:
              type: string
              description: Unique identifier for the trace.
            model:
              type: string
              description: Model for the generation.
            provider:
              type: string
              enum:
                - openai
                - bedrock
                - anthropic
                - huggingface
                - azure
                - together
                - groq
                - google
              description: Provider for the generation.
            messages:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                      - user
                      - system
                      - model
                      - chatbot
                      - tool
                    description: Role of the message sender
                  content:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                  description: Content type
                                text:
                                  type: string
                                  description: Text content
                              required:
                                - type
                                - text
                              description: Text content object
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - image_url
                                  description: Content type
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: Image URL
                                    detail:
                                      type: string
                                      enum:
                                        - auto
                                        - low
                                        - high
                                      description: Image detail level
                                  required:
                                    - url
                                  description: Image URL configuration
                              required:
                                - type
                                - image_url
                              description: Image URL content object
                          description: Content schema
                      - nullable: true
                    description: Message content
                  tool_call_id:
                    type: string
                    description: Tool call ID for tool messages
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Tool call identifier
                        type:
                          type: string
                          enum:
                            - function
                          description: Tool call type
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Function name
                            arguments:
                              type: string
                              description: Function arguments as JSON string
                          required:
                            - name
                            - arguments
                          description: Function call details
                      required:
                        - id
                        - type
                        - function
                      description: Tool call object
                    description: Tool calls made by the assistant in this message
                required:
                  - role
                description: Message to send to the model
              description: Messages for the generation.
            modelParameters:
              type: object
              additionalProperties:
                nullable: true
              description: Model parameters for the generation.
            name:
              type: string
              description: >-
                Name of the generation. If not provided, the generation will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the generation. If not provided, the generation will be
                created without tags.
            maximPromptId:
              type: string
              description: 'Unique identifier for the maxim prompt. '
            maximPromptVersionId:
              type: string
              description: 'Unique identifier for the maxim prompt version. '
          required:
            - traceId
            - model
            - provider
            - messages
            - modelParameters
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Trace Generation'
    GenerationAddSpanGeneration:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-span-generation
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            spanId:
              type: string
              description: Unique identifier for the span.
            model:
              type: string
              description: Model for the generation.
            provider:
              type: string
              enum:
                - openai
                - bedrock
                - anthropic
                - huggingface
                - azure
                - together
                - groq
                - google
              description: Provider for the generation.
            messages:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                      - user
                      - system
                      - model
                      - chatbot
                      - tool
                    description: Role of the message sender
                  content:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                  description: Content type
                                text:
                                  type: string
                                  description: Text content
                              required:
                                - type
                                - text
                              description: Text content object
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - image_url
                                  description: Content type
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: Image URL
                                    detail:
                                      type: string
                                      enum:
                                        - auto
                                        - low
                                        - high
                                      description: Image detail level
                                  required:
                                    - url
                                  description: Image URL configuration
                              required:
                                - type
                                - image_url
                              description: Image URL content object
                          description: Content schema
                      - nullable: true
                    description: Message content
                  tool_call_id:
                    type: string
                    description: Tool call ID for tool messages
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Tool call identifier
                        type:
                          type: string
                          enum:
                            - function
                          description: Tool call type
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Function name
                            arguments:
                              type: string
                              description: Function arguments as JSON string
                          required:
                            - name
                            - arguments
                          description: Function call details
                      required:
                        - id
                        - type
                        - function
                      description: Tool call object
                    description: Tool calls made by the assistant in this message
                required:
                  - role
                description: Message to send to the model
              description: Messages for the generation.
            modelParameters:
              type: object
              additionalProperties:
                nullable: true
              description: Model parameters for the generation.
            name:
              type: string
              description: >-
                Name of the generation. If not provided, the generation will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the generation. If not provided, the generation will be
                created without tags.
            maximPromptId:
              type: string
              description: 'Unique identifier for the maxim prompt. '
            maximPromptVersionId:
              type: string
              description: 'Unique identifier for the maxim prompt version. '
          required:
            - spanId
            - model
            - provider
            - messages
            - modelParameters
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Span Generation'
    GenerationAddMessage:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-message
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            message:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                      - user
                      - system
                      - model
                      - chatbot
                      - tool
                    description: Role of the message sender
                  content:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                  description: Content type
                                text:
                                  type: string
                                  description: Text content
                              required:
                                - type
                                - text
                              description: Text content object
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - image_url
                                  description: Content type
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: Image URL
                                    detail:
                                      type: string
                                      enum:
                                        - auto
                                        - low
                                        - high
                                      description: Image detail level
                                  required:
                                    - url
                                  description: Image URL configuration
                              required:
                                - type
                                - image_url
                              description: Image URL content object
                          description: Content schema
                      - nullable: true
                    description: Message content
                  tool_call_id:
                    type: string
                    description: Tool call ID for tool messages
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Tool call identifier
                        type:
                          type: string
                          enum:
                            - function
                          description: Tool call type
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Function name
                            arguments:
                              type: string
                              description: Function arguments as JSON string
                          required:
                            - name
                            - arguments
                          description: Function call details
                      required:
                        - id
                        - type
                        - function
                      description: Tool call object
                    description: Tool calls made by the assistant in this message
                required:
                  - role
                description: Message to send to the model
              description: Message for the generation.
          required:
            - message
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Message'
    GenerationEnd:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - end
        entityId:
          type: string
          description: Unique identifier for the generation.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Generation: End'
    GenerationError:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - error
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            errorMessage:
              type: string
              description: Error message.
            errorCode:
              type: string
              description: >-
                Error code. If not provided, the error will be created without a
                code.
            errorType:
              type: string
              description: >-
                Error type. If not provided, the error will be created without a
                type.
          required:
            - errorMessage
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Error'
    GenerationEvaluate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - evaluate
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            evaluators:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                Evaluators for the generation. If not provided, the generation
                will be created without evaluators.
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Variables for the evaluator. If not provided, the evaluator will
                be created without variables.
          required:
            - evaluators
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Evaluate'
    GenerationAddMetadata:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-metadata
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the generation.
          required:
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Metadata'
    GenerationAddResult:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-result
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            result:
              oneOf:
                - $ref: '#/components/schemas/ChatCompletionResult'
                - $ref: '#/components/schemas/TextCompletionResult'
              discriminator:
                propertyName: object
                mapping:
                  chat.completion:
                    $ref: '#/components/schemas/ChatCompletionResult'
                  text_completion:
                    $ref: '#/components/schemas/TextCompletionResult'
              description: Result for the generation (chat or text completion).
          required:
            - result
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Result'
    GenerationSetModel:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - set-model
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            model:
              type: string
              description: Model for the generation.
          required:
            - model
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Set Model'
    GenerationSetModelParameters:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - set-model-parameters
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            modelParameters:
              type: object
              additionalProperties:
                nullable: true
              description: Model parameters for the generation.
          required:
            - modelParameters
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Set Model Parameters'
    GenerationAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Tag'
    GenerationAddMetric:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-metric
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            metricName:
              type: string
              description: Name of the metric.
            metricValue:
              type: number
              description: Value of the metric.
          required:
            - metricName
            - metricValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Metric'
    GenerationAddAttachment:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - generation
        action:
          type: string
          enum:
            - add-attachment
        entityId:
          type: string
          description: Unique identifier for the generation.
        data:
          type: object
          properties:
            attachmentId:
              type: string
              description: Unique identifier for the attachment.
            url:
              type: string
              description: URL of the attachment.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the attachment. If not provided, the attachment will be
                created without tags.
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: >-
                Metadata for the attachment. If not provided, the attachment
                will be created without metadata.
          required:
            - attachmentId
            - url
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Generation: Add Attachment'
    SpanAddTraceSpan:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-trace-span
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            traceId:
              type: string
              description: Unique identifier for the trace.
            name:
              type: string
              description: >-
                Name of the span. If not provided, the span will be created
                without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the span. If not provided, the span will be created
                without tags.
          required:
            - traceId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Trace Span'
    SpanEnd:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - end
        entityId:
          type: string
          description: Unique identifier for the span.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Span: End'
    SpanEvaluate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - evaluate
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            evaluators:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                Evaluators for the span. If not provided, the span will be
                created without evaluators.
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Variables for the evaluator. If not provided, the evaluator will
                be created without variables.
          required:
            - evaluators
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Evaluate'
    SpanAddEvent:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-event
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            eventId:
              type: string
              description: Unique identifier for the event.
            eventName:
              type: string
              description: Name of the event.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the event. If not provided, the event will be created
                without tags.
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the event.
          required:
            - eventId
            - eventName
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Event'
    SpanAddGeneration:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-generation
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            generationId:
              type: string
              description: Unique identifier for the generation.
            model:
              type: string
              description: Model for the generation.
            provider:
              type: string
              enum:
                - openai
                - bedrock
                - anthropic
                - huggingface
                - azure
                - together
                - groq
                - google
              description: Provider for the generation.
            messages:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                      - user
                      - system
                      - model
                      - chatbot
                      - tool
                    description: Role of the message sender
                  content:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                  description: Content type
                                text:
                                  type: string
                                  description: Text content
                              required:
                                - type
                                - text
                              description: Text content object
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - image_url
                                  description: Content type
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: Image URL
                                    detail:
                                      type: string
                                      enum:
                                        - auto
                                        - low
                                        - high
                                      description: Image detail level
                                  required:
                                    - url
                                  description: Image URL configuration
                              required:
                                - type
                                - image_url
                              description: Image URL content object
                          description: Content schema
                      - nullable: true
                    description: Message content
                  tool_call_id:
                    type: string
                    description: Tool call ID for tool messages
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Tool call identifier
                        type:
                          type: string
                          enum:
                            - function
                          description: Tool call type
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Function name
                            arguments:
                              type: string
                              description: Function arguments as JSON string
                          required:
                            - name
                            - arguments
                          description: Function call details
                      required:
                        - id
                        - type
                        - function
                      description: Tool call object
                    description: Tool calls made by the assistant in this message
                required:
                  - role
                description: Message to send to the model
              description: Messages for the generation.
            modelParameters:
              type: object
              additionalProperties:
                nullable: true
              description: Model parameters for the generation.
            name:
              type: string
              description: >-
                Name of the generation. If not provided, the generation will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the generation. If not provided, the generation will be
                created without tags.
            maximPromptId:
              type: string
              description: 'Unique identifier for the maxim prompt. '
            maximPromptVersionId:
              type: string
              description: 'Unique identifier for the maxim prompt version. '
          required:
            - generationId
            - model
            - provider
            - messages
            - modelParameters
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Generation'
    SpanAddMetadata:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-metadata
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the span.
          required:
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Metadata'
    SpanAddRetrieval:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-retrieval
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            retrievalId:
              type: string
              description: Unique identifier for the retrieval.
            name:
              type: string
              description: >-
                Name of the retrieval. If not provided, the retrieval will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the retrieval. If not provided, the retrieval will be
                created without tags.
          required:
            - retrievalId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Retrieval'
    SpanAddSpan:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-span
        entityId:
          type: string
          description: Unique identifier for the parent span.
        data:
          type: object
          properties:
            childSpanId:
              type: string
              description: Unique identifier for the child span.
            name:
              type: string
              description: >-
                Name of the child span. If not provided, the child span will be
                created without a name.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the child span. If not provided, the child span will be
                created without tags.
          required:
            - childSpanId
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Span'
    SpanAddToolCall:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-tool-call
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            toolCallId:
              type: string
              description: Unique identifier for the tool call.
            toolName:
              type: string
              description: Name of the tool call.
            description:
              type: string
              description: Description of the tool call.
            args:
              type: string
              description: Arguments for the tool call as a JSON string.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the tool call. If not provided, the tool call will be
                created without tags.
          required:
            - toolCallId
            - toolName
            - description
            - args
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Tool Call'
    SpanAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Tag'
    SpanAddError:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-error
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            errorId:
              type: string
              description: Unique identifier for the error.
            errorMessage:
              type: string
              description: Error message.
            errorCode:
              type: string
              description: >-
                Error code. If not provided, the error will be created without a
                code.
            errorType:
              type: string
              description: >-
                Error type. If not provided, the error will be created without a
                type.
          required:
            - errorId
            - errorMessage
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Error'
    SpanAddAttachment:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - span
        action:
          type: string
          enum:
            - add-attachment
        entityId:
          type: string
          description: Unique identifier for the span.
        data:
          type: object
          properties:
            attachmentId:
              type: string
              description: Unique identifier for the attachment.
            url:
              type: string
              description: URL of the attachment.
            tags:
              type: object
              additionalProperties:
                type: string
              description: >-
                Tags for the attachment. If not provided, the attachment will be
                created without tags.
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: >-
                Metadata for the attachment. If not provided, the attachment
                will be created without metadata.
          required:
            - attachmentId
            - url
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Span: Add Attachment'
    RetrievalAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Add Tag'
    RetrievalAddMetadata:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - add-metadata
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the retrieval.
          required:
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Add Metadata'
    RetrievalAddInput:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - add-input
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            input:
              type: string
              description: Input for the retrieval.
          required:
            - input
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Add Input'
    RetrievalAddOutput:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - add-output
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            output:
              anyOf:
                - type: string
                - type: array
                  items:
                    type: string
              description: >-
                Output for the retrieval as a JSON string, or an array of JSON
                strings.
          required:
            - output
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Add Output'
    RetrievalEnd:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - end
        entityId:
          type: string
          description: Unique identifier for the retrieval.
      required:
        - repoId
        - entity
        - action
        - entityId
      title: 'Retrieval: End'
    RetrievalEvaluate:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - evaluate
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            evaluators:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                Evaluators for the retrieval. If not provided, the retrieval
                will be created without evaluators.
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Variables for the evaluator. If not provided, the evaluator will
                be created without variables.
          required:
            - evaluators
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Evaluate'
    RetrievalAddMetric:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - retrieval
        action:
          type: string
          enum:
            - add-metric
        entityId:
          type: string
          description: Unique identifier for the retrieval.
        data:
          type: object
          properties:
            metricName:
              type: string
              description: Name of the metric.
            metricValue:
              type: number
              description: Value of the metric.
          required:
            - metricName
            - metricValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'Retrieval: Add Metric'
    ToolCallAddError:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - toolCall
        action:
          type: string
          enum:
            - add-error
        entityId:
          type: string
          description: Unique identifier for the tool call.
        data:
          type: object
          properties:
            errorMessage:
              type: string
              description: Message of the error.
            errorCode:
              type: string
              description: >-
                Code of the error. If not provided, the error will be created
                without a code.
            errorType:
              type: string
              description: >-
                Type of the error. If not provided, the error will be created
                without a type.
          required:
            - errorMessage
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'ToolCall: Add Error'
    ToolCallAddMetadata:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - toolCall
        action:
          type: string
          enum:
            - add-metadata
        entityId:
          type: string
          description: Unique identifier for the tool call.
        data:
          type: object
          properties:
            metadata:
              type: object
              additionalProperties:
                nullable: true
              description: Metadata for the tool call.
          required:
            - metadata
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'ToolCall: Add Metadata'
    ToolCallAddResult:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - toolCall
        action:
          type: string
          enum:
            - add-result
        entityId:
          type: string
          description: Unique identifier for the tool call.
        data:
          type: object
          properties:
            result:
              type: string
              description: Result for the tool call as a JSON string.
          required:
            - result
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'ToolCall: Add Result'
    ToolCallAddTag:
      type: object
      properties:
        repoId:
          type: string
          description: Unique identifier for the repository
        entity:
          type: string
          enum:
            - toolCall
        action:
          type: string
          enum:
            - add-tag
        entityId:
          type: string
          description: Unique identifier for the tool call.
        data:
          type: object
          properties:
            tagKey:
              type: string
              description: Key of the tag.
            tagValue:
              type: string
              description: Value of the tag.
          required:
            - tagKey
            - tagValue
      required:
        - repoId
        - entity
        - action
        - entityId
        - data
      title: 'ToolCall: Add Tag'
    ChatCompletionResult:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - chat.completion
        created:
          type: number
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: number
              message:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - assistant
                  content:
                    type: string
                    nullable: true
                  function_call:
                    type: object
                    properties:
                      arguments:
                        type: string
                      name:
                        type: string
                    required:
                      - arguments
                      - name
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        function:
                          type: object
                          properties:
                            arguments:
                              type: string
                            name:
                              type: string
                          required:
                            - arguments
                            - name
                        type:
                          type: string
                      required:
                        - id
                        - function
                        - type
                required:
                  - role
                  - content
              logprobs:
                type: object
                nullable: true
                properties:
                  text_offset:
                    type: array
                    items:
                      type: number
                  token_logprobs:
                    type: array
                    items:
                      type: number
                  tokens:
                    type: array
                    items:
                      type: string
                  top_logprobs:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: number
              finish_reason:
                type: string
            required:
              - index
              - message
              - logprobs
              - finish_reason
        usage:
          type: object
          properties:
            prompt_tokens:
              type: number
            completion_tokens:
              type: number
            total_tokens:
              type: number
          required:
            - prompt_tokens
            - completion_tokens
            - total_tokens
        cost:
          type: object
          properties:
            input:
              type: number
            output:
              type: number
            total:
              type: number
          required:
            - input
            - output
            - total
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            type:
              type: string
          required:
            - message
      required:
        - id
        - object
        - created
        - model
        - choices
        - usage
      title: Chat Completion Result
    TextCompletionResult:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - text_completion
        created:
          type: number
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: number
              text:
                type: string
              logprobs:
                type: object
                nullable: true
                properties:
                  text_offset:
                    type: array
                    items:
                      type: number
                  token_logprobs:
                    type: array
                    items:
                      type: number
                  tokens:
                    type: array
                    items:
                      type: string
                  top_logprobs:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: number
              finish_reason:
                type: string
            required:
              - index
              - text
              - logprobs
              - finish_reason
        usage:
          type: object
          properties:
            prompt_tokens:
              type: number
            completion_tokens:
              type: number
            total_tokens:
              type: number
          required:
            - prompt_tokens
            - completion_tokens
            - total_tokens
        cost:
          type: object
          properties:
            input:
              type: number
            output:
              type: number
            total:
              type: number
          required:
            - input
            - output
            - total
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            type:
              type: string
          required:
            - message
      required:
        - id
        - object
        - created
        - model
        - choices
        - usage
      title: Text Completion Result
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````