> ## 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 a calibration certificate

> Returns the signed judge certificate for a criterion — what was proven (confusion matrix, TPR/TNR/kappa with intervals, trust verdict), on which population, what voids it, and what enforcement refused involving it — for audits, evidence bundles, or proving a judge's calibration to a third party.

Free (no judging). 404 if the criterion is not in the workspace. Response is Cache-Control: no-store. Hand the WHOLE JSON object to POST /v1/verify to check the signature later. An uncalibrated judge still returns a certificate that honestly says nothing is measured (calibration.measured=false, trust.trust='unmeasured'). enforcement counts refusal-ledger rows from the last 90 days whose subject is this criterion or whose reason names it.



## OpenAPI

````yaml /openapi.json get /v1/criteria/{id}/certificate
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/criteria/{id}/certificate:
    get:
      tags:
        - Criteria
      summary: Get a calibration certificate
      description: >-
        Returns the signed judge certificate for a criterion — what was proven
        (confusion matrix, TPR/TNR/kappa with intervals, trust verdict), on
        which population, what voids it, and what enforcement refused involving
        it — for audits, evidence bundles, or proving a judge's calibration to a
        third party.


        Free (no judging). 404 if the criterion is not in the workspace.
        Response is Cache-Control: no-store. Hand the WHOLE JSON object to POST
        /v1/verify to check the signature later. An uncalibrated judge still
        returns a certificate that honestly says nothing is measured
        (calibration.measured=false, trust.trust='unmeasured'). enforcement
        counts refusal-ledger rows from the last 90 days whose subject is this
        criterion or whose reason names it.
      operationId: getCriterionCertificate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier.
      responses:
        '200':
          description: >-
            A JSON document whose keys are camelCase (NOT snake_case — it is
            emitted verbatim so its signature can be re-derived): signature:
            {alg:'HS256', key_id, value} | null (with unsigned: true when no
            signing secret is configured), criterionId, name, question (the
            judge prompt), unit ('request'|'trace'), judgeModel, issuedAt,
            calibration: {measured, matrix: {tp,fp,tn,fn}|null, metrics: {n,
            tpr, tprCi, tnr, tnrCi, kappa}|null, labels, holdoutActive (labels
            >= 80), alignedAt, goldenSet: {id, name, size, membershipHash,
            frozenAt, humanKappa, humanAgreement, humanKappaN,
            raterCount}|null}, trust: {trust:
            'trustworthy'|'misaligned'|'under-measured'|'borderline'|'unmeasured',
            failGradesNeeded, passGradesNeeded, tprCi, tnrCi} (or just
            {trust:'unmeasured'}), population: {tag, segment, unit, statement},
            validity: {driftStatus: 'ok'|'flagged', driftReason, driftCheckedAt,
            voidedBy: string[]}, enforcement: {windowDays: 90,
            refusalsInvolvingJudge, lastReason}.
          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>`.

````