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

# Propose prompt edits that would close the gaps graded replays found

> Takes graded replays (from `replayRequest`) and has the judge model propose up to 5 edits
to the instructions the requests carry (system or developer text), so `model` answers the
way the originals did. The prompts and original answers are read from the account's own
request log; only the new answers and grades are sent. One billed call, logged with user
agent `impossibl-replay/1`. Requires a member who may use keys.




## OpenAPI

````yaml /openapi.yaml post /v1/requests/advise
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/advise:
    post:
      summary: Propose prompt edits that would close the gaps graded replays found
      description: >
        Takes graded replays (from `replayRequest`) and has the judge model
        propose up to 5 edits

        to the instructions the requests carry (system or developer text), so
        `model` answers the

        way the originals did. The prompts and original answers are read from
        the account's own

        request log; only the new answers and grades are sent. One billed call,
        logged with user

        agent `impossibl-replay/1`. Requires a member who may use keys.
      operationId: adviseRequests
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - results
              properties:
                model:
                  type: string
                  description: The model the replays ran on
                extra_instructions:
                  type: string
                  description: >-
                    What those replays had appended to their instructions, so
                    new edits build on it
                results:
                  type: array
                  maxItems: 50
                  items:
                    type: object
                    required:
                      - request_id
                      - replay_output
                      - reason
                    properties:
                      request_id:
                        type: string
                      replay_output:
                        type: string
                      score:
                        type:
                          - integer
                          - 'null'
                      reason:
                        type: string
      responses:
        '200':
          description: >-
            had_instructions, summary, changes ([{edit, fixes, request_ids}],
            each a rule to append to the instructions, with the requests it
            addresses) and cost_usd
        '400':
          description: No model, or no graded replays
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: None of the requests were found
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.