> ## 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.

# Submit a human evaluation or annotation score

> Submit a score and optional reason. On a PENDING_HUMAN evaluation of a HUMAN_EVALUATION metric, it checks user group permissions, writes both score sets on the evaluation and sets its status to SUCCESS. On any other status of a HUMAN_EVALUATION metric, the caller must claim the evaluation first, and the score stays on the evaluation. On an AI-judged metric the score is an annotation, and annotating needs no claim. The annotation belongs to the case (the session, or the turn of a turn-level evaluation) and the metric, not to this evaluation. Every revision of the metric shows it, and a second submit on any revision corrects it. The submit makes the caller the annotator and writes no field of the evaluation, so the AI score, reason and status stay untouched. Refused on outdated evaluations. See [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).

> [!WARNING]
>
> You are reading the docs of Galtea 5.20. [Read this page in the latest version](https://docs.galtea.ai/api-reference/evaluations/submit-a-human-evaluation-or-annotation-score.md).


## OpenAPI

````yaml /v5.20/openapi.json post /evaluations/{id}/submit
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/{id}/submit:
    post:
      tags:
        - evaluations
      summary: Submit a human evaluation or annotation score
      description: >-
        Submit a score and optional reason. On a PENDING_HUMAN evaluation of a
        HUMAN_EVALUATION metric, it checks user group permissions, writes both
        score sets on the evaluation and sets its status to SUCCESS. On any
        other status of a HUMAN_EVALUATION metric, the caller must claim the
        evaluation first, and the score stays on the evaluation. On an AI-judged
        metric the score is an annotation, and annotating needs no claim. The
        annotation belongs to the case (the session, or the turn of a turn-level
        evaluation) and the metric, not to this evaluation. Every revision of
        the metric shows it, and a second submit on any revision corrects it.
        The submit makes the caller the annotator and writes no field of the
        evaluation, so the AI score, reason and status stay untouched. Refused
        on outdated evaluations. See
        [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).
      operationId: submitHumanEvaluation
      parameters:
        - schema:
            type: string
            description: Evaluation ID
            example: eval_123
          required: true
          description: Evaluation ID
          name: id
          in: path
        - $ref: '#/components/parameters/Prefer'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitHumanEvaluationBody'
      responses:
        '200':
          description: >-
            Evaluation submitted successfully. The body is the resource as its
            GET answers it.
          headers:
            Content-Location:
              schema:
                type: string
                description: >-
                  The path of the resource in the body; absent when there is no
                  body
              required: false
              description: >-
                The path of the resource in the body; absent when there is no
                body
            Preference-Applied:
              schema:
                type: string
                enum:
                  - return=minimal
                description: 'Present when the API honored `Prefer: return=minimal`'
              required: false
              description: 'Present when the API honored `Prefer: return=minimal`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evaluation'
        '204':
          description: >-
            No body: the client sent `Prefer: return=minimal`, or the read after
            the write failed.
          headers:
            Preference-Applied:
              schema:
                type: string
                enum:
                  - return=minimal
                description: 'Present when the API honored `Prefer: return=minimal`'
              required: false
              description: 'Present when the API honored `Prefer: return=minimal`'
        '400':
          description: Invalid score or evaluation not in PENDING_HUMAN status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            User may not evaluate or annotate this evaluation, or another user
            claimed this HUMAN_EVALUATION evaluation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Evaluation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    Prefer:
      schema:
        $ref: '#/components/schemas/Prefer'
      required: false
      description: >-
        Send `return=minimal` to get no body back from a write and skip reading
        the resource: a create answers `201` with only `Location`, and an update
        answers `204`.
      name: Prefer
      in: header
  schemas:
    SubmitHumanEvaluationBody:
      type: object
      properties:
        score:
          type: number
          minimum: 0
          maximum: 1
          example: 0.95
          description: The evaluation score (0-1)
        reason:
          type: string
          nullable: true
          example: Evaluation reason
          description: Optional reason for the score
      required:
        - score
    Evaluation:
      type: object
      properties:
        id:
          type: string
          example: eval_123
        metricId:
          type: string
          example: metric_123
        sessionId:
          type: string
          example: session_123
        productId:
          type: string
          nullable: true
          example: product_123
          description: Product the evaluated session belongs to
        userId:
          type: string
          nullable: true
          example: user_123
        status:
          type: string
          enum:
            - PENDING
            - PENDING_HUMAN
            - SUCCESS
            - FAILED
            - SKIPPED
            - CANCELLED
            - OUTDATED
          example: SUCCESS
        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
          example: false
        creditsUsed:
          type: integer
          nullable: true
          example: 1
        judgeInputTokens:
          type: integer
          nullable: true
          example: 4100
          description: Tokens the judge received, prompt plus session content
        judgeOutputTokens:
          type: integer
          nullable: true
          example: 16800
          description: Tokens the judge produced, reasoning included
        judgeReasoningTokens:
          type: integer
          nullable: true
          example: 12400
          description: Reasoning tokens, a subset of judgeOutputTokens
        conversationSimulatorVersion:
          type: string
          nullable: true
          example: 1.0.0
        humanEvaluatorId:
          type: string
          nullable: true
          description: >-
            The human evaluator of a HUMAN_EVALUATION metric. On an AI-judged
            metric, the annotator of the case annotation, or null when the case
            has none.
        humanEvaluatorStartedAt:
          type: string
          nullable: true
          format: date-time
          description: >-
            When the human evaluator claimed this HUMAN_EVALUATION evaluation.
            Always null on an AI-judged metric, because annotating needs no
            claim.
        humanScore:
          type: number
          nullable: true
          description: >-
            Human-provided score. On a metric a judge scores, it is the
            annotation of the case (the session, or this turn), which every
            revision of the metric shows.
        humanReason:
          type: string
          nullable: true
          description: >-
            Human-provided reason, from the same annotation as humanScore on a
            metric a judge scores.
        humanEvaluatorFinishedAt:
          type: string
          nullable: true
          format: date-time
          description: >-
            When the human evaluator submitted this HUMAN_EVALUATION evaluation.
            On an AI-judged metric, when the case annotation was last written.
        failedTurns:
          type: array
          items:
            type: string
          description: Conversation turns that failed
        monitorId:
          type: string
          nullable: true
          description: ID of the monitor that dispatched this evaluation
        monitorSettledAtTurn:
          type: integer
          nullable: true
          description: Session turn count when the monitor scored it
        monitorSamplingPercentage:
          type: number
          nullable: true
          description: Sampling percentage in effect when the monitor scored this session
        runId:
          type: string
          nullable: true
          description: ID of the run that launched this evaluation
        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
        metricRevisionNumber:
          type: integer
          nullable: true
          description: >-
            The evaluated revision's number within its metric (R1, R2, R3). Null
            when the metric is not loaded.
          example: 3
        metricRevisionName:
          type: string
          nullable: true
          description: >-
            The evaluated revision's own name, or null when it has none or the
            metric is not loaded.
        passed:
          type: boolean
          nullable: true
          description: >-
            Whether the reported score (the reviewer's when set, else the
            judge's) reaches the metric's pass threshold. Null when the
            evaluation has no reported score, is outdated or deleted, is a long
            classifier input, or its metric is not loaded.
        metricPassThreshold:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            The pass threshold that decides `passed`: the metric's, copied onto
            the evaluation when it was created.
        metricDisabledAt:
          type: string
          format: date-time
          nullable: true
        metricExcludedFromAnalyticsAt:
          type: string
          format: date-time
          nullable: true
        metricExcludedByUserId:
          type: string
          nullable: true
        testCaseLegacyAt:
          type: string
          format: date-time
          nullable: true
        scoreBreakdown:
          type: object
          nullable: true
          properties:
            version:
              type: integer
            model:
              type: string
            type:
              type: string
              enum:
                - yes_no
                - scale
            value:
              type: number
            confidence:
              type: number
              nullable: true
            pYes:
              type: number
              minimum: 0
              maximum: 1
            goodAnswer:
              type: string
              enum:
                - 'yes'
                - 'no'
            probabilities:
              type: object
              additionalProperties:
                type: number
              description: Per level index, the "does not apply" index included.
            levelScores:
              type: array
              items:
                type: number
            doesNotApply:
              type: boolean
              description: Whether the question had a "does not apply" level.
          required:
            - version
            - model
            - type
            - value
            - confidence
          description: >-
            CLASSIFIER only: what the classifier answered; null for every other
            source.
        confidence:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          example: 0.9
          description: >-
            CLASSIFIER only: how sure the classifier was, from 0 to 1; null for
            every other source. Values do not compare across question types.
        dataRegion:
          type: string
          nullable: true
          enum:
            - GLOBAL
            - EU
            - null
          example: EU
          description: >-
            The data region the evaluation was dispatched with: EU keeps its
            model calls on EU deployments. Null when unknown: an evaluation
            dispatched before the region was recorded, or never sent to the
            evaluator.
        longInput:
          type: boolean
          description: >-
            True for a CLASSIFIER evaluation whose input ran past what the
            classifier scores reliably (CLASSIFIER_RELIABLE_INPUT_TOKENS judge
            input tokens) and that no reviewer has scored; false for every other
            evaluation.
      required:
        - id
        - metricId
        - sessionId
        - productId
        - userId
        - status
        - inferenceResultId
        - score
        - reason
        - error
        - canRetry
        - creditsUsed
        - judgeInputTokens
        - judgeOutputTokens
        - judgeReasoningTokens
        - conversationSimulatorVersion
        - humanEvaluatorId
        - humanEvaluatorStartedAt
        - humanScore
        - humanReason
        - humanEvaluatorFinishedAt
        - failedTurns
        - monitorId
        - monitorSettledAtTurn
        - monitorSamplingPercentage
        - runId
        - deletedAt
        - evaluatedAt
        - metricLegacyAt
        - passed
        - metricPassThreshold
        - metricDisabledAt
        - metricExcludedFromAnalyticsAt
        - metricExcludedByUserId
        - testCaseLegacyAt
        - scoreBreakdown
        - confidence
        - dataRegion
        - longInput
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    Prefer:
      type: string
      description: >-
        Send `return=minimal` to get no body back from a write and skip reading
        the resource: a create answers `201` with only `Location`, and an update
        answers `204`.
      example: return=minimal
  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-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.