> ## 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 evaluations for a single inference result

> Create evaluations for a specific turn in a conversation. This is useful for production monitoring where you want to evaluate turn-by-turn performance. See [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /evaluations/fromInferenceResult
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:
  /evaluations/fromInferenceResult:
    post:
      tags:
        - evaluations
      summary: Create evaluations for a single inference result
      description: >-
        Create evaluations for a specific turn in a conversation. This is useful
        for production monitoring where you want to evaluate turn-by-turn
        performance. See
        [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).
      operationId: createEvaluationsFromInferenceResult
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - inferenceResultId
              properties:
                metrics:
                  type: array
                  description: >-
                    Metrics to evaluate. Optional if specificationIds is
                    provided or the product has specifications with linked
                    metrics.
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: id_123
                      name:
                        type: string
                        example: Example Name
                      score:
                        type: number
                        example: 0.95
                inferenceResultId:
                  type: string
                  description: The ID of the inference result (turn) to evaluate
                  example: ir_123
                specificationIds:
                  type: array
                  description: >-
                    Specification IDs whose linked metrics will be evaluated.
                    Can be combined with metrics; the API merges and
                    deduplicates.
                  items:
                    type: string
      responses:
        '201':
          description: Evaluations created successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Evaluation'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Inference result not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Evaluation:
      type: object
      properties:
        id:
          type: string
          example: eval_123
        metricId:
          type: string
          example: metric_123
        sessionId:
          type: string
          example: session_123
        userId:
          type: string
          nullable: true
          example: user_123
        status:
          type: string
          enum:
            - PENDING
            - PENDING_HUMAN
            - SUCCESS
            - FAILED
            - SKIPPED
            - CANCELLED
          example: SUCCESS
        testCaseId:
          type: string
          nullable: true
          example: tc_123
        inferenceResultId:
          type: string
          nullable: true
          example: ir_123
        score:
          type: number
          nullable: true
          example: 0.95
        reason:
          type: string
          nullable: true
          example: High quality response
        error:
          type: string
          nullable: true
        canRetry:
          type: boolean
          nullable: true
          example: false
        creditsUsed:
          type: integer
          nullable: true
          example: 1
        conversationSimulatorVersion:
          type: string
          nullable: true
          example: 1.0.0
        humanEvaluatorId:
          type: string
          nullable: true
          description: User ID of the human evaluator
        humanEvaluatorStartedAt:
          type: string
          format: date-time
          nullable: true
        humanScore:
          type: number
          nullable: true
          description: Human-provided annotation score
        humanReason:
          type: string
          nullable: true
          description: Human-provided annotation reason
        humanEvaluatorFinishedAt:
          type: string
          nullable: true
          format: date-time
          description: Timestamp when human evaluation was submitted
        failedTurns:
          type: array
          items:
            type: string
          description: Conversation turns that failed
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        evaluatedAt:
          type: string
          format: date-time
          nullable: true
        metricLegacyAt:
          type: string
          format: date-time
          nullable: true
        metricDisabledAt:
          type: string
          format: date-time
          nullable: true
        testCaseLegacyAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - metricId
        - sessionId
        - userId
        - status
        - testCaseId
        - inferenceResultId
        - score
        - reason
        - error
        - canRetry
        - creditsUsed
        - conversationSimulatorVersion
        - humanEvaluatorId
        - humanEvaluatorStartedAt
        - humanScore
        - humanReason
        - humanEvaluatorFinishedAt
        - failedTurns
        - deletedAt
        - evaluatedAt
        - metricLegacyAt
        - metricDisabledAt
        - testCaseLegacyAt
    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-...`.

````