> ## Documentation Index
> Fetch the complete documentation index at: https://openai-hd4n6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get eval run output items

> Get a list of output items for an evaluation run.



## OpenAPI

````yaml api-definition.yaml get /evals/{eval_id}/runs/{run_id}/output_items
openapi: 3.0.0
info:
  title: OpenAI API
  description: >-
    The OpenAI REST API. Please see
    https://platform.openai.com/docs/api-reference for more details.
  version: 2.3.0
  termsOfService: https://openai.com/policies/terms-of-use
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
  - url: https://api.openai.com/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Assistants
    description: Build Assistants that can call models and use tools.
  - name: Audio
    description: Turn audio into text or text into audio.
  - name: Chat
    description: >-
      Given a list of messages comprising a conversation, the model will return
      a response.
  - name: Completions
    description: >-
      Given a prompt, the model will return one or more predicted completions,
      and can also return the probabilities of alternative tokens at each
      position.
  - name: Embeddings
    description: >-
      Get a vector representation of a given input that can be easily consumed
      by machine learning models and algorithms.
  - name: Evals
    description: Manage and run evals in the OpenAI platform.
  - name: Fine-tuning
    description: Manage fine-tuning jobs to tailor a model to your specific training data.
  - name: Batch
    description: Create large batches of API requests to run asynchronously.
  - name: Files
    description: >-
      Files are used to upload documents that can be used with features like
      Assistants and Fine-tuning.
  - name: Uploads
    description: Use Uploads to upload large files in multiple parts.
  - name: Images
    description: Given a prompt and/or an input image, the model will generate a new image.
  - name: Models
    description: List and describe the various models available in the API.
  - name: Moderations
    description: >-
      Given text and/or image inputs, classifies if those inputs are potentially
      harmful.
  - name: Audit Logs
    description: List user actions and configuration changes within this organization.
paths:
  /evals/{eval_id}/runs/{run_id}/output_items:
    get:
      tags:
        - Evals
      summary: Get eval run output items
      description: Get a list of output items for an evaluation run.
      operationId: getEvalRunOutputItems
      parameters:
        - name: eval_id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the evaluation to retrieve runs for.
        - name: run_id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the run to retrieve output items for.
        - name: after
          in: query
          description: >-
            Identifier for the last output item from the previous pagination
            request.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Number of output items to retrieve.
          required: false
          schema:
            type: integer
            default: 20
        - name: status
          in: query
          description: >
            Filter output items by status. Use `failed` to filter by failed
            output

            items or `pass` to filter by passed output items.
          required: false
          schema:
            type: string
            enum:
              - fail
              - pass
        - name: order
          in: query
          description: >-
            Sort order for output items by timestamp. Use `asc` for ascending
            order or `desc` for descending order. Defaults to `asc`.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
      responses:
        '200':
          description: A list of output items for the evaluation run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalRunOutputItemList'
components:
  schemas:
    EvalRunOutputItemList:
      type: object
      title: EvalRunOutputItemList
      description: |
        An object representing a list of output items for an evaluation run.
      properties:
        object:
          type: string
          enum:
            - list
          default: list
          description: |
            The type of this object. It is always set to "list".
          x-stainless-const: true
        data:
          type: array
          description: |
            An array of eval run output item objects.
          items:
            $ref: '#/components/schemas/EvalRunOutputItem'
        first_id:
          type: string
          description: The identifier of the first eval run output item in the data array.
        last_id:
          type: string
          description: The identifier of the last eval run output item in the data array.
        has_more:
          type: boolean
          description: Indicates whether there are more eval run output items available.
      required:
        - object
        - data
        - first_id
        - last_id
        - has_more
      x-oaiMeta:
        name: The eval run output item list object
        group: evals
        example: |
          {
            "object": "list",
            "data": [
              {
                "object": "eval.run.output_item",
                "id": "outputitem_67abd55eb6548190bb580745d5644a33",
                "run_id": "evalrun_67abd54d60ec8190832b46859da808f7",
                "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",
                "created_at": 1739314509,
                "status": "pass",
                "datasource_item_id": 137,
                "datasource_item": {
                    "teacher": "To grade essays, I only check for style, content, and grammar.",
                    "student": "I am a student who is trying to write the best essay."
                },
                "results": [
                  {
                    "name": "String Check Grader",
                    "type": "string-check-grader",
                    "score": 1.0,
                    "passed": true,
                  }
                ],
                "sample": {
                  "input": [
                    {
                      "role": "system",
                      "content": "You are an evaluator bot..."
                    },
                    {
                      "role": "user",
                      "content": "You are assessing..."
                    }
                  ],
                  "output": [
                    {
                      "role": "assistant",
                      "content": "The rubric is not clear nor concise."
                    }
                  ],
                  "finish_reason": "stop",
                  "model": "gpt-4o-2024-08-06",
                  "usage": {
                    "total_tokens": 521,
                    "completion_tokens": 2,
                    "prompt_tokens": 519,
                    "cached_tokens": 0
                  },
                  "error": null,
                  "temperature": 1.0,
                  "max_completion_tokens": 2048,
                  "top_p": 1.0,
                  "seed": 42
                }
              },
            ],
            "first_id": "outputitem_67abd55eb6548190bb580745d5644a33",
            "last_id": "outputitem_67abd55eb6548190bb580745d5644a33",
            "has_more": false
          }
    EvalRunOutputItem:
      type: object
      title: EvalRunOutputItem
      description: |
        A schema representing an evaluation run output item.
      properties:
        object:
          type: string
          enum:
            - eval.run.output_item
          default: eval.run.output_item
          description: The type of the object. Always "eval.run.output_item".
          x-stainless-const: true
        id:
          type: string
          description: Unique identifier for the evaluation run output item.
        run_id:
          type: string
          description: >-
            The identifier of the evaluation run associated with this output
            item.
        eval_id:
          type: string
          description: The identifier of the evaluation group.
        created_at:
          type: integer
          description: Unix timestamp (in seconds) when the evaluation run was created.
        status:
          type: string
          description: The status of the evaluation run.
        datasource_item_id:
          type: integer
          description: The identifier for the data source item.
        datasource_item:
          type: object
          description: Details of the input data source item.
          additionalProperties: true
        results:
          type: array
          description: A list of results from the evaluation run.
          items:
            type: object
            description: A result object.
            additionalProperties: true
        sample:
          type: object
          description: A sample containing the input and output of the evaluation run.
          properties:
            input:
              type: array
              description: An array of input messages.
              items:
                type: object
                description: An input message.
                properties:
                  role:
                    type: string
                    description: >-
                      The role of the message sender (e.g., system, user,
                      developer).
                  content:
                    type: string
                    description: The content of the message.
                required:
                  - role
                  - content
            output:
              type: array
              description: An array of output messages.
              items:
                type: object
                properties:
                  role:
                    type: string
                    description: >-
                      The role of the message (e.g. "system", "assistant",
                      "user").
                  content:
                    type: string
                    description: The content of the message.
            finish_reason:
              type: string
              description: The reason why the sample generation was finished.
            model:
              type: string
              description: The model used for generating the sample.
            usage:
              type: object
              description: Token usage details for the sample.
              properties:
                total_tokens:
                  type: integer
                  description: The total number of tokens used.
                completion_tokens:
                  type: integer
                  description: The number of completion tokens generated.
                prompt_tokens:
                  type: integer
                  description: The number of prompt tokens used.
                cached_tokens:
                  type: integer
                  description: The number of tokens retrieved from cache.
              required:
                - total_tokens
                - completion_tokens
                - prompt_tokens
                - cached_tokens
            error:
              $ref: '#/components/schemas/EvalApiError'
            temperature:
              type: number
              description: The sampling temperature used.
            max_completion_tokens:
              type: integer
              description: The maximum number of tokens allowed for completion.
            top_p:
              type: number
              description: The top_p value used for sampling.
            seed:
              type: integer
              description: The seed used for generating the sample.
          required:
            - input
            - output
            - finish_reason
            - model
            - usage
            - error
            - temperature
            - max_completion_tokens
            - top_p
            - seed
      required:
        - object
        - id
        - run_id
        - eval_id
        - created_at
        - status
        - datasource_item_id
        - datasource_item
        - results
        - sample
      x-oaiMeta:
        name: The eval run output item object
        group: evals
        example: |
          {
            "object": "eval.run.output_item",
            "id": "outputitem_67abd55eb6548190bb580745d5644a33",
            "run_id": "evalrun_67abd54d60ec8190832b46859da808f7",
            "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",
            "created_at": 1739314509,
            "status": "pass",
            "datasource_item_id": 137,
            "datasource_item": {
                "teacher": "To grade essays, I only check for style, content, and grammar.",
                "student": "I am a student who is trying to write the best essay."
            },
            "results": [
              {
                "name": "String Check Grader",
                "type": "string-check-grader",
                "score": 1.0,
                "passed": true,
              }
            ],
            "sample": {
              "input": [
                {
                  "role": "system",
                  "content": "You are an evaluator bot..."
                },
                {
                  "role": "user",
                  "content": "You are assessing..."
                }
              ],
              "output": [
                {
                  "role": "assistant",
                  "content": "The rubric is not clear nor concise."
                }
              ],
              "finish_reason": "stop",
              "model": "gpt-4o-2024-08-06",
              "usage": {
                "total_tokens": 521,
                "completion_tokens": 2,
                "prompt_tokens": 519,
                "cached_tokens": 0
              },
              "error": null,
              "temperature": 1.0,
              "max_completion_tokens": 2048,
              "top_p": 1.0,
              "seed": 42
            }
          }
    EvalApiError:
      type: object
      title: EvalApiError
      description: |
        An object representing an error response from the Eval API.
      properties:
        code:
          type: string
          description: The error code.
        message:
          type: string
          description: The error message.
      required:
        - code
        - message
      x-oaiMeta:
        name: The API error object
        group: evals
        example: |
          {
            "code": "internal_error",
            "message": "The eval run failed due to an internal error."
          }
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````