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

# Get Evaluation Replay

> Return a browser-ready MazeBench practice replay.

Use this route to watch an eligible MazeBench run from the rendered user view
or the exact observation surface available to the agent. The replay includes a
scrubbable sequence of model turns, tool calls, actions, public events, and
budget or usage changes. When the same run explicitly enables
`provider_reasoning: owner_debug`, model-turn frames also include the scrubbed
provider-emitted reasoning row and reasoning-token count when available.

The Droyd web viewer defaults the user perspective to the pinned upstream
MazeBench 3D renderer. It replays camera orientation, actors, terrain, ice,
slopes, lifts, gates, blocks, and the other authored visual mechanics recorded
after the run. An ASCII toggle shows the public board exactly, while Agent view
shows the complete model-visible observation. Playback is self-contained and
does not fetch authored level files from MazeBench or Droyd.

Replay is owner-debug feedback. It is available only when a public MazeBench
smoke or practice evaluation explicitly requests `browser_replay: owner_debug`.
Official race and hidden evaluations do not produce or expose this surface.

To load one task for an embedded player, pass `problem_instance_id`,
`problem_id`, or both. The response then contains only the matching task. Leave
both parameters out to load the complete evaluation replay.

Auth: Droyd API key or signed-in user bearer token. The caller must own the evaluation. Alias: `GET /api/v1/evaluations/{id}/replay`.

`problem_instance_id` and `problem_id` are optional opaque-string query filters,
each limited to 200 characters. Send both when they are available. The
evaluator prefers the exact problem-instance match and uses `problem_id` only
for historical artifacts that lack instance metadata. Filtering happens before
artifact objects are read, so an inline player does not download every replay
in a practice suite.

The selected public MazeBench dataset must have role `smoke` or `practice`, must publish `replay_manifest` in its entrant-feedback policy, and the immutable evaluation `run_config.feedback_capabilities.browser_replay` must equal `owner_debug`. The response contains task manifests using `droyd.mazebench.browser_replay.v1`, content-addressed `droyd.mazebench.visual_replay.v1` render state, ordered frames, and the supported `user` and `agent` perspectives. Visual state is post-run owner feedback and was never included in model context. The response never includes evaluator state hashes, hidden scoring state, scorer inputs, credentials, system or validator prompts, solution traces, or trusted replay evidence.

If the dataset also publishes `provider_reasoning` and the immutable run capability equals `owner_debug`, each task includes its validated `droyd.mazebench.provider_reasoning.v1` rows for correlation by `model_turn_id`. Models that do not emit open reasoning remain valid and return `available: false`, with `reasoning_tokens` populated when the provider reports only a count. Reasoning is diagnostic and was not fed into later turns.

`400 replay_task_selector_invalid` means a task filter is empty or too long.
`403 replay_not_available` means the dataset, mode, policy, or immutable capability does not authorize replay. `404 replay_not_ready` means an eligible evaluation has no published replay yet; `404 replay_task_not_found` means no published artifact matched the requested task; an unknown or non-owned evaluation also returns `404`. `422 replay_manifest_invalid`, `replay_manifest_private_field`, `replay_visual_state_invalid`, `replay_artifact_too_large`, `provider_reasoning_invalid`, or `provider_reasoning_artifact_too_large` means a published owner-debug artifact failed the public safety contract. Do not retry those `422` responses as transient storage failures.


## OpenAPI

````yaml api-key.openapi.json GET /v1/evaluations/{id}/replay
openapi: 3.1.0
info:
  title: Droyd API-key Automation API
  version: 1.0.0
  description: >-
    The production API contract for Droyd API-key automations. It contains only
    operations that accept a Droyd API key. `/v1` is canonical; `/api/v1` is a
    compatibility alias.
servers: []
security:
  - droydApiKeyBearer: []
  - droydApiKeyHeader: []
tags:
  - name: Identity
    description: Account-scoped automation identity and onboarding state.
  - name: Workflows
    description: Caller-owned workflows and research nodes.
  - name: Competitions
    description: Competition readiness, submissions, and race entries.
  - name: Experiments
    description: Experiments, artifacts, agent versions, and evaluations.
  - name: Usage
    description: Caller-owned evaluation usage.
  - name: Billing
    description: Caller-owned prepaid credit balances and funding.
paths:
  /v1/evaluations/{id}/replay:
    get:
      tags:
        - Experiments
      summary: Return an owner-visible MazeBench browser replay.
      description: >-
        Available only for caller-owned public MazeBench smoke/practice
        evaluations created with browser_replay=owner_debug. Returns user and
        agent perspective frames and, when separately enabled, validated
        provider reasoning rows without hidden state or trusted replay evidence.
      operationId: getEvaluationReplay
      parameters:
        - $ref: '#/components/parameters/Id'
        - in: query
          name: problem_instance_id
          required: false
          description: >-
            Return only the replay for this problem instance. Send with
            problem_id when both are known.
          schema:
            type: string
            maxLength: 200
        - in: query
          name: problem_id
          required: false
          description: >-
            Return only the replay for this canonical problem, including as a
            fallback for historical artifacts without instance metadata.
          schema:
            type: string
            maxLength: 200
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  responses:
    Success:
      description: Successful response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Account state or route policy prevents the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The resource is missing or not owned by the API-key account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServerError:
      description: >-
        The request could not be completed. Retry only when the operation's
        idempotency contract permits it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - ok
      properties:
        ok:
          const: true
      additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    droydApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: Droyd API key
      description: A Droyd API key in the Authorization Bearer slot.
    droydApiKeyHeader:
      type: apiKey
      in: header
      name: x-droyd-api-key
      description: A Droyd API key when Authorization is absent.

````