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

# Compact Conversation

> `POST /v1/sessions/{id}/compact` under the conversation's name. A conversation open to
any face names the face to compact in `model` (`@face`, as on POST /v1/states).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/states/{conversation_id}/compact
openapi: 3.1.0
info:
  title: faces
  version: 0.101.0
servers: []
security: []
paths:
  /v1/states/{conversation_id}/compact:
    post:
      tags:
        - Sessions
      summary: Compact Conversation
      description: >-
        `POST /v1/sessions/{id}/compact` under the conversation's name. A
        conversation open to

        any face names the face to compact in `model` (`@face`, as on POST
        /v1/states).
      operationId: compact_conversation_v1_states__conversation_id__compact_post
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              default: {}
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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