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

# Replay a whole sample at once, streaming each graded answer as it lands

> The batch form of `replayRequest`. Every replay of the sample runs concurrently, and the
response is NDJSON: `slot` (a slot took a request), `skipped` (one could not be replayed;
the next id stands in), `result` or `error` per slot and variant, `unavailable` (no id left
for a slot), then `done` with how many ids were used. Blank lines are heartbeats. `request_ids`
is read in order: the first `size` fill the sample and the rest are spares. Each of
`variants` (extra instructions, as in `replayRequest`; '' for none) runs on every request.




## OpenAPI

````yaml /openapi.yaml post /v1/requests/replay
openapi: 3.1.0
info:
  title: Impossibl AI API
  version: 0.0.1
  description: >
    The Impossibl AI API is one API for all AI providers, OpenAI-compatible
    across OpenAI,

    Anthropic, Google, xAI, and more (`GET /v1/models` lists the full catalog),

    billed from a prepaid credit balance.


    Usage is billed at the model rates published by GET /v1/models with no usage
    markup.

    Prepaid credit purchases charge a separate fixed 5% platform fee before tax.


    **Get started**

    Create a workspace key at https://impossibl.com/dashboard, then call a model
    with

    `Authorization: Bearer <key>` and a full model ID from `GET /v1/models`.

    The walkthrough is at https://impossibl.com/docs/quickstart.


    Agents can create a funded account and initial key with `POST /v1/accounts`.

    The current API continues to use `/v1`; there is no `/v2` base URL.

    Conversation history is managed by your application. Provider-specific SDK

    endpoints and fields outside this specification are not guaranteed
    compatible.
servers:
  - url: https://api.impossibl.com
    description: Production
  - url: http://localhost:8787
    description: Local dev
security:
  - BearerKey: []
paths:
  /v1/requests/replay:
    post:
      summary: Replay a whole sample at once, streaming each graded answer as it lands
      description: >
        The batch form of `replayRequest`. Every replay of the sample runs
        concurrently, and the

        response is NDJSON: `slot` (a slot took a request), `skipped` (one could
        not be replayed;

        the next id stands in), `result` or `error` per slot and variant,
        `unavailable` (no id left

        for a slot), then `done` with how many ids were used. Blank lines are
        heartbeats. `request_ids`

        is read in order: the first `size` fill the sample and the rest are
        spares. Each of

        `variants` (extra instructions, as in `replayRequest`; '' for none) runs
        on every request.
      operationId: replayRequests
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - request_ids
                - size
              properties:
                model:
                  type: string
                  description: The text model to replay the requests on
                request_ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1000
                size:
                  type: integer
                  minimum: 1
                  maximum: 50
                variants:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 2
      responses:
        '200':
          description: NDJSON events, one per line
          content:
            application/x-ndjson: {}
        '400':
          description: Bad model, ids, size or variants
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: authentication_error
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: >-
                Common types include authentication_error,
                invalid_request_error, insufficient_quota, billing_required,
                permission_error, upstream_error, and provider_not_configured.
  securitySchemes:
    BearerKey:
      type: http
      scheme: bearer
      description: Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.

````

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