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

# Chat With Resource

> Ask anything to your resource.



## OpenAPI

````yaml /api-reference/v1.json post /v1/resource/chat
openapi: 3.0.0
info:
  title: Droxy API
  description: ''
  version: '1.0'
  contact: {}
servers:
  - url: https://api.droxy.ai
security: []
tags: []
paths:
  /v1/resource/chat:
    post:
      tags:
        - Resource
      summary: Chat With Resource
      description: Ask anything to your resource.
      operationId: ApiResourceController_chatWithResource
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiChatResourceDto'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceChatResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '402':
          description: Usage limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '404':
          description: Element not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    ApiChatResourceDto:
      type: object
      properties:
        resourceId:
          type: string
          description: The resource's id.
        conversation:
          description: An array of messages.
          type: array
          items:
            $ref: '#/components/schemas/ApiChatMessageDto'
      required:
        - resourceId
        - conversation
    ApiResourceChatResponseDto:
      type: object
      properties:
        text:
          type: string
          description: The resource's chat response.
      required:
        - text
    ApiErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: Error status code.
        message:
          description: Error message or an array of error messages.
          type: array
          items:
            type: string
        error:
          type: string
          description: Source of the error.
      required:
        - statusCode
        - message
        - error
    ApiChatMessageDto:
      type: object
      properties:
        text:
          type: string
          description: The message's text.
        fromUser:
          type: boolean
          description: If the message is from the user.
      required:
        - text
        - fromUser
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````