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

# Get an evidence bundle

> Download the forwardable proof bundle for a DONE eval run — verdict, frozen judge calibration and certificate, per-sample verdict lineage, refusal ledger events and an audit hash-chain attestation, optionally with the embedded CI-gate decision — so a customer can hand a reviewer or auditor one signed JSON that links claim to instrument to data.

404 for a run outside this key's workspace. 412 {code:"precondition_failed"} for any run that is not DONE (PENDING/RUNNING/ERROR/CANCELLED) — fail closed like the gate; poll until DONE. with_content silently degrades (never errors) when request logging is off. Read-only, no spend.



## OpenAPI

````yaml /openapi.json get /v1/evals/{id}/evidence
openapi: 3.1.0
info:
  title: errorbar Management API
  description: >-
    The management API behind the improvement loop: capture and setup, request
    logs and datasets, grades (labels), judges (criteria), evals and deploy
    gates, fine-tuning and reinforcement learning, dedicated GPU endpoints, and
    model aliases and versions. Authenticated with a workspace API key
    (sk_sovereign_...). The inference API (chat, embeddings, rerank, responses)
    is OpenAI-compatible and documented separately.


    Responses are snake_case, list endpoints on the loop products use the
    {"object": "list", "data": [...]} envelope, and refusals use the same nested
    error shape the gateway emits: {"error": {"message", "type", "code"}}.
    Request bodies on the loop products (logs, labels, criteria, evals,
    datasets, aliases) are snake_case; the training and infrastructure products
    (fine-tuning, GRPO, environment tools, dedicated, model-version adoption)
    validate camelCase bodies, and each schema below says which it is. Endpoints
    that spend money require a key minted by a workspace owner or admin and
    return 403 otherwise.
  version: 1.0.0
servers:
  - url: https://gateway.errorbar.ai
    description: Production
  - url: https://www.errorbar.ai/api
    description: Control plane (also served at this base URL)
security:
  - bearerAuth: []
paths:
  /v1/evals/{id}/evidence:
    get:
      tags:
        - Evals
      summary: Get an evidence bundle
      description: >-
        Download the forwardable proof bundle for a DONE eval run — verdict,
        frozen judge calibration and certificate, per-sample verdict lineage,
        refusal ledger events and an audit hash-chain attestation, optionally
        with the embedded CI-gate decision — so a customer can hand a reviewer
        or auditor one signed JSON that links claim to instrument to data.


        404 for a run outside this key's workspace. 412
        {code:"precondition_failed"} for any run that is not DONE
        (PENDING/RUNNING/ERROR/CANCELLED) — fail closed like the gate; poll
        until DONE. with_content silently degrades (never errors) when request
        logging is off. Read-only, no spend.
      operationId: getEvalEvidence
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier.
        - name: with_content
          in: query
          schema:
            type: boolean
          description: >-
            Pass the literal string "true" to include sampled prompts and
            generated answers in samples.lineage. Honoured only when the
            workspace has request logging (content storage) enabled; otherwise
            lineage stays ids/verdicts only and content.reason explains why.
        - name: min_win_rate
          in: query
          schema:
            type: number
          description: >-
            0..1. Embed the same gate evaluation as GET /v1/evals/{id}/gate:
            every candidate's win-rate CI lower bound must clear this. Values
            outside 0..1 or non-numeric are ignored.
        - name: min_pass_rate
          in: query
          schema:
            type: number
          description: >-
            0..1. Criterion runs: corrected pass-rate CI lower bound (observed
            CI when the judge is unvalidated) must clear this.
        - name: min_assertion_pass_rate
          in: query
          schema:
            type: number
          description: 0..1. Exact all-assertions pass rate must clear this.
        - name: noninferiority_margin
          in: query
          schema:
            type: number
          description: 0..1. The certified switch test (see get_eval_gate).
        - name: model
          in: query
          schema:
            type: string
          description: Restrict the embedded gate checks to one arm/model key.
      responses:
        '200':
          description: >-
            200 bundle (snake_cased): {signature|null, unsigned?:true (when no
            signing secret is configured), bundle_v:1, generated_at, run:{id,
            workspace_id, name, eval_kind, status:"DONE", created_at,
            sample_count, baseline_model, candidate_models, judge_model,
            rubric_type, sample_filters, assertions}, results (verdict
            verbatim), gate:{params, verdict}|null (only when at least one gate
            param was given), instrument:{judge_model, judge_prompt,
            criterion_snapshot, certificate|null, note|null}, samples:{count,
            note, lineage:[{sample id, every verdict with the ordering that
            measured it ("ab"/"ba" pairwise halves, "abs" absolute, "sim"
            screening similarity), prompt/answers only with with_content}]},
            content:{included, reason}, refusals:{window_days, scope, count,
            complete, events:[{kind, subject, reason, created_at}]},
            attestation:{ok, checked_rows, head_seq, problems:[{seq, kind,
            detail}], acknowledged, window:{since, until, from_seq}|null,
            chain_head:{seq, last_hash}|null, statement}}.
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    BadRequest:
      description: Malformed request or invalid field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: invalid_request_error
              code: invalid_api_key
    NotFound:
      description: The resource does not exist in your workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: >-
                invalid_request_error, insufficient_quota, rate_limit_error, or
                api_error.
            code:
              type: string
              description: >-
                Machine-stable cause, e.g. invalid_api_key, not_found,
                insufficient_permissions, precondition_failed.
          required:
            - message
            - type
            - code
      description: >-
        Every refusal — gateway and management API alike — uses this one
        envelope.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace API key, e.g. `sk_sovereign_...`, sent as `Authorization:
        Bearer <key>`.

````