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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Report batch evaluation results

> Report the rows of a batch evaluation against an experiment, so its scores and progress show up in the app. This is the second half of an SDK batch evaluation: create the experiment with `POST /api/experiment/init`, then post rows here as they finish. Identify the experiment by either `experiment_id` or `experiment_slug`. Bodies up to 267 MB are accepted, sized for one dataset row with ten 20 MB images inline. A larger body is refused with `evaluation_log_results_too_large`.



## OpenAPI

````yaml POST /api/v1/evaluations/batch/log_results
openapi: 3.1.0
info:
  title: LangWatch API
  description: LangWatch openapi spec
  version: 1.0.0
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/v1/evaluations/batch/log_results:
    post:
      tags:
        - Evaluations
      summary: Report batch evaluation results
      description: >-
        Report the rows of a batch evaluation against an experiment, so its
        scores and progress show up in the app. This is the second half of an
        SDK batch evaluation: create the experiment with `POST
        /api/experiment/init`, then post rows here as they finish. Identify the
        experiment by either `experiment_id` or `experiment_slug`. Bodies up to
        267 MB are accepted, sized for one dataset row with ten 20 MB images
        inline. A larger body is refused with
        `evaluation_log_results_too_large`.
      operationId: postApiEvaluationsBatchLogResults
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                run_id:
                  type: string
                workflow_version_id:
                  type:
                    - string
                    - 'null'
                progress:
                  type:
                    - number
                    - 'null'
                total:
                  type:
                    - number
                    - 'null'
                dataset:
                  type: array
                  items:
                    type: object
                    properties:
                      index:
                        type: number
                      target_id:
                        type:
                          - string
                          - 'null'
                      entry:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      predicted:
                        anyOf:
                          - type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          - type: 'null'
                      cost:
                        type:
                          - number
                          - 'null'
                      duration:
                        type:
                          - number
                          - 'null'
                      error:
                        type:
                          - string
                          - 'null'
                      trace_id:
                        type:
                          - string
                          - 'null'
                    required:
                      - index
                      - entry
                evaluations:
                  type: array
                  items:
                    type: object
                    properties:
                      evaluator:
                        type: string
                      name:
                        type:
                          - string
                          - 'null'
                      target_id:
                        type:
                          - string
                          - 'null'
                      status:
                        anyOf:
                          - type: string
                            const: processed
                          - type: string
                            const: skipped
                          - type: string
                            const: error
                      index:
                        type: number
                      duration:
                        type:
                          - number
                          - 'null'
                      inputs:
                        anyOf:
                          - type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          - type: 'null'
                      score:
                        type:
                          - number
                          - 'null'
                      label:
                        type:
                          - string
                          - 'null'
                      passed:
                        type:
                          - boolean
                          - 'null'
                      details:
                        type:
                          - string
                          - 'null'
                      cost:
                        type:
                          - number
                          - 'null'
                    required:
                      - evaluator
                      - status
                      - index
                experiment_id:
                  type:
                    - string
                    - 'null'
                experiment_slug:
                  type:
                    - string
                    - 'null'
                workflow_id:
                  type:
                    - string
                    - 'null'
                name:
                  type:
                    - string
                    - 'null'
                targets:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          prompt_id:
                            type:
                              - string
                              - 'null'
                          prompt_version:
                            type:
                              - number
                              - 'null'
                          agent_id:
                            type:
                              - string
                              - 'null'
                          evaluator_id:
                            type:
                              - string
                              - 'null'
                          model:
                            type:
                              - string
                              - 'null'
                          metadata:
                            anyOf:
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type:
                                    - string
                                    - number
                                    - boolean
                              - type: 'null'
                          type:
                            anyOf:
                              - type: string
                                const: prompt
                              - type: string
                                const: agent
                              - type: string
                                const: evaluator
                              - type: string
                                const: workflow
                              - type: string
                                const: custom
                        required:
                          - id
                          - name
                    - type: 'null'
                timestamps:
                  type: object
                  properties:
                    created_at:
                      type:
                        - number
                        - 'null'
                    finished_at:
                      type:
                        - number
                        - 'null'
                    stopped_at:
                      type:
                        - number
                        - 'null'
                expected:
                  anyOf:
                    - type: object
                      properties:
                        dataset:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        evaluations:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - dataset
                        - evaluations
                    - type: 'null'
              required:
                - run_id
      responses:
        '200':
          description: The rows were recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable confirmation
                required:
                  - message
        '400':
          description: >-
            The request was not sent as application/json, failed validation,
            named neither experiment_id nor experiment_slug, or carried
            timestamps in seconds rather than milliseconds
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    description: Set when the request was rejected before validation
                    type: string
                  error:
                    description: Set when the body parsed and then failed validation
                    type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    description: Stable failure code, on the failures that carry one
                    type: string
                  meta:
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - error
        '403':
          description: The API key lacks evaluations:manage
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    description: Stable failure code, on the failures that carry one
                    type: string
                  meta:
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - error
        '413':
          description: >-
            The body is larger than the organization accepts in one request;
            `error.code` is `evaluation_log_results_too_large` and
            `error.meta.maxBytes` is the limit
          content: {}
      security:
        - project_api_key: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````

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