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

# Send one past request again on another model, and grade the answer

> Sends the stored request again, unchanged except for `model` (non-streaming, standard
tier), as an ordinary billed request under the key that sent the original. Then a fixed
judge model compares the new answer with the original one and scores it 1-5. Both calls
are billed to the account and logged with user agent `impossibl-replay/1`, which reprice
windows leave out. Requires a member who may use keys. Refused with 422 when the request
cannot be replayed faithfully: BYOK, a truncated or media-stripped body, a Gemini-shaped
endpoint, a stored conversation (`previous_response_id`), or a revoked key. On a reasoning
model the request's output cap is raised to the model's own limit, so it has room to think
before it answers.




## OpenAPI

````yaml /openapi.yaml post /v1/requests/{id}/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/{id}/replay:
    post:
      summary: Send one past request again on another model, and grade the answer
      description: >
        Sends the stored request again, unchanged except for `model`
        (non-streaming, standard

        tier), as an ordinary billed request under the key that sent the
        original. Then a fixed

        judge model compares the new answer with the original one and scores it
        1-5. Both calls

        are billed to the account and logged with user agent
        `impossibl-replay/1`, which reprice

        windows leave out. Requires a member who may use keys. Refused with 422
        when the request

        cannot be replayed faithfully: BYOK, a truncated or media-stripped body,
        a Gemini-shaped

        endpoint, a stored conversation (`previous_response_id`), or a revoked
        key. On a reasoning

        model the request's output cap is raised to the model's own limit, so it
        has room to think

        before it answers.
      operationId: replayRequest
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              properties:
                model:
                  type: string
                  description: The text model to replay the request on
                extra_instructions:
                  type: string
                  description: >
                    Text appended to the instructions the stored request carries
                    (its system or

                    developer message, `system`, or `instructions`), to check a
                    prompt fix such as

                    the edits from `adviseRequests`. The judge still grades
                    against the original request.
      responses:
        '200':
          description: >-
            original (model, cost_usd, tokens, max_output_tokens, output),
            replay (id, model, cost_usd, estimated_cost_usd, tokens, output) and
            judge (model, score, reason, cost_usd)
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Your role in this workspace does not allow spending
        '404':
          description: Unknown request id
        '422':
          description: This request cannot be replayed
        '502':
          description: The replay model failed
components:
  responses:
    BadRequest:
      description: Malformed request (bad JSON, or missing required fields).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: '`model` and `messages` are required'
              type: invalid_request_error
    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.