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

# Get run evidence

> Returns evidence items for a completed run, grouped by element. Each item includes a direct quote, source reference, and confidence score. Capped at 20 items per element — use the `count` field to see the true total.

<Warning>This endpoint only works for completed runs. If the run is still in progress, you'll get a `409 RUN_NOT_COMPLETED` error. Poll [Get run details](/api-reference/slice-runs/get-run-details) first to confirm the run has finished.</Warning>


## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/slice-runs/{id}/evidence
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/slice-runs/{id}/evidence:
    get:
      tags:
        - Slice Runs
      summary: Get run evidence
      description: >-
        Returns evidence items for a completed run, grouped by element. Each
        item includes a direct quote, source reference, and confidence score.
        Capped at 20 items per element — use the `count` field to see the true
        total.
      operationId: getSliceRunEvidence
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
          description: Run ID
      responses:
        '200':
          description: Evidence grouped by element
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/EvidenceResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Run not found or belongs to different org
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: RUN_NOT_FOUND
                  message: Run not found
        '409':
          description: Run is not yet completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: RUN_NOT_COMPLETED
                  message: Evidence is only available for completed runs
        '503':
          description: Evidence request timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: EVIDENCE_TIMEOUT
                  message: Evidence request timed out
      security:
        - bearerAuth: []
components:
  schemas:
    EvidenceResponse:
      type: object
      required:
        - summary
        - elements
      properties:
        summary:
          $ref: '#/components/schemas/EvidenceSummary'
        elements:
          type: object
          description: >-
            Evidence items keyed by element key. Each value is an
            ElementEvidence object.
          additionalProperties:
            $ref: '#/components/schemas/ElementEvidence'
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
    EvidenceSummary:
      type: object
      required:
        - totalSources
        - totalElements
        - sourceBreakdown
      properties:
        totalSources:
          type: integer
          description: Total number of unique sources referenced
          example: 15
        totalElements:
          type: integer
          description: Number of distinct elements with evidence
          example: 2
        sourceBreakdown:
          type: object
          description: Count of sources by type (e.g. transcript, crm_deal)
          additionalProperties:
            type: integer
          example:
            transcript: 12
            crm_deal: 3
    ElementEvidence:
      type: object
      required:
        - count
        - items
      properties:
        count:
          type: integer
          description: >-
            Total number of evidence items for this element (may exceed items
            array length due to 20-item cap)
          example: 8
        items:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/EvidenceItem'
    EvidenceItem:
      type: object
      required:
        - quote
        - source
        - confidence
      properties:
        quote:
          type: string
          description: Extracted quote from the source
          example: We're aiming to have a vendor selected by end of Q2.
        source:
          $ref: '#/components/schemas/EvidenceSource'
        confidence:
          type: number
          format: double
          minimum: 0
          maximum: 1
          description: Confidence score (0.0 to 1.0)
          example: 0.91
    EvidenceSource:
      type: object
      required:
        - type
        - id
        - label
      properties:
        type:
          type: string
          description: Source type
          example: transcript
        id:
          type: string
          description: Source identifier
          example: file:98123
        label:
          type: string
          description: Human-readable source label
          example: Acme Corp — Discovery Call
        date:
          type: string
          format: date
          description: Date of the source material
          example: '2026-04-12'
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````