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

# Create comment

> Adds a free-form annotation to an inference result, for error analysis outside the metric-bound evaluation flow. An inference result can hold many comments.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /comments
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /comments:
    post:
      tags:
        - comments
      summary: Create comment
      description: >-
        Adds a free-form annotation to an inference result, for error analysis
        outside the metric-bound evaluation flow. An inference result can hold
        many comments.
      operationId: createComment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommentRequest'
      responses:
        '201':
          description: Comment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateCommentRequest:
      type: object
      properties:
        inferenceResultId:
          type: string
          description: Inference result the comment annotates
          example: inferenceResult_123
        text:
          type: string
          minLength: 1
          maxLength: 10000
          description: Free-form annotation text
          example: Agent hallucinated the price.
      required:
        - inferenceResultId
        - text
    Comment:
      type: object
      properties:
        id:
          type: string
          example: comment_123
        inferenceResultId:
          type: string
          example: inferenceResult_123
        text:
          type: string
          example: Agent hallucinated the price.
        userId:
          type: string
          nullable: true
          example: user_123
        userName:
          type: string
          nullable: true
          example: John Doe
        userEmail:
          type: string
          nullable: true
          format: email
          example: user@example.com
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - inferenceResultId
        - text
        - userId
        - userName
        - userEmail
        - createdAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````