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

# Chat Stream



## OpenAPI

````yaml /api/lapathoniia-openapi.json post /chat/stream
openapi: 3.1.0
info:
  title: Lapathoniia API
  version: 1.0.0
  description: |-
    Lapathoniia Chat, Batch and User API.

    Base URL: `https://app.lapathoniia.top`

    All endpoints require a Bearer API key except `/health`.
servers:
  - url: https://app.lapathoniia.top
    description: Production
security:
  - bearerAuth: []
paths:
  /chat/stream:
    post:
      summary: Chat Stream
      operationId: chat_stream_chat_stream_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChatRequest:
      properties:
        message:
          type: string
          title: Message
        model:
          type: string
          title: Model
        session_id:
          type: string
          title: Session Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          default: anonymous
        web_search:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Web Search
          default: false
        deep_research:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deep Research
          default: false
        connectors:
          anyOf:
            - {}
            - type: 'null'
          title: Connectors
          default: false
        chat_history:
          anyOf:
            - items:
                type: object
              type: array
            - type: 'null'
          title: Chat History
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key
        images:
          anyOf:
            - items:
                $ref: '#/components/schemas/ImageData'
              type: array
            - type: 'null'
          title: Images
        files:
          anyOf:
            - items:
                $ref: '#/components/schemas/FileData'
              type: array
            - type: 'null'
          title: Files
      type: object
      required:
        - message
        - model
        - session_id
      title: ChatRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ImageData:
      properties:
        base64:
          type: string
          title: Base64
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
          default: image/jpeg
      type: object
      required:
        - base64
      title: ImageData
    FileData:
      properties:
        name:
          type: string
          title: Name
        content:
          type: string
          title: Content
      type: object
      required:
        - name
        - content
      title: FileData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk-...

````