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

# Create evaluations import

> Requires scopes: runs:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/evaluations/{id}/runs/import
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/evaluations/{id}/runs/import:
    post:
      tags:
        - evaluations
      summary: Create evaluations import
      description: 'Requires scopes: runs:write'
      operationId: post_evaluations_id_runs_import
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: Idempotency-Key
          in: header
          required: false
          description: Makes retries safe by returning the original operation result.
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiEvaluationsIdRunsImportRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiEvaluationsIdRunsImportResponse200ApplicationJson
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiEvaluationsIdRunsImportResponse201ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - runs:write
components:
  schemas:
    PostApiEvaluationsIdRunsImportRequest:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              status:
                oneOf:
                  - type: string
                    enum:
                      - failed
                  - type: string
                    enum:
                      - passed
              testCaseId:
                type: number
              output:
                type: string
              input:
                type: string
              trajectory:
                type: object
                properties:
                  input:
                    type: string
                  id:
                    type: string
                  durationMs:
                    type: number
                  totalSteps:
                    type: number
                  steps:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          oneOf:
                            - type: string
                              enum:
                                - final
                            - type: string
                              enum:
                                - reasoning
                            - type: string
                              enum:
                                - tool_call
                            - type: string
                              enum:
                                - tool_result
                        content:
                          type: string
                        index:
                          type: number
                        toolName:
                          type: string
                        timestamp:
                          type: number
                        toolArgs:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                      additionalProperties: false
                      required:
                        - type
                        - content
                        - index
                  finalOutput:
                    type: string
                  totalToolCalls:
                    type: number
                  error:
                    type: string
                  terminatedEarly:
                    oneOf:
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                additionalProperties: false
                required:
                  - input
                  - id
                  - durationMs
                  - totalSteps
                  - steps
                  - finalOutput
                  - totalToolCalls
              costUsd:
                type: number
              latencyMs:
                type: number
              assertionsJson:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
              messages:
                type: array
                items:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
              toolCalls:
                type: array
                items:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
              baseline:
                type: object
                properties:
                  updatedAt:
                    type: string
                  sampleSize:
                    type: number
                  behavior:
                    oneOf:
                      - type: string
                        enum:
                          - tool_use
                      - type: string
                        enum:
                          - classification
                      - type: string
                        enum:
                          - retrieval
                      - type: string
                        enum:
                          - extraction
                      - type: string
                        enum:
                          - multi_step_reasoning
                  stepDistribution:
                    type: object
                    properties:
                      p50:
                        type: number
                      p75:
                        type: number
                      p90:
                        type: number
                    additionalProperties: false
                    required:
                      - p50
                      - p75
                      - p90
                  toolCallDistribution:
                    type: object
                    properties:
                      p50:
                        type: number
                      p75:
                        type: number
                    additionalProperties: false
                    required:
                      - p50
                      - p75
                  durationDistribution:
                    type: object
                    properties:
                      p50:
                        type: number
                      p75:
                        type: number
                    additionalProperties: false
                    required:
                      - p50
                      - p75
                  commonToolSequences:
                    type: array
                    items:
                      type: array
                      items:
                        type: string
                  redundancyProfile:
                    type: object
                    properties:
                      mean:
                        type: number
                      p90:
                        type: number
                    additionalProperties: false
                    required:
                      - mean
                      - p90
                  version:
                    type: string
                  model:
                    type: string
                  taskType:
                    type: string
                  parallelToolGroups:
                    type: array
                    items:
                      type: array
                      items:
                        type: string
                additionalProperties: false
                required:
                  - updatedAt
                  - sampleSize
                  - behavior
                  - stepDistribution
                  - toolCallDistribution
                  - durationDistribution
                  - commonToolSequences
                  - redundancyProfile
              behavior:
                oneOf:
                  - type: string
                    enum:
                      - tool_use
                  - type: string
                    enum:
                      - classification
                  - type: string
                    enum:
                      - retrieval
                  - type: string
                    enum:
                      - extraction
                  - type: string
                    enum:
                      - multi_step_reasoning
              taskType:
                type: string
              idealTrajectory:
                type: object
                properties:
                  expectedSteps:
                    type: number
                  expectedToolCalls:
                    type: number
                  requiredTools:
                    type: array
                    items:
                      type: string
                  forbiddenTools:
                    type: array
                    items:
                      type: string
                  allowParallel:
                    oneOf:
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                  maxRedundantSteps:
                    type: number
                additionalProperties: false
                required:
                  - expectedSteps
                  - expectedToolCalls
            additionalProperties: false
            required:
              - status
              - testCaseId
              - output
        environment:
          oneOf:
            - type: string
              enum:
                - dev
            - type: string
              enum:
                - staging
            - type: string
              enum:
                - prod
        ci:
          type: object
          properties:
            provider:
              oneOf:
                - type: string
                  enum:
                    - unknown
                - type: string
                  enum:
                    - github
                - type: string
                  enum:
                    - gitlab
                - type: string
                  enum:
                    - circle
            actor:
              type: string
            branch:
              type: string
            repo:
              type: string
            sha:
              type: string
            pr:
              type: number
            runUrl:
              type: string
          additionalProperties: false
        importClientVersion:
          type: string
        trajectoryBaselines:
          type: array
          items:
            type: object
            properties:
              updatedAt:
                type: string
              sampleSize:
                type: number
              behavior:
                oneOf:
                  - type: string
                    enum:
                      - tool_use
                  - type: string
                    enum:
                      - classification
                  - type: string
                    enum:
                      - retrieval
                  - type: string
                    enum:
                      - extraction
                  - type: string
                    enum:
                      - multi_step_reasoning
              stepDistribution:
                type: object
                properties:
                  p50:
                    type: number
                  p75:
                    type: number
                  p90:
                    type: number
                additionalProperties: false
                required:
                  - p50
                  - p75
                  - p90
              toolCallDistribution:
                type: object
                properties:
                  p50:
                    type: number
                  p75:
                    type: number
                additionalProperties: false
                required:
                  - p50
                  - p75
              durationDistribution:
                type: object
                properties:
                  p50:
                    type: number
                  p75:
                    type: number
                additionalProperties: false
                required:
                  - p50
                  - p75
              commonToolSequences:
                type: array
                items:
                  type: array
                  items:
                    type: string
              redundancyProfile:
                type: object
                properties:
                  mean:
                    type: number
                  p90:
                    type: number
                additionalProperties: false
                required:
                  - mean
                  - p90
              version:
                type: string
              model:
                type: string
              taskType:
                type: string
              parallelToolGroups:
                type: array
                items:
                  type: array
                  items:
                    type: string
            additionalProperties: false
            required:
              - updatedAt
              - sampleSize
              - behavior
              - stepDistribution
              - toolCallDistribution
              - durationDistribution
              - commonToolSequences
              - redundancyProfile
        checkReport:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
      additionalProperties: false
      required:
        - results
    PostApiEvaluationsIdRunsImportResponse200ApplicationJson:
      type: object
      properties:
        runId:
          type: number
        score:
          type: number
        flags:
          $ref: '#/components/schemas/JsonValue'
        dashboardUrl:
          type: string
      additionalProperties: false
      required:
        - runId
        - score
        - flags
        - dashboardUrl
    PostApiEvaluationsIdRunsImportResponse201ApplicationJson:
      type: object
      properties:
        runId:
          type: number
        score:
          type: number
        flags:
          type: array
          items:
            type: string
        dashboardUrl:
          type: string
      additionalProperties: false
      required:
        - runId
        - score
        - flags
        - dashboardUrl
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````