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

# Re-run with the same config

> Same version, candidates and repeats as the given run. Without `estimateToken` it returns a fresh estimate (`kind: estimate`); with one it starts the run (`kind: run`) under the same guards as starting a run.



## OpenAPI

````yaml /docs-openapi.json post /v1/benchmarks/{id}/runs/{runId}/rerun
openapi: 3.1.0
info:
  title: Zelto REST API
  version: v1
  description: >-
    Programmatic access to your Zelto organization. Every endpoint is scoped to
    the organization the API key belongs to. Mint a key at Settings →
    Integrations → API integration.
servers:
  - url: https://api.zelto.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Monitors
    description: Filtered, asynchronous exports of stored monitor results.
  - name: Agents
    description: Voice and text agents normalised through Zelto's ingestion pipeline.
  - name: Conversations
    description: >-
      Phone calls, chats, and voicemails — plus their transcripts and
      recordings.
  - name: Customer Metrics
    description: >-
      Customer-provided evaluations attached to a conversation (requires metrics
      enabled).
  - name: Reviews
    description: Human review state for conversations.
  - name: Buckets
    description: Reviewer routing — group conversations for batched review.
  - name: Companies
    description: Clients or brands your agents work for, and their logos.
  - name: Findings
    description: >-
      Structured issues discovered during analysis, with optional conversation
      attachments and comments.
  - name: Experiments
    description: >-
      Prospective measurement of two externally routed prompt versions across
      independent monitor outcomes.
  - name: Organizations
    description: >-
      Headless org provisioning. Requires an admin/service API key (not a
      read-only org-scoped customer key).
  - name: AI providers
    description: >-
      Your organization's own (bring-your-own) AI provider keys. Monitors can
      run on them instead of Zelto's built-in models. Owner or admin keys only;
      the secret is write-only.
  - name: Benchmarks
    description: >-
      Repeatable evaluations of agent prompts, models and speech-to-text engines
      over a fixed set of cases, scored by Judges.
paths:
  /v1/benchmarks/{id}/runs/{runId}/rerun:
    post:
      tags:
        - Benchmarks
      summary: Re-run with the same config
      description: >-
        Same version, candidates and repeats as the given run. Without
        `estimateToken` it returns a fresh estimate (`kind: estimate`); with one
        it starts the run (`kind: run`) under the same guards as starting a run.
      operationId: rerunBenchmarkRun
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/BenchmarkIdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                estimateToken:
                  type: string
                  minLength: 1
                  maxLength: 8192
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: estimate
                      estimate:
                        $ref: '#/components/schemas/BenchmarkRunEstimate'
                    required:
                      - kind
                      - estimate
                    additionalProperties: {}
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: run
                      run:
                        $ref: '#/components/schemas/BenchmarkRun'
                    required:
                      - kind
                      - run
                    additionalProperties: {}
          headers:
            Idempotent-Replayed:
              description: >-
                `true` when this response replays an earlier request with the
                same Idempotency-Key.
              schema:
                type: string
                enum:
                  - 'true'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: >-
            `approval_required`: This run would take the organization past its
            monthly benchmark spend cap, so it is waiting for an owner's
            approval.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkError'
        '403':
          description: >-
            `plan_limit`: This would exceed a Benchmarks limit on the
            organization's plan. `phi_mode_blocked`: The organization is in PHI
            mode, which allows only Bedrock-routed models and AWS Transcribe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkError'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            `estimate_stale`: The benchmark changed since this estimate.
            `conflict`: The resource is not in a state that allows this.
            `idempotency_key_reused`: This Idempotency-Key was already used for
            a different request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkError'
components:
  parameters:
    BenchmarkIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional key, unique per organization (1-255 printable ASCII characters,
        e.g. a UUID). Resending a request with the same key returns the original
        result instead of creating a second one; reusing it for a different
        request is a 409 `idempotency_key_reused`.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    BenchmarkRunEstimate:
      type: object
      properties:
        estimateToken:
          type: string
          description: Pass unchanged to start the run. Single use; expires in 15 minutes.
        benchmarkId:
          type: string
        versionNumber:
          type:
            - number
            - 'null'
        isDraftRun:
          type: boolean
        repeats:
          type: number
        caseCount:
          type: number
        cellCount:
          type: number
        perCandidate:
          type: array
          items:
            type: object
            properties:
              model:
                type: string
              agentVersionId:
                type:
                  - string
                  - 'null'
              cells:
                type: number
              unitCostUsd:
                type: number
                description: USD.
              costUsd:
                type: number
                description: USD.
            required:
              - model
              - agentVersionId
              - cells
              - unitCostUsd
              - costUsd
            additionalProperties: {}
        totalCostUsd:
          type: number
          description: >-
            What Zelto bills (platform cost plus margin, plus bring-your-own-key
            fees).
        warnings:
          type: array
          items:
            type: string
        unverifiedReferences:
          description: >-
            STT: cases scored against a reference transcript nobody has checked
            yet (warning `unverified_references`).
          type: integer
        missingVariables:
          description: >-
            LLM: cases whose prompt references a `{{variable}}` they don't fill
            (warning `missing_variables`).
          anyOf:
            - type: object
              properties:
                pairs:
                  type: integer
                  description: >-
                    Case × candidate pairs that will error
                    `missing_variable:<name>` at $0, before the model call.
                cells:
                  type: integer
                  description: Their cells (pairs × repeats).
                names:
                  type: array
                  items:
                    type: string
                  description: The missing variable names, most frequent first.
              required:
                - pairs
                - cells
                - names
              additionalProperties: {}
            - type: 'null'
        planLimits:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                const: plan_limit
              cap:
                type: string
                description: >-
                  `cells_per_run` (includes the hard maximum of 5,000),
                  `runs_per_month` or `concurrent_runs`.
              limit:
                type: number
              current:
                type: number
              requested:
                type: number
            required:
              - code
              - cap
              - limit
              - current
              - requested
            additionalProperties: {}
          description: >-
            Plan limits starting this run would exceed. Non-empty adds the
            warning `plan_limit`; starting returns 403 `plan_limit`.
        canStart:
          type: boolean
          description: >-
            False when starting now would be refused (a plan limit, or spend
            `blocked`).
        candidates:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              model:
                type: string
              agentVersionId:
                type:
                  - string
                  - 'null'
              agentVersionLabel:
                type:
                  - string
                  - 'null'
              aiKeyId:
                type:
                  - string
                  - 'null'
              billedBy:
                type: string
                enum:
                  - zelto
                  - byok
            required:
              - label
              - model
              - agentVersionId
              - agentVersionLabel
              - aiKeyId
              - billedBy
            additionalProperties: {}
        billing:
          type: object
          properties:
            typicalCostUsd:
              type: number
              description: USD.
            billedByYourKeysUsd:
              type: number
              description: Billed to your own provider keys, not by Zelto.
            costCapUsd:
              type: number
              description: The run's hard cap (1.5 × the estimate).
            expiresAt:
              type: string
          required:
            - typicalCostUsd
            - billedByYourKeysUsd
            - costCapUsd
            - expiresAt
          additionalProperties: {}
        spend:
          type: object
          properties:
            decision:
              type: string
              enum:
                - allowed
                - approval_required
                - blocked
              description: What starting now would do.
            reason:
              anyOf:
                - type: string
                  enum:
                    - monthly_cap
                    - threshold
                    - free_credit_exhausted
                - type: 'null'
            monthToDateUsd:
              type: number
              description: USD.
            monthlyCapUsd:
              anyOf:
                - type: number
                  description: USD.
                - type: 'null'
            creditRemainingUsd:
              type: number
              description: USD.
          required:
            - decision
            - reason
            - monthToDateUsd
            - monthlyCapUsd
            - creditRemainingUsd
          additionalProperties: {}
      required:
        - estimateToken
        - benchmarkId
        - versionNumber
        - isDraftRun
        - repeats
        - caseCount
        - cellCount
        - perCandidate
        - totalCostUsd
        - warnings
        - planLimits
        - canStart
        - candidates
        - billing
        - spend
      additionalProperties: {}
      description: A priced run plan plus the token that starts it.
    BenchmarkRun:
      type: object
      properties:
        id:
          type: string
        benchmarkId:
          type: string
        number:
          type: number
        status:
          type: string
          enum:
            - awaiting_approval
            - queued
            - running
            - completed
            - failed
            - cancelled
            - rejected
          description: >-
            `awaiting_approval`: waiting for an owner (over the spend cap).
            `rejected`: an owner rejected it or the request expired.
        cancelRequested:
          type: boolean
        trigger:
          type: string
          enum:
            - ui
            - api
            - mcp
        versionNumber:
          type:
            - number
            - 'null'
        isDraftRun:
          type: boolean
        publishedAsVersionNumber:
          description: >-
            Draft runs only: the version later published from the draft this run
            ran on (it was the draft at the time). Null while that draft is
            still open, and for runs of a published version.
          type:
            - number
            - 'null'
        repeats:
          type: number
        totalCells:
          type: number
        completedCells:
          type: number
        passedCells:
          type: number
        failedCells:
          type: number
        erroredCells:
          type: number
        skippedCells:
          type: number
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkCandidate'
        results:
          type: array
          items:
            type: object
            properties:
              candidateId:
                type: string
              passRate:
                type:
                  - number
                  - 'null'
              wer:
                type:
                  - number
                  - 'null'
              p50LatencyMs:
                type:
                  - number
                  - 'null'
              costUsd:
                type:
                  - number
                  - 'null'
            required:
              - candidateId
              - passRate
              - wer
              - p50LatencyMs
              - costUsd
            additionalProperties: {}
        estimatedCostUsd:
          type: number
          description: USD.
        costCapUsd:
          anyOf:
            - type: number
              description: USD.
            - type: 'null'
        actualCostUsd:
          anyOf:
            - type: number
              description: USD.
            - type: 'null'
        caseSetHash:
          type:
            - string
            - 'null'
        failureReason:
          type:
            - string
            - 'null'
        createdBy:
          type: string
        createdByUser:
          $ref: '#/components/schemas/BenchmarkRunAuthor'
        createdAt:
          type: string
        startedAt:
          type:
            - string
            - 'null'
        finishedAt:
          type:
            - string
            - 'null'
        rescoredAt:
          type:
            - string
            - 'null'
        approval:
          anyOf:
            - $ref: '#/components/schemas/BenchmarkRunApproval'
            - type: 'null'
      required:
        - id
        - benchmarkId
        - number
        - status
        - cancelRequested
        - trigger
        - versionNumber
        - isDraftRun
        - repeats
        - totalCells
        - completedCells
        - passedCells
        - failedCells
        - erroredCells
        - skippedCells
        - candidates
        - results
        - estimatedCostUsd
        - costCapUsd
        - actualCostUsd
        - caseSetHash
        - failureReason
        - createdBy
        - createdByUser
        - createdAt
        - startedAt
        - finishedAt
        - rescoredAt
        - approval
      additionalProperties: {}
      description: 'A run: what it compares, its state, progress and cost.'
    BenchmarkError:
      type: object
      required:
        - error
        - code
        - message
      properties:
        error:
          type: string
          enum:
            - validation_failed
            - invalid_parameter
            - approval_required
            - plan_limit
            - phi_mode_blocked
            - owner_required
            - not_entitled
            - forbidden
            - not_found
            - payload_too_large
            - estimate_stale
            - pointer_moved
            - no_draft_changes
            - conflict
            - idempotency_key_reused
            - rate_limited
            - model_unavailable
          description: Stable error code (same value as `code`).
        code:
          type: string
          enum:
            - validation_failed
            - invalid_parameter
            - approval_required
            - plan_limit
            - phi_mode_blocked
            - owner_required
            - not_entitled
            - forbidden
            - not_found
            - payload_too_large
            - estimate_stale
            - pointer_moved
            - no_draft_changes
            - conflict
            - idempotency_key_reused
            - rate_limited
            - model_unavailable
          description: Stable, machine-readable cause; match on this.
        message:
          type: string
          description: A plain-English sentence saying what is wrong.
        hint:
          type: string
          description: The next step to try.
        details:
          type: object
          additionalProperties: true
          description: >-
            Code-specific context, for example `approvalRequestId` with
            `approval_required` or `cap` with `plan_limit`.
    BenchmarkCandidate:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        model:
          type: string
          description: 'LLM: "openrouter/anthropic/claude-…"; STT: "deepgram/nova-3".'
        agentVersionId:
          description: LLM only. Null = the prompt as recorded on each case.
          type:
            - string
            - 'null'
        agentVersionLabel:
          type:
            - string
            - 'null'
        isReference:
          type: boolean
      required:
        - id
        - label
        - model
        - agentVersionId
        - agentVersionLabel
      description: 'What a run compares: a model plus a prompt source, or an STT engine.'
    BenchmarkRunAuthor:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        image:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - image
      description: An organization member.
    BenchmarkRunApproval:
      type: object
      properties:
        id:
          type: string
        runId:
          type: string
        reason:
          type: string
          enum:
            - monthly_cap
            - threshold
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - expired
        estimatedCostUsd:
          type: number
          description: USD.
        monthToDateUsd:
          anyOf:
            - type: number
              description: USD.
            - type: 'null'
        capUsd:
          anyOf:
            - type: number
              description: USD.
            - type: 'null'
        requestedBy:
          type:
            - string
            - 'null'
        decidedBy:
          type:
            - string
            - 'null'
        decisionNote:
          type:
            - string
            - 'null'
        decidedAt:
          type:
            - string
            - 'null'
        expiresAt:
          type: string
        createdAt:
          type: string
      required:
        - id
        - runId
        - reason
        - status
        - estimatedCostUsd
        - monthToDateUsd
        - capUsd
        - requestedBy
        - decidedBy
        - decisionNote
        - decidedAt
        - expiresAt
        - createdAt
      additionalProperties: {}
      description: An owner approval request for a run over the spend cap or threshold.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Short error name: `Unauthorized`, `Validation failed`, `Not found`,
            or a stable snake_case code you can match on, such as
            `unknown_query_parameter`, `invalid_parameter`, `payload_too_large`
            or `not_found`.
        message:
          type: string
          description: A plain-English sentence saying what is wrong and how to fix it.
        code:
          type: string
          description: >-
            Stable, machine-readable cause; match on this rather than on `error`
            or `message`. On a 401: `missing_credentials`,
            `malformed_credentials`, `ingest_key_not_allowed` (a write-only
            observability ingest key was used on an endpoint that needs an API
            key), `key_expired` or `invalid_credentials`. Elsewhere, for
            example: `not_found`, `invalid_parameter`,
            `unknown_query_parameter`, `missing_parameter`, `validation_failed`,
            `invalid_json`, `payload_too_large`, `conversation_not_found`,
            `plan_required`.
        hint:
          type: string
          description: >-
            The next step to try: where to find the right id, which parameters
            the endpoint takes, how to upgrade the plan, how to authenticate.
        parameter:
          type: string
          description: 'With `invalid_parameter`: the query parameter that was rejected.'
        unknown:
          type: array
          items:
            type: string
          description: >-
            With `unknown_query_parameter`: the parameters that were sent but
            are not accepted here.
        valid:
          type: array
          items:
            type: string
          description: >-
            With `unknown_query_parameter`: the parameters this endpoint
            accepts.
        details:
          type: object
          additionalProperties: true
  responses:
    ValidationFailed:
      description: >-
        The request body or query string failed validation. `code` says which
        kind (`validation_failed`, `invalid_json`, `invalid_parameter`,
        `unknown_query_parameter`, `missing_parameter`), and an enum filter
        names the allowed values in `valid` (every repeated value is checked,
        e.g. `?status=open&status=zz` is a 400). A `validation_failed` body also
        carries `message` (the first failing fields), `hint` (how to fix it, for
        example that a finding `description` is a TipTap JSON document and not a
        string) and `details` (field name to messages).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing or invalid API key. The body names the cause in `code` (for
        example `ingest_key_not_allowed` when a write-only ingest key is used
        here) with a `message` and `hint`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        Resource not found in your organization. Also returned when a path id is
        not a UUID, and `{ "error": "not_found" }` for a path this API does not
        have. The body keeps `error: "Not found"` and adds `code: "not_found"`
        and a `hint`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer YOUR_API_KEY`. The key resolves to a single
        organization.

````

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