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

# Send Request

> This endpoint is used to receive chat request from user through API and return the answer.



## OpenAPI

````yaml POST /chat/request
openapi: 3.1.0
info:
  title: Pawa AI APIs
  description: >-
    API endpoints in Pawa Platform to perform CRUD operations on different
    features using Pawa AI, a digital assistant built for Africa for various
    tasks.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.pawa-ai.com/v1
    description: Production Server
security:
  - bearerAuth: []
paths:
  /chat/request:
    post:
      tags:
        - Chat request
      summary: Chat request
      description: >-
        This endpoint is used to receive chat request from user through API and
        return the answer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ChatRequestDtoRequest'
                - $ref: '#/components/schemas/ChatRequestDtoMultimodel'
                - $ref: '#/components/schemas/ChatRequestDtoTools'
                - $ref: '#/components/schemas/ChatRequestDtoReasoning'
                - $ref: '#/components/schemas/ChatRequestDtoRAG'
                - $ref: '#/components/schemas/ChatRequestDtoRAGAgentic'
                - $ref: '#/components/schemas/ChatRequestDtoMemory'
                - $ref: '#/components/schemas/ChatRequestDtoStructured'
      responses:
        '200':
          description: Chat request processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatRequestResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                badRequest:
                  value:
                    success: false
                    message: Invalid input provided
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    success: false
                    message: Unauthorized access
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  value:
                    success: false
                    message: You do not have permission to access this resource
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  value:
                    success: false
                    message: Resource does not exist
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                tooManyRequests:
                  value:
                    success: false
                    message: Rate limit exceeded. Please try again later.
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                serverError:
                  value:
                    success: false
                    message: Internal server error
components:
  schemas:
    ChatRequestDtoRequest:
      title: Basic Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-ember-20240924
          example: pawa-v1-ember-20240924
          enum:
            - pawa-v1-ember-20240924
            - pawa-v1-blaze-20250318
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPIRequest'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoMultimodel:
      title: Multimodal Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoTools:
      title: Tools Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoReasoning:
      title: Reasoning Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        capabilities:
          description: Capability information (as JSON string)
          example:
            name: reasoning
            effort: medium
          type: object
          items:
            $ref: '#/components/schemas/CapabilityDto'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoRAG:
      title: RAG Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        capabilities:
          description: Capability information (as JSON string)
          example:
            name: reasoning
            effort: medium
          type: object
          items:
            $ref: '#/components/schemas/CapabilityDto'
        knowledgeBase:
          description: Knowledge base reference info (as JSON string)
          example:
            kbReferenceId: 3fdfdff43543fdfdf44434fsfdf
            IsMust: true
          type: object
          items:
            $ref: '#/components/schemas/KnowledgeBaseDto'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoRAGAgentic:
      title: Agentic RAG Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        capabilities:
          description: Capability information (as JSON string)
          example:
            name: reasoning
            effort: medium
          type: object
          items:
            $ref: '#/components/schemas/CapabilityDto'
        knowledgeBase:
          description: Knowledge base reference info (as JSON string)
          example:
            kbReferenceId: 3fdfdff43543fdfdf44434fsfdf
            IsMust: true
          type: object
          items:
            $ref: '#/components/schemas/KnowledgeBaseDto'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoMemory:
      title: In Memory Chat
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        capabilities:
          description: Capability information (as JSON string)
          example:
            name: reasoning
            effort: medium
          type: object
          items:
            $ref: '#/components/schemas/CapabilityDto'
        knowledgeBase:
          description: Knowledge base reference info (as JSON string)
          example:
            kbReferenceId: 3fdfdff43543fdfdf44434fsfdf
            IsMust: true
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBaseDto'
        memoryChat:
          description: Previous messages in the conversation (as a JSON string)
          example:
            - role: user
              content:
                - type: text
                  text: Habari yako?
            - role: assistant
              content:
                - type: text
                  text: Nzuri sana, asante. Wewe je?
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
      required:
        - model
        - messages
    ChatRequestDtoStructured:
      title: Structured Ouput
      type: object
      properties:
        model:
          type: string
          description: The name of the model to use.
          default: pawa-v1-blaze-20250318
          example: pawa-v1-blaze-20250318
          enum:
            - pawa-v1-blaze-20250318
            - pawa-v1-ember-20240924
        messages:
          description: Messages to send to the model
          example:
            - role: system
              content:
                - type: text
                  text: 'You are a helpful assistant that answers questions asked '
            - role: user
              content:
                - type: text
                  text: What is the current president of Tanzania?
                - type: image_url
                  image_url:
                    url: https://example.com/image.png
          type: array
          items:
            $ref: '#/components/schemas/ChatMessageAPI'
        tools:
          description: >-
            Tools to provide to the model (as a JSON string). Eg. Built-in tools
            includes web_search_tool
          example:
            - type: function
              function:
                name: convert_usd_to_tsh
                description: Converts an amount in USD to Tanzanian Shillings.
                strict: true
                parameters:
                  type: object
                  properties:
                    amount_usd:
                      description: Amount in USD
                      type: number
                  required:
                    - amount_usd
                  additionalProperties: false
            - type: pawa_tool
              pawa_tool: web_search_tool
          type: array
          items:
            $ref: '#/components/schemas/ToolItem'
        capabilities:
          description: Capability information (as JSON string)
          example:
            name: reasoning
            effort: medium
          type: object
          items:
            $ref: '#/components/schemas/CapabilityDto'
        knowledgeBase:
          description: Knowledge base reference info (as JSON string)
          example:
            kbReferenceId: 3fdfdff43543fdfdf44434fsfdf
            IsMust: true
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBaseDto'
        memoryChat:
          description: Previous messages in the conversation (as a JSON string)
          example:
            - role: user
              content:
                - type: text
                  text: Habari yako?
            - role: assistant
              content:
                - type: text
                  text: Nzuri sana, asante. Wewe je?
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        temperature:
          type: number
          description: Sampling temperature
          default: 0.1
          minimum: 0
          maximum: 2
        tool_choice:
          type: string
          description: Tool selection strategy
          default: auto
          example: auto
          enum:
            - auto
            - required
        top_p:
          type: number
          description: Nucleus sampling (top-p)
          default: 0.95
          minimum: 0
          maximum: 1
        max_tokens:
          type: number
          description: Maximum number of tokens in the response
          default: 4096
        frequency_penalty:
          type: number
          description: Penalty for repeated tokens
          default: 0.3
          minimum: -2
          maximum: 2
        presence_penalty:
          type: number
          description: Penalty for new topic tokens
          default: 0.3
          minimum: -2
          maximum: 2
        seed:
          type: number
          description: Random seed for reproducibility
          default: 2024
        stream:
          type: boolean
          description: Whether to stream the response
          default: false
        response_format:
          description: Optional response format specification
          example:
            type: json_schema
            json_schema:
              name: foo
              strict: true
              schema:
                type: object
                properties:
                  answer:
                    type: string
                    pattern: ^\d+$
                required:
                  - answer
                additionalProperties: false
          allOf:
            - $ref: '#/components/schemas/ResponseFormatDto'
      required:
        - model
        - messages
    ChatRequestResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Chat request processed successfully
        data:
          $ref: '#/components/schemas/ChatRequestData'
      required:
        - success
        - message
        - data
    ErrorResponse:
      required:
        - success
        - message
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: An error occurred
    ChatMessageAPIRequest:
      type: object
      properties:
        role:
          type: string
          description: The role of the message sender
          example: user
          enum:
            - user
            - system
            - assistant
            - tool
            - function
        content:
          type: array
          description: Content of the message
          example:
            - type: text
              text: Hello
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
      required:
        - role
        - content
    ChatMessageAPI:
      type: object
      properties:
        role:
          type: string
          description: The role of the message sender
          example: user
          enum:
            - user
            - system
            - assistant
            - tool
            - function
        content:
          type: array
          description: >-
            Content of the message as a list of typed blocks. For plain text,
            use an array with a text block, for example: [{ "type": "text",
            "text": "What is the current president of Tanzania?" }].
          example:
            - type: text
              text: What is the current president of Tanzania?
            - type: image_url
              image_url:
                url: https://example.com/image.png
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
              - $ref: '#/components/schemas/ImageContent'
      required:
        - role
        - content
    ToolItem:
      oneOf:
        - type: object
          title: Custom Tools
          properties:
            type:
              type: string
              default: function
              example: function
              enum:
                - function
            function:
              $ref: '#/components/schemas/FunctionTool'
          required:
            - type
            - function
        - type: object
          title: Built-In Tools
          properties:
            type:
              type: string
              default: pawa_tool
              example: pawa_tool
              enum:
                - pawa_tool
            pawa_tool:
              type: string
          required:
            - type
            - pawa_tool
    CapabilityDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the capability
          example: reasoning
        effort:
          type: string
          description: Effort level
          example: medium
      required:
        - name
        - effort
    KnowledgeBaseDto:
      type: object
      properties:
        kbReferenceId:
          type: string
          description: Knowledge base reference ID
          example: 3fdfdff43543fdfdf44434fsfdf
        isMust:
          type: boolean
          description: >-
            Whether this knowledge base must be used every time the request is
            made. If True, the model will always use this knowledge base when
            generating responses, and if False, the model will decide (agentic)
            whether to use it based on the context of the conversation.
          example: true
          default: true
          enum:
            - true
            - false
      required:
        - kbReferenceId
    ChatMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - user
            - system
            - assistant
            - tool
            - function
          description: The role of the message sender (user or assistant)
          example: user
        content:
          description: The content of the message
          example:
            - type: text
              text: Hello
          type: array
          items:
            $ref: '#/components/schemas/MessageContentItem'
      required:
        - role
        - content
    ResponseFormatDto:
      type: object
      properties:
        type:
          type: string
          description: The type of response format
          enum:
            - json_schema
          example: json_schema
        json_schema:
          type: object
          description: The JSON schema definition for the response
          example:
            name: foo
            strict: true
            schema:
              type: object
              properties:
                answer:
                  type: string
                  pattern: ^\d+$
              required:
                - answer
              additionalProperties: false
      required:
        - type
        - json_schema
    ChatRequestData:
      type: object
      properties:
        request:
          type: array
          items:
            $ref: '#/components/schemas/ChatRequest'
        created:
          type: string
          example: 1753304351
        model:
          type: string
          example: pawa-v1-blaze-20250318
        object:
          type: string
          example: chat.request
      required:
        - request
        - created
        - model
        - object
    TextContent:
      title: TextContent
      type: object
      properties:
        type:
          type: string
          enum:
            - text
          description: Type of the message content
        text:
          type: string
          description: Text content of the message
      required:
        - type
        - text
    ImageContent:
      title: ImageContent
      type: object
      properties:
        type:
          type: string
          enum:
            - image_url
          description: Type of the message content
        image_url:
          description: Image URL object
          allOf:
            - $ref: '#/components/schemas/ImageUrl'
      required:
        - type
        - image_url
    FunctionTool:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        strict:
          type: boolean
        parameters:
          $ref: '#/components/schemas/FunctionParametersSchema'
      required:
        - name
        - description
        - strict
        - parameters
    MessageContentItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
          description: Type of the message content
        text:
          type: string
          description: Text content of the message
      required:
        - type
        - text
    ChatRequest:
      type: object
      properties:
        finish_reason:
          type: string
          example: stop
        message:
          $ref: '#/components/schemas/ChatRequestMessage'
        matched_stop:
          type: number
          example: 106
      required:
        - finish_reason
        - message
        - matched_stop
    ImageUrl:
      type: object
      properties:
        url:
          type: string
      required:
        - url
    FunctionParametersSchema:
      type: object
      properties:
        type:
          type: string
          default: object
          example: object
          enum:
            - object
        properties:
          type: object
          description: Properties for the parameters object
          additionalProperties:
            type: object
            properties:
              description:
                type: string
              type:
                type: string
            required:
              - description
              - type
        required:
          description: Required parameter names
          type: array
          items:
            type: string
        additionalProperties:
          type: boolean
          description: Allow additional properties
          default: false
      required:
        - type
        - properties
        - required
        - additionalProperties
    ChatRequestMessage:
      type: object
      properties:
        role:
          type: string
          example: assistant
        content:
          type: string
          example: Mimi ni pawa...
      required:
        - role
        - content
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````