Responses

Compact response

Changed on

Compacts a conversation by summarizing older items to free up context window space. Returns the next context window: a compaction item containing the generated summary, followed by the most recent items verbatim.

post/v1/responses/compact

Request

  • Base URL
    https://my.orq.ai
  • Auth
    HTTP bearer

Request body

instructionsstring

Custom instructions for the compaction summarization.

modelstring

The model to use for compaction in provider/model format (e.g. openai/gpt-4o). Required.

previous_response_idstring

The ID of a stored response whose conversation is compacted; input is appended after it.

prompt_cache_keystring

Key for prompt caching across requests.

Response

Compaction completed successfully.

created_atinteger required

Unix timestamp (seconds) when the response was created.

idstring required

The ID of the compaction response.

object'response.compaction' required

Always "response.compaction".

Changes

    • info

      added the new optional request property ///

    • info

      added the new optional request property ///

    • info

      added the new agent_message enum value to the request property ///

    • info

      request property /// list-of-types was widened by adding types array to media type application/json

    • breaking

      removed the enum value agent_message of the request property ///

    • breaking

      request property /// list-of-types was narrowed by removing types array from media type application/json

    • warning

      removed the request property ///

    • warning

      removed the request property ///