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

# What a window of one model's requests would have cost on other models

> Takes the account's most recent successful requests served by `model` and prices
their token counts on every text model (or just `candidates`) at today's prices,
including the account's own rates. An estimate: another model would tokenize,
write and cache differently. BYOK requests are left out.




## OpenAPI

````yaml /openapi.yaml get /v1/requests/reprice
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/reprice:
    get:
      summary: What a window of one model's requests would have cost on other models
      description: >
        Takes the account's most recent successful requests served by `model`
        and prices

        their token counts on every text model (or just `candidates`) at today's
        prices,

        including the account's own rates. An estimate: another model would
        tokenize,

        write and cache differently. BYOK requests are left out.
      operationId: repriceRequests
      parameters:
        - name: model
          in: query
          required: true
          schema:
            type: string
          description: The text model whose requests are repriced
        - name: last
          in: query
          schema:
            type: integer
            default: 100
            maximum: 1000
          description: How many of the newest requests make up the window
        - name: since
          in: query
          schema:
            type: string
            format: date-time
          description: Only requests at or after this ISO timestamp
        - name: candidates
          in: query
          schema:
            type: string
          description: Comma-separated model ids to price; every text model when absent
        - name: header
          in: query
          schema:
            type: string
            example: x-feature:checkout
          description: >-
            Only requests sent with this header set to exactly this value, as
            name:value. Tag requests with a header of your own to pick them out
            later; header names match in any case
      responses:
        '200':
          description: >-
            The window (requests, from, to, tokens), its actual cost, one cost
            per candidate, cheapest first, and a sample to verify with: size
            (the square root of the window, 2 to 50) and request_ids, every
            replayable request in random order, to read size at a time as
            disjoint samples for POST /v1/requests/{id}/replay
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
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.