> ## 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.

# The anchor report

> The whole anchor picture for a session, uncached (`Cache-Control: no-store`): the anchor's identity and its live certificate, the rule in force, every stored check, every hold with its state, reason and pinned step (the rule replayed over the history; the current hold carries the reason the trainer was told), the current hold state, and a summary. The same document sits inside the signed environment bundle. From Python: `python -m errorbar_reward.anchor_report <session_id> [--json]`. Read scope.



## OpenAPI

````yaml /openapi.json get /v1/reward/sessions/{id}/anchor
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: []
tags:
  - name: Certified reward
    description: >-
      The certified reward for your own trainer: sessions with judge
      certificates, scoring with a ledger-true kill switch, and the mid-run
      anchor that holds a run when the reward diverges from an independent
      judge.
paths:
  /v1/reward/sessions/{id}/anchor:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Certified reward
      summary: The anchor report
      description: >-
        The whole anchor picture for a session, uncached (`Cache-Control:
        no-store`): the anchor's identity and its live certificate, the rule in
        force, every stored check, every hold with its state, reason and pinned
        step (the rule replayed over the history; the current hold carries the
        reason the trainer was told), the current hold state, and a summary. The
        same document sits inside the signed environment bundle. From Python:
        `python -m errorbar_reward.anchor_report <session_id> [--json]`. Read
        scope.
      operationId: getAnchorReport
      responses:
        '200':
          description: The report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnchorReport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: The session has no anchor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AnchorReport:
      type: object
      properties:
        session_id:
          type: string
        anchor:
          type: object
          properties:
            criterion_id:
              type: string
            criterion_name:
              type: string
            judge_model:
              type:
                - string
                - 'null'
            judge_mode:
              type: string
              enum:
                - corrected
                - observed
              description: >-
                corrected — the observed pass rate is mapped through the
                anchor's measured confusion; observed — no measured error rates,
                raw pass rate.
        certificate:
          description: >-
            The anchor criterion's full signed certificate as issued now; null
            if the criterion no longer exists.
        rule:
          type: object
          properties:
            window:
              type: integer
            gap_floor:
              type: number
            drop_floor:
              type: number
            consecutive:
              type: integer
            min_prompts:
              type: integer
          description: The thresholds this session decides under.
        history:
          type: array
          items:
            $ref: '#/components/schemas/AnchorPoint'
          description: Every stored check, not the session view's 20-point tail.
        holds:
          type: array
          items:
            $ref: '#/components/schemas/AnchorHoldEvent'
          description: >-
            The rule replayed over each prefix of the history; the current hold
            carries the reason the trainer was told.
        current:
          type: object
          properties:
            held:
              type: boolean
            held_at:
              type:
                - string
                - 'null'
            held_state:
              type:
                - string
                - 'null'
            held_reason:
              type:
                - string
                - 'null'
            pinned_step:
              type:
                - string
                - 'null'
            resumed_at:
              type:
                - string
                - 'null'
        summary:
          type: object
          properties:
            checks:
              type: integer
            usable_checks:
              type: integer
            holds:
              type: integer
            max_divergence:
              type:
                - number
                - 'null'
            max_divergence_step:
              type:
                - string
                - 'null'
            max_gap_widening:
              type:
                - number
                - 'null'
            max_gap_widening_step:
              type:
                - string
                - 'null'
            anchor_range:
              type:
                - array
                - 'null'
              items:
                type: number
            reward_range:
              type:
                - array
                - 'null'
              items:
                type: number
            first_step:
              type:
                - string
                - 'null'
            last_step:
              type:
                - string
                - 'null'
    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.
    AnchorPoint:
      type: object
      properties:
        step:
          type: string
        at:
          type: string
          format: date-time
        'n':
          type: integer
          description: Prompts both the reward and the anchor judge could grade.
        reward_rate:
          type: number
          description: >-
            Mean composite grade under the session's reward on the anchor
            outputs — the signal being optimised.
        anchor_rate:
          type: number
          description: >-
            The independent anchor judge's pass rate, corrected for its measured
            error (Lang–Reiczigel) when the criterion carries report counts.
        anchor_ci:
          type: array
          items:
            type: number
          minItems: 2
          maxItems: 2
        anchor_corrected:
          type: boolean
        masked:
          type: integer
          description: Items the anchor judge could not parse — counted in neither rate.
        gap_se:
          type:
            - number
            - 'null'
          description: >-
            Paired standard error of the gap (reward grade − anchor verdict)
            over this check's items, stretched by the anchor's 1/(Se+Sp−1). The
            gap signature tests against 1.96·√(gap_se₀² + gap_seᵢ²), never less
            than 0.05. Absent on checks stored before it existed.
    AnchorHoldEvent:
      type: object
      properties:
        step:
          type: string
        at:
          type: string
          format: date-time
        state:
          $ref: '#/components/schemas/AnchorState'
        reason:
          type: string
        pinned_step:
          type: string
    AnchorState:
      type: string
      enum:
        - clear
        - grader_fooled
        - gamed
        - degrading
      description: >-
        clear — no hold. grader_fooled — the gap (reward read − anchor read on
        the same outputs) widened beyond its paired noise since the first check
        while the anchor stayed within its own: the reward passes what the
        anchor fails, before true quality moves. gamed — the gap widened AND the
        anchor fell beyond its noise from its best. degrading — the anchor fell
        and the gap did not widen: both instruments see the fall. Every
        non-clear state holds.
  responses:
    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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace API key, e.g. `sk_sovereign_...`, sent as `Authorization:
        Bearer <key>`.

````