> ## 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.2
info:
  title: EvalGate API
  version: 18.13.0
  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'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    PostApiEvaluationsIdRunsImportRequest:
      type: object
      properties:
        environment:
          oneOf:
            - type: string
              enum:
                - dev
            - type: string
              enum:
                - prod
            - type: string
              enum:
                - staging
        importClientVersion:
          type: string
        runManifest:
          type: object
          properties:
            expectedTrialsPerCase:
              type: number
            createdAt:
              type: string
            dataset:
              type: object
              properties:
                id:
                  oneOf:
                    - type: 'null'
                    - type: string
                versionId:
                  oneOf:
                    - type: 'null'
                    - type: string
              additionalProperties: false
            execution:
              type: object
              properties:
                harnessCommit:
                  oneOf:
                    - type: 'null'
                    - type: string
                harnessSourceState:
                  oneOf:
                    - type: 'null'
                    - type: string
                      enum:
                        - EXACT_COMMIT
                    - type: string
                      enum:
                        - LOCAL_DIRTY_SNAPSHOT
                    - type: string
                      enum:
                        - UNVERIFIED
                harnessDirtyDigest:
                  oneOf:
                    - type: 'null'
                    - type: string
                model:
                  oneOf:
                    - type: 'null'
                    - type: string
                provider:
                  oneOf:
                    - type: 'null'
                    - type: string
                promptHash:
                  oneOf:
                    - type: 'null'
                    - type: string
                systemPrompt:
                  oneOf:
                    - type: 'null'
                    - type: string
                toolSchemaHash:
                  oneOf:
                    - type: 'null'
                    - type: string
                judgeCertificateHash:
                  oneOf:
                    - type: 'null'
                    - type: string
                runtimeImage:
                  oneOf:
                    - type: 'null'
                    - type: string
                budgets:
                  type: object
                  properties:
                    maxCostUsd:
                      type: number
                    maxWallTimeMs:
                      type: number
                    maxModelCalls:
                      type: number
                  additionalProperties: false
                timeoutRules:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
                baselineConfigurationHash:
                  oneOf:
                    - type: 'null'
                    - type: string
              additionalProperties: false
          additionalProperties: false
        cancelled:
          oneOf:
            - type: boolean
              enum:
                - false
            - type: boolean
              enum:
                - true
        infrastructureAttempts:
          type: array
          items:
            type: object
            properties:
              testCaseId:
                type: number
              logicalTrialIndex:
                type: number
              physicalAttemptIndex:
                type: number
              attemptKind:
                oneOf:
                  - type: string
                    enum:
                      - infrastructure_retry
                  - type: string
                    enum:
                      - initial
              status:
                oneOf:
                  - type: string
                    enum:
                      - cancelled
                  - type: string
                    enum:
                      - infrastructure_failure
                  - type: string
                    enum:
                      - invalid
              errorCode:
                type: string
              startedAt:
                type: string
              completedAt:
                type: string
              evidence:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
            additionalProperties: false
            required:
              - testCaseId
              - logicalTrialIndex
              - physicalAttemptIndex
              - attemptKind
              - status
        ci:
          type: object
          properties:
            provider:
              oneOf:
                - type: string
                  enum:
                    - circle
                - type: string
                  enum:
                    - github
                - type: string
                  enum:
                    - gitlab
                - type: string
                  enum:
                    - unknown
            repo:
              type: string
            sha:
              type: string
            branch:
              type: string
            pr:
              type: number
            runUrl:
              type: string
            actor:
              type: string
          additionalProperties: false
        trajectoryBaselines:
          type: array
          items:
            type: object
            properties:
              behavior:
                oneOf:
                  - type: string
                    enum:
                      - classification
                  - type: string
                    enum:
                      - extraction
                  - type: string
                    enum:
                      - multi_step_reasoning
                  - type: string
                    enum:
                      - retrieval
                  - type: string
                    enum:
                      - tool_use
              taskType:
                type: string
              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
              parallelToolGroups:
                type: array
                items:
                  type: array
                  items:
                    type: string
              sampleSize:
                type: number
              updatedAt:
                type: string
              version:
                type: string
              model:
                type: string
            additionalProperties: false
            required:
              - behavior
              - stepDistribution
              - toolCallDistribution
              - durationDistribution
              - commonToolSequences
              - redundancyProfile
              - sampleSize
              - updatedAt
        checkReport:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        results:
          type: array
          items:
            type: object
            properties:
              testCaseId:
                type: number
              logicalTrialIndex:
                type: number
              physicalAttemptIndex:
                type: number
              attemptKind:
                oneOf:
                  - type: string
                    enum:
                      - infrastructure_retry
                  - type: string
                    enum:
                      - initial
              status:
                oneOf:
                  - type: string
                    enum:
                      - failed
                  - type: string
                    enum:
                      - passed
              input:
                type: string
              output:
                type: string
              latencyMs:
                type: number
              costUsd:
                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'
              trajectory:
                type: object
                properties:
                  id:
                    type: string
                  input:
                    type: string
                  finalOutput:
                    type: string
                  steps:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: number
                        type:
                          oneOf:
                            - type: string
                              enum:
                                - final
                            - type: string
                              enum:
                                - reasoning
                            - type: string
                              enum:
                                - tool_call
                            - type: string
                              enum:
                                - tool_result
                        content:
                          type: string
                        toolName:
                          type: string
                        toolArgs:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                        timestamp:
                          type: number
                      additionalProperties: false
                      required:
                        - index
                        - type
                        - content
                  totalSteps:
                    type: number
                  totalToolCalls:
                    type: number
                  durationMs:
                    type: number
                  terminatedEarly:
                    oneOf:
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                  error:
                    type: string
                additionalProperties: false
                required:
                  - id
                  - input
                  - finalOutput
                  - steps
                  - totalSteps
                  - totalToolCalls
                  - durationMs
              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
                  referenceToolCalls:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        args:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                      additionalProperties: false
                      required:
                        - name
                  trajectoryMatchMode:
                    oneOf:
                      - type: string
                        enum:
                          - strict
                      - type: string
                        enum:
                          - subset
                      - type: string
                        enum:
                          - superset
                      - type: string
                        enum:
                          - unordered
                  toolArgsMatchMode:
                    oneOf:
                      - type: string
                        enum:
                          - exact
                      - type: string
                        enum:
                          - ignore
                      - type: string
                        enum:
                          - subset
                      - type: string
                        enum:
                          - superset
                  toolArgsMatchOverrides:
                    type: object
                    additionalProperties:
                      oneOf:
                        - type: string
                          enum:
                            - exact
                        - type: string
                          enum:
                            - ignore
                        - type: string
                          enum:
                            - subset
                        - type: string
                          enum:
                            - superset
                        - type: array
                          items:
                            type: string
                additionalProperties: false
                required:
                  - expectedSteps
                  - expectedToolCalls
              behavior:
                oneOf:
                  - type: string
                    enum:
                      - classification
                  - type: string
                    enum:
                      - extraction
                  - type: string
                    enum:
                      - multi_step_reasoning
                  - type: string
                    enum:
                      - retrieval
                  - type: string
                    enum:
                      - tool_use
              taskType:
                type: string
              baseline:
                type: object
                properties:
                  behavior:
                    oneOf:
                      - type: string
                        enum:
                          - classification
                      - type: string
                        enum:
                          - extraction
                      - type: string
                        enum:
                          - multi_step_reasoning
                      - type: string
                        enum:
                          - retrieval
                      - type: string
                        enum:
                          - tool_use
                  taskType:
                    type: string
                  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
                  parallelToolGroups:
                    type: array
                    items:
                      type: array
                      items:
                        type: string
                  sampleSize:
                    type: number
                  updatedAt:
                    type: string
                  version:
                    type: string
                  model:
                    type: string
                additionalProperties: false
                required:
                  - behavior
                  - stepDistribution
                  - toolCallDistribution
                  - durationDistribution
                  - commonToolSequences
                  - redundancyProfile
                  - sampleSize
                  - updatedAt
              scoreProvenance:
                type: object
                properties:
                  scoringVersion:
                    type: string
                  assertionSetVersion:
                    type: string
                  taskType:
                    type: string
                  judgeConfigHash:
                    type: string
                  aggregationVersion:
                    type: string
                  behaviorVersion:
                    type: string
                additionalProperties: false
                required:
                  - scoringVersion
                  - assertionSetVersion
                  - taskType
              traceId:
                type: string
            additionalProperties: false
            required:
              - testCaseId
              - status
              - output
      additionalProperties: false
    PostApiEvaluationsIdRunsImportResponse200ApplicationJson:
      type: object
      properties:
        runId:
          type: number
        score:
          type: number
        flags:
          $ref: '#/components/schemas/JsonValue'
        dashboardUrl:
          type: string
        manifestHash:
          oneOf:
            - type: 'null'
            - type: string
        terminalState:
          oneOf:
            - type: 'null'
            - type: string
              enum:
                - CANCELLED
            - type: string
              enum:
                - COMPLETE
            - type: string
              enum:
                - COMPLETE_WITH_CASE_FAILURES
            - type: string
              enum:
                - INVALID
            - type: string
              enum:
                - PARTIAL
        gateDecision:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                decision:
                  oneOf:
                    - type: string
                      enum:
                        - BLOCK
                    - type: string
                      enum:
                        - INDETERMINATE
                    - type: string
                      enum:
                        - NO_DECISION
                    - type: string
                      enum:
                        - PASS
                    - type: string
                      enum:
                        - WARN
                enforcementAction:
                  oneOf:
                    - type: 'null'
                    - type: string
                      enum:
                        - ALLOW
                    - type: string
                      enum:
                        - BLOCK
                    - type: string
                      enum:
                        - NONE
                    - type: string
                      enum:
                        - WARN
              additionalProperties: false
              required:
                - decision
                - enforcementAction
        gatePolicy:
          oneOf:
            - type: 'null'
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
        reconciliation:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                schemaVersion:
                  type: number
                  enum:
                    - 1
                manifestHash:
                  type: string
                expectedCaseCount:
                  type: number
                expectedLogicalTrialCount:
                  type: number
                receivedPhysicalAttemptCount:
                  type: number
                completedLogicalTrialCount:
                  type: number
                passedLogicalTrialCount:
                  type: number
                failedLogicalTrialCount:
                  type: number
                infrastructureFailureCount:
                  type: number
                missingLogicalTrials:
                  type: array
                  items:
                    type: object
                    properties:
                      testCaseId:
                        type: number
                      logicalTrialIndex:
                        type: number
                    additionalProperties: false
                    required:
                      - testCaseId
                      - logicalTrialIndex
                invalidAttempts:
                  type: array
                  items:
                    type: object
                    properties:
                      testCaseId:
                        type: number
                      logicalTrialIndex:
                        type: number
                      physicalAttemptIndex:
                        type: number
                      reason:
                        oneOf:
                          - type: string
                            enum:
                              - ATTEMPT_AFTER_COMPLETION
                          - type: string
                            enum:
                              - ATTEMPT_INDEX_GAP
                          - type: string
                            enum:
                              - COMPLETED_WITHOUT_ARTIFACT
                          - type: string
                            enum:
                              - COMPLETED_WITHOUT_COMPLETION_TIME
                          - type: string
                            enum:
                              - COMPLETED_WITHOUT_OUTCOME
                          - type: string
                            enum:
                              - COMPLETED_WITH_INVALID_ARTIFACT
                          - type: string
                            enum:
                              - DUPLICATE_ATTEMPT_INDEX
                          - type: string
                            enum:
                              - FIRST_ATTEMPT_MARKED_RETRY
                          - type: string
                            enum:
                              - MISSING_INITIAL_ATTEMPT
                          - type: string
                            enum:
                              - MULTIPLE_COMPLETED_ATTEMPTS
                          - type: string
                            enum:
                              - NON_COMPLETED_WITH_ARTIFACT
                          - type: string
                            enum:
                              - NON_COMPLETED_WITH_OUTCOME
                          - type: string
                            enum:
                              - NON_POSITIVE_ATTEMPT_INDEX
                          - type: string
                            enum:
                              - RETRY_MARKED_INITIAL
                          - type: string
                            enum:
                              - UNEXPECTED_CASE
                          - type: string
                            enum:
                              - UNEXPECTED_TRIAL
                    additionalProperties: false
                    required:
                      - testCaseId
                      - logicalTrialIndex
                      - physicalAttemptIndex
                      - reason
                invalidRunReasons:
                  type: array
                  items:
                    type: string
                terminalState:
                  oneOf:
                    - type: string
                      enum:
                        - CANCELLED
                    - type: string
                      enum:
                        - COMPLETE
                    - type: string
                      enum:
                        - COMPLETE_WITH_CASE_FAILURES
                    - type: string
                      enum:
                        - INVALID
                    - type: string
                      enum:
                        - PARTIAL
                reconciledAt:
                  type: string
              additionalProperties: false
              required:
                - schemaVersion
                - manifestHash
                - expectedCaseCount
                - expectedLogicalTrialCount
                - receivedPhysicalAttemptCount
                - completedLogicalTrialCount
                - passedLogicalTrialCount
                - failedLogicalTrialCount
                - infrastructureFailureCount
                - missingLogicalTrials
                - invalidAttempts
                - invalidRunReasons
                - terminalState
                - reconciledAt
      additionalProperties: false
      required:
        - runId
        - score
        - flags
        - dashboardUrl
        - manifestHash
        - terminalState
        - gateDecision
        - gatePolicy
        - reconciliation
    PostApiEvaluationsIdRunsImportResponse201ApplicationJson:
      type: object
      properties:
        runId:
          type: number
        score:
          type: number
        flags:
          type: array
          items:
            type: string
        dashboardUrl:
          type: string
        manifestHash:
          type: string
        terminalState:
          oneOf:
            - type: string
              enum:
                - CANCELLED
            - type: string
              enum:
                - COMPLETE
            - type: string
              enum:
                - COMPLETE_WITH_CASE_FAILURES
            - type: string
              enum:
                - INVALID
            - type: string
              enum:
                - PARTIAL
        gateDecision:
          type: object
          properties:
            decision:
              oneOf:
                - type: string
                  enum:
                    - BLOCK
                - type: string
                  enum:
                    - INDETERMINATE
                - type: string
                  enum:
                    - NO_DECISION
                - type: string
                  enum:
                    - PASS
                - type: string
                  enum:
                    - WARN
            enforcementAction:
              oneOf:
                - type: string
                  enum:
                    - ALLOW
                - type: string
                  enum:
                    - BLOCK
                - type: string
                  enum:
                    - NONE
                - type: string
                  enum:
                    - WARN
            reason:
              oneOf:
                - type: string
                  enum:
                    - INVALID_EVIDENCE
                - type: string
                  enum:
                    - MISSING_EVIDENCE
                - type: string
                  enum:
                    - POLICY_RESULT
                - type: string
                  enum:
                    - RUN_CANCELLED
          additionalProperties: false
          required:
            - decision
            - enforcementAction
            - reason
        gatePolicy:
          allOf:
            - type: object
              properties:
                decision:
                  oneOf:
                    - type: string
                      enum:
                        - BLOCK
                    - type: string
                      enum:
                        - PASS
                    - type: string
                      enum:
                        - WARN
                basis:
                  oneOf:
                    - type: string
                      enum:
                        - BASELINE_NOT_COMPARABLE
                    - type: string
                      enum:
                        - CASE_FAILURES
                    - type: string
                      enum:
                        - CASE_REGRESSED_AGAINST_PUBLISHED_BASELINE
                    - type: string
                      enum:
                        - EXECUTED_PROMPT_UNPINNED
                    - type: string
                      enum:
                        - IMPORTED_EVIDENCE_ADVISORY
                    - type: string
                      enum:
                        - KNOWN_FAILURES_UNCHANGED
                    - type: string
                      enum:
                        - NO_PUBLISHED_BASELINE
                    - type: string
                      enum:
                        - NO_REGRESSION_AGAINST_PUBLISHED_BASELINE
                    - type: string
                      enum:
                        - QUALITY_UNAVAILABLE
                    - type: string
                      enum:
                        - REGRESSED_AGAINST_PUBLISHED_BASELINE
              additionalProperties: false
              required:
                - decision
                - basis
            - type: object
              properties:
                authorityEnabled:
                  type: boolean
                comparison:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        baselineRunId:
                          oneOf:
                            - type: 'null'
                            - type: number
                        baselineScore:
                          oneOf:
                            - type: 'null'
                            - type: number
                        score:
                          oneOf:
                            - type: 'null'
                            - type: number
                        regressionDelta:
                          oneOf:
                            - type: 'null'
                            - type: number
                        regressionDetected:
                          type: boolean
                      additionalProperties: false
                      required:
                        - baselineRunId
                        - baselineScore
                        - score
                        - regressionDelta
                        - regressionDetected
                cases:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        baselineRunId:
                          oneOf:
                            - type: 'null'
                            - type: number
                        newFailureCaseIds:
                          type: array
                          items:
                            type: number
                        knownFailureCaseIds:
                          type: array
                          items:
                            type: number
                      additionalProperties: false
                      required:
                        - baselineRunId
                        - newFailureCaseIds
                        - knownFailureCaseIds
              additionalProperties: false
              required:
                - authorityEnabled
                - comparison
        reconciliation:
          type: object
          properties:
            schemaVersion:
              type: number
              enum:
                - 1
            manifestHash:
              type: string
            expectedCaseCount:
              type: number
            expectedLogicalTrialCount:
              type: number
            receivedPhysicalAttemptCount:
              type: number
            completedLogicalTrialCount:
              type: number
            passedLogicalTrialCount:
              type: number
            failedLogicalTrialCount:
              type: number
            infrastructureFailureCount:
              type: number
            missingLogicalTrials:
              type: array
              items:
                type: object
                properties:
                  testCaseId:
                    type: number
                  logicalTrialIndex:
                    type: number
                additionalProperties: false
                required:
                  - testCaseId
                  - logicalTrialIndex
            invalidAttempts:
              type: array
              items:
                type: object
                properties:
                  testCaseId:
                    type: number
                  logicalTrialIndex:
                    type: number
                  physicalAttemptIndex:
                    type: number
                  reason:
                    oneOf:
                      - type: string
                        enum:
                          - ATTEMPT_AFTER_COMPLETION
                      - type: string
                        enum:
                          - ATTEMPT_INDEX_GAP
                      - type: string
                        enum:
                          - COMPLETED_WITHOUT_ARTIFACT
                      - type: string
                        enum:
                          - COMPLETED_WITHOUT_COMPLETION_TIME
                      - type: string
                        enum:
                          - COMPLETED_WITHOUT_OUTCOME
                      - type: string
                        enum:
                          - COMPLETED_WITH_INVALID_ARTIFACT
                      - type: string
                        enum:
                          - DUPLICATE_ATTEMPT_INDEX
                      - type: string
                        enum:
                          - FIRST_ATTEMPT_MARKED_RETRY
                      - type: string
                        enum:
                          - MISSING_INITIAL_ATTEMPT
                      - type: string
                        enum:
                          - MULTIPLE_COMPLETED_ATTEMPTS
                      - type: string
                        enum:
                          - NON_COMPLETED_WITH_ARTIFACT
                      - type: string
                        enum:
                          - NON_COMPLETED_WITH_OUTCOME
                      - type: string
                        enum:
                          - NON_POSITIVE_ATTEMPT_INDEX
                      - type: string
                        enum:
                          - RETRY_MARKED_INITIAL
                      - type: string
                        enum:
                          - UNEXPECTED_CASE
                      - type: string
                        enum:
                          - UNEXPECTED_TRIAL
                additionalProperties: false
                required:
                  - testCaseId
                  - logicalTrialIndex
                  - physicalAttemptIndex
                  - reason
            invalidRunReasons:
              type: array
              items:
                type: string
            terminalState:
              oneOf:
                - type: string
                  enum:
                    - CANCELLED
                - type: string
                  enum:
                    - COMPLETE
                - type: string
                  enum:
                    - COMPLETE_WITH_CASE_FAILURES
                - type: string
                  enum:
                    - INVALID
                - type: string
                  enum:
                    - PARTIAL
            reconciledAt:
              type: string
          additionalProperties: false
          required:
            - schemaVersion
            - manifestHash
            - expectedCaseCount
            - expectedLogicalTrialCount
            - receivedPhysicalAttemptCount
            - completedLogicalTrialCount
            - passedLogicalTrialCount
            - failedLogicalTrialCount
            - infrastructureFailureCount
            - missingLogicalTrials
            - invalidAttempts
            - invalidRunReasons
            - terminalState
            - reconciledAt
      additionalProperties: false
      required:
        - runId
        - score
        - flags
        - dashboardUrl
        - manifestHash
        - terminalState
        - gateDecision
        - gatePolicy
        - reconciliation
    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
                - INVALID_REFERENCE
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - FEATURE_LIMIT_REACHED
                - NO_ORG_MEMBERSHIP
                - SHARE_REVOKED
                - SHARE_EXPIRED
                - SHARE_UNAVAILABLE
                - PROVIDER_KEY_MISSING
                - PROVIDER_KEY_EXPIRED
                - PROVIDER_RATE_LIMITED
                - PROVIDER_UNAUTHORIZED
                - PROVIDER_UNAVAILABLE
                - AGENT_HANDOFF_INVALID
                - AGENT_HANDOFF_EXPIRED
                - AGENT_HANDOFF_DENIED
                - AGENT_HANDOFF_CONSUMED
                - PAYLOAD_TOO_LARGE
                - METHOD_NOT_ALLOWED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
            redaction:
              type: object
              properties:
                applied:
                  type: boolean
                  enum:
                    - true
                fieldCount:
                  type: integer
                  minimum: 0
                secretCount:
                  type: integer
                  minimum: 0
              required:
                - applied
                - fieldCount
                - secretCount
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
        WWW-Authenticate:
          description: >-
            Bearer challenge. Agent-facing routes include the RFC 9728
            resource_metadata URL.
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
        Retry-After:
          description: Delay in seconds before retrying when present.
          schema:
            type: integer
            minimum: 1
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        RateLimit-Limit:
          description: Quota in requests for the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Remaining:
          description: Remaining requests in the active window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Reset delay in seconds (not a Unix timestamp).
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Remaining:
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Legacy reset timestamp in Unix milliseconds.
          schema:
            type: integer
            minimum: 0
        RateLimit-Policy:
          description: IETF HTTPAPI structured quota policy (work in progress).
          schema:
            type: string
        RateLimit:
          description: >-
            IETF HTTPAPI structured remaining quota and reset delay (work in
            progress).
          schema:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: EvalGate API key
      description: >-
        Organization-scoped EvalGate API key. Discover the supported agent
        scopes at /.well-known/oauth-protected-resource. Per-operation grants
        are listed in x-evalgate-required-scopes; OpenAPI bearer security
        requirement arrays remain empty as required for non-OAuth schemes.
      x-evalgate-scopes-supported:
        - eval:read
        - eval:write
        - objectives:read
        - objectives:write
        - runs:read
        - runs:write
        - traces:read
        - traces:write
        - exports:download
        - reports:write
        - prompt:publish
        - scorer:publish
        - red_team:read
        - red_team:run
        - red_team:approve
        - docs:read
        - agent:read
        - agent:execute
        - resources:read
        - resources:write
        - contexts:read
        - contexts:write
        - observations:write
        - checks:read
        - checks:run
        - standards:read
        - standards:write
        - standards:approve
        - grants:read
        - grants:write
        - admin:keys
        - admin:workspace
        - admin:org
      x-evalgate-protected-resource-metadata: https://www.evalgate.com/.well-known/oauth-protected-resource

````

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