The OpenAPI Reference for the WorqHat APIs. You can use this OpenAPI description to understand the capabilities of the WorqHat APIs and how to interact with them.

The OpenAPI description is a document that describes all the aspects of the APIs, including:

  • Available endpoints (e.g., /ai, /collections)
  • Operations on each endpoint
  • Input and output for each operation (e.g., parameters, request body, responses)
  • Authentication methods
  • Contact information, license, terms of use, and other information.

You can use the OpenAPI description to:

  • Generate client libraries, stubs, and other code artifacts in your preferred programming language.
  • Create API documentation and developer portals.
  • Test and validate your APIs.
  • Plan and design your APIs before you write any code.

To use the OpenAPI description:

  1. Copy/Download the OpenAPI description file.
  2. Use an OpenAPI tool to read the file. There are many tools available, including Swagger UI, ReDoc, Postman, and others.
  3. Explore the API in the tool. You can see all the endpoints, operations, and details.
  4. Generate code, documentation, tests, or other artifacts as needed.

Remember, the OpenAPI description is just a starting point. You’ll need to understand the specific requirements and constraints of your project to use the APIs effectively.

GitHub Repository

The OpenAPI description is available in the WorqHat GitHub repository.

OpenAPI Description

openapi: 3.1.0
info:
  title: WorqHat AI API Endpoints
  description: >
    This API provides access to various AI services offered by WorqHat.
    It includes endpoints for user authentication, Databases and AI access.
    Users can authenticate themselves, access AI services, and manage their databases.
  version: 2.1.2
  termsOfService: 'https://www.worqhat.com/terms-of-service'
  contact:
    name: WorqHat Support
    email: support@worqhat.com
    url: https://www.worqhat.com/contact-us
  license:
    name: Apache 2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
externalDocs:
  description: 'Read more at https://docs.worqhat.com'
  url: 'https://docs.worqhat.com'
tags:
 - name: Authentication
   description: Endpoints for user authentication, including login, logout, and password reset.
 - name: AI Services
   description: Endpoints for accessing various AI services, such as image recognition, natural language processing, and machine learning models.
 - name: AI Dataset Management
   description: Endpoints for managing custom trained AI models.
 - name: Database Management
   description: Endpoints for managing user data, including CRUD operations on user-specific databases and data retrieval.

servers:
  - url: https://api.worqhat.com
    description: Production server for WorqHat AI API

security:
  - bearerAuth: []

paths:
  /authentication:
    post:
      summary: Authenticate a user
      description: >
        This endpoint is used to authenticate a user by providing their API Key.
        It verifies the provided API Key and returns the user's details upon successful authentication.
      operationId: authenticateUser
      tags:
        - Authentication
      security:
        - bearerAuth: []
      responses:
        '200':
          description: User authenticated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the authentication.
                  userEmail:
                    type: string
                    description: The email address of the authenticated user.
                  userDisplayName:
                    type: string
                    description: The display name of the authenticated user.
                  orgName:
                    type: string
                    description: The organization name associated with the authenticated user.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
              example:
                status: "success"
                userEmail: "user@example.com"
                userDisplayName: "John Doe"
                orgName: "example_org"
                processing_time: 2311
                processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/generate/v2:
    post:
      summary: Generate an image using AI
      description: >
        This endpoint is used to generate an image using AI.
        It accepts a JSON object containing the image generation parameters and returns the generated image.
        The ImageCon V2 model is our Fastest and basic model for generating images that can
        handle image sizes of 512x512 and 512x768.
      operationId: generateImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: array
                  description: The prompt and descriptions to be used for generating the image.
                  items:
                    type: string
                image_style:
                  type: string
                  description: >
                    The style of the image to be generated. You can choose between `Abstract`,
                    `Landscape`, `Portrait`, `Still Life`, `Animal`, `Anime`, `Architecture`, etc.
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `url` and `blob`
                    . `URL` will return a cloud-hosted Temporary URL for the generated image, you
                    need to handle the image download on your end. `blob` will return the image
                    as a base64 encoded string.
                  enum:
                    - url
                    - blob
                orientation:
                  type: string
                  description: >
                    The orientation of the image to be generated. You can choose between `square`
                    , `portrait`, and `landscape`. `square` will generate a square image of
                    dimensions 512x512. `portrait` will generate a portrait image of dimensions
                    512x768. `landscape` will generate a landscape image of dimensions 768x512.
                  enum:
                    - square
                    - portrait
                    - landscape
            example:
                prompt: ["Create an image of an AI cat typing on a keyboard"]
                image_style: "realistic"
                output_type: "url"
                orientation: "square"

      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the image generation.
                  image:
                    type: string
                    description: The generated image.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                    status: "success"
                    image: "https://storage.googleapis.com/1fe0a9ac-617a-42e4-a376-37808b98fc99-worqhat/image-gen/MFl2oNxrMLYKvWbwoDkbQPpScWD3-1697226444718.png?GoogleAccessId=cloud-storage-upload%40worqhat-dev.iam.gserviceaccount.com&Expires=1697226626&Signature=DHlOeWd4QladLc6hsdoqp9lTbvMXs06B6hOkQPviFubszuLfahXXRv9aj%2FPTTlytlTClXHX0zGFr3Tsq9S%2Fs3hFjqBsy7lho%2BfuRFhPG4FrQoV2lxrZmB47X6nWc7TG6hbgLkyT3CvAOfwccmWHH1cbBiEDSI0iEKvx7kwUsgIrYu1ko9Szkul29fjVQ89WL6jyQQX1G9ejsQTNmXHFNRvhwRHkRfZJ5n3Y1uR7aqAyMZfQ2Me6i7bVb7smc0t5Ed2yk6%2BN1fdrz6zhbkc%2Fuh13vWhrT8EWMuCYKhsrzPakO%2B%2B229nlt5Y4D9zyFqevAmj43Vl76INIq29gcs39oQg%3D%3D"
                    processing_time: 2311
                    processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
                    processing_count: 1

        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/generate/v3:
    post:
      summary: Generate an image using AI
      description: >
        This endpoint is used to generate an image using AI.
        It accepts a JSON object containing the image generation parameters and returns the generated image.
        The ImageCon V2 model is our Fastest and basic model for generating images that can
        handle image sizes of `1024x1024` and `1344x1024`.
      operationId: generateImageV3
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: array
                  description: The prompt and descriptions to be used for generating the image.
                  items:
                    type: string
                image_style:
                  type: string
                  description: >
                    The style of the image to be generated. You can choose between `Abstract`,
                    `Landscape`, `Portrait`, `Still Life`, `Animal`, `Anime`, `Architecture`, etc.
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `url` and `blob`
                    . `URL` will return a cloud-hosted Temporary URL for the generated image, you
                    need to handle the image download on your end. `blob` will return the image
                    as a base64 encoded string.
                  enum:
                    - url
                    - blob
                orientation:
                  type: string
                  description: >
                    The orientation of the image to be generated. You can choose between `square`
                    , `portrait`, and `landscape`. `square` will generate a square image of
                    dimensions 1024x1024. `portrait` will generate a portrait image of dimensions
                    1024x1344. `landscape` will generate a landscape image of dimensions 1344x1024.
                  enum:
                    - square
                    - portrait
                    - landscape
            example:
              prompt: ["Create an image of an AI cat typing on a keyboard"]
              image_style: "realistic"
              output_type: "url"
              orientation: "square"

      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the image generation.
                  image:
                    type: string
                    description: The generated image.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  image: "https://storage.googleapis.com/1fe0a9ac-617a-42e4-a376-37808b98fc99-worqhat/image-gen/MFl2oNxrMLYKvWbwoDkbQPpScWD3-1697226444718.png?GoogleAccessId=cloud-storage-upload%40worqhat-dev.iam.gserviceaccount.com&Expires=1697226626&Signature=DHlOeWd4QladLc6hsdoqp9lTbvMXs06B6hOkQPviFubszuLfahXXRv9aj%2FPTTlytlTClXHX0zGFr3Tsq9S%2Fs3hFjqBsy7lho%2BfuRFhPG4FrQoV2lxrZmB47X6nWc7TG6hbgLkyT3CvAOfwccmWHH1cbBiEDSI0iEKvx7kwUsgIrYu1ko9Szkul29fjVQ89WL6jyQQX1G9ejsQTNmXHFNRvhwRHkRfZJ5n3Y1uR7aqAyMZfQ2Me6i7bVb7smc0t5Ed2yk6%2BN1fdrz6zhbkc%2Fuh13vWhrT8EWMuCYKhsrzPakO%2B%2B229nlt5Y4D9zyFqevAmj43Vl76INIq29gcs39oQg%3D%3D"
                  processing_time: 2311
                  processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
                  processing_count: 1

        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/modify/v2:
    post:
      summary: Modify existing image using ImageCon V2
      description: >
        This endpoint is used to modify an existing image using AI.
        It accepts a Form Data containing the image modification parameters and returns the
        modified image.
      operationId: modifyImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                existing_image:
                  type: string
                  format: binary
                  description: >
                    The image to be modified or edited. Neither `height` nor `width` of the image should be less than `128px`. Only one of the sides of the image should be greater than or equal to `512px`. (Eg: `512x512`, `512x768`, `768x512`). Maximum dimensions supported is `512x896`
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `url` and `blob`
                    . `URL` will return a cloud-hosted Temporary URL for the generated image, you
                    need to handle the image download on your end. `blob` will return the image
                    as a base64 encoded string.
                  enum:
                    - url
                    - blob
                modification:
                  type: string
                  description: >
                    The modification to be applied to the image. You can add in the modification
                    parameters as a string based description.
                similarity:
                    type: number
                    description: >
                      The similarity to be applied to the image. It is a number between 0 and 100.
                      The higher the number, the more similar the image will be to the original.
            example:
              existing_image: "/path/to/image.jpg"
              output_type: "url"
              modification: "Add a cat to the image"
              similarity: 50

      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the image generation.
                  image:
                    type: string
                    description: The generated image.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  image: "https://storage.googleapis.com/1fe0a9ac-617a-42e4-a376-37808b98fc99-worqhat/image-gen/MFl2oNxrMLYKvWbwoDkbQPpScWD3-1697226444718.png?GoogleAccessId=cloud-storage-upload%40worqhat-dev.iam.gserviceaccount.com&Expires=1697226626&Signature=DHlOeWd4QladLc6hsdoqp9lTbvMXs06B6hOkQPviFubszuLfahXXRv9aj%2FPTTlytlTClXHX0zGFr3Tsq9S%2Fs3hFjqBsy7lho%2BfuRFhPG4FrQoV2lxrZmB47X6nWc7TG6hbgLkyT3CvAOfwccmWHH1cbBiEDSI0iEKvx7kwUsgIrYu1ko9Szkul29fjVQ89WL6jyQQX1G9ejsQTNmXHFNRvhwRHkRfZJ5n3Y1uR7aqAyMZfQ2Me6i7bVb7smc0t5Ed2yk6%2BN1fdrz6zhbkc%2Fuh13vWhrT8EWMuCYKhsrzPakO%2B%2B229nlt5Y4D9zyFqevAmj43Vl76INIq29gcs39oQg%3D%3D"
                  processing_time: 2311
                  processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
                  processing_count: 2

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/upscale/v3:
    post:
      summary: Upscale an image using ImageCon V3
      description: >
        This endpoint is used to upscale an existing image using AI. It can take scale inputs of upto a combination of 4194304px.
        It accepts a Form Data containing the image modification parameters and returns the
        upscaled image.
      operationId: upscaleImageV3
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                existing_image:
                  type: string
                  format: binary
                  description: The image to be modified or edited. Keep in mind that the File Object dimensions should not exceed `1024x1024`. Also, the resulting image dimensions will not exceed `2048x2048`.
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `url` and `blob`
                    . `URL` will return a cloud-hosted Temporary URL for the generated image, you
                    need to handle the image download on your end. `blob` will return the image
                    as a base64 encoded string.
                  enum:
                    - url
                    - blob
                scale:
                  type: number
                  description: >
                    The scale to be applied to the image. It is a number between 1 and maximum of 5.
                    The higher the number, the more the image will be upscaled.
            example:
              existing_image: "/path/to/image.jpg"
              output_type: "url"
              scale: 2

      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the image generation.
                  image:
                    type: string
                    description: The generated image.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  image: "https://storage.googleapis.com/1fe0a9ac-617a-42e4-a376-37808b98fc99-worqhat/image-gen/MFl2oNxrMLYKvWbwoDkbQPpScWD3-1697226444718.png?GoogleAccessId=cloud-storage-upload%40worqhat-dev.iam.gserviceaccount.com&Expires=1697226626&Signature=DHlOeWd4QladLc6hsdoqp9lTbvMXs06B6hOkQPviFubszuLfahXXRv9aj%2FPTTlytlTClXHX0zGFr3Tsq9S%2Fs3hFjqBsy7lho%2BfuRFhPG4FrQoV2lxrZmB47X6nWc7TG6hbgLkyT3CvAOfwccmWHH1cbBiEDSI0iEKvx7kwUsgIrYu1ko9Szkul29fjVQ89WL6jyQQX1G9ejsQTNmXHFNRvhwRHkRfZJ5n3Y1uR7aqAyMZfQ2Me6i7bVb7smc0t5Ed2yk6%2BN1fdrz6zhbkc%2Fuh13vWhrT8EWMuCYKhsrzPakO%2B%2B229nlt5Y4D9zyFqevAmj43Vl76INIq29gcs39oQg%3D%3D"
                  processing_time: 2311
                  processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
                  processing_count: 2

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Valid dimensions are `1024x1024`, `1152x896`, `1216x832`, `1344x768`, `1536x640`, `640x1536`, `768x1344`, `832x1216`, `896x1152`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/modify/v3:
    post:
      summary: Modify existing image using ImageCon V3
      description: >
        This endpoint is used to modify an existing image using AI.
        It accepts a Form Data containing the image modification parameters and returns the
        modified image.
      operationId: modifyImageV3
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                existing_image:
                  type: string
                  format: binary
                  description: The image to be modified or edited. Valid dimensions are `1024x1024`, `1152x896`, `1216x832`, `1344x768`, `1536x640`, `640x1536`, `768x1344`, `832x1216`, `896x1152`.
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `url` and `blob`
                    . `URL` will return a cloud-hosted Temporary URL for the generated image, you
                    need to handle the image download on your end. `blob` will return the image
                    as a base64 encoded string.
                  enum:
                    - url
                    - blob
                modification:
                  type: string
                  description: >
                    The modification to be applied to the image. You can add in the modification
                    parameters as a string based description.
                similarity:
                  type: number
                  description: >
                    The similarity to be applied to the image. It is a number between 0 and 100.
                    The higher the number, the more similar the image will be to the original.
            example:
              existing_image: "/path/to/image.jpg"
              output_type: "url"
              modification: "Add a cat to the image"
              similarity: 50

      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the image generation.
                  image:
                    type: string
                    description: The generated image.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  image: "https://storage.googleapis.com/1fe0a9ac-617a-42e4-a376-37808b98fc99-worqhat/image-gen/MFl2oNxrMLYKvWbwoDkbQPpScWD3-1697226444718.png?GoogleAccessId=cloud-storage-upload%40worqhat-dev.iam.gserviceaccount.com&Expires=1697226626&Signature=DHlOeWd4QladLc6hsdoqp9lTbvMXs06B6hOkQPviFubszuLfahXXRv9aj%2FPTTlytlTClXHX0zGFr3Tsq9S%2Fs3hFjqBsy7lho%2BfuRFhPG4FrQoV2lxrZmB47X6nWc7TG6hbgLkyT3CvAOfwccmWHH1cbBiEDSI0iEKvx7kwUsgIrYu1ko9Szkul29fjVQ89WL6jyQQX1G9ejsQTNmXHFNRvhwRHkRfZJ5n3Y1uR7aqAyMZfQ2Me6i7bVb7smc0t5Ed2yk6%2BN1fdrz6zhbkc%2Fuh13vWhrT8EWMuCYKhsrzPakO%2B%2B229nlt5Y4D9zyFqevAmj43Vl76INIq29gcs39oQg%3D%3D"
                  processing_time: 2311
                  processing_id: "cd185dd4-fcfb-4b15-93de-db9eded23ade"
                  processing_count: 2

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Valid dimensions are `1024x1024`, `1152x896`, `1216x832`, `1344x768`, `1536x640`, `640x1536`, `768x1344`, `832x1216`, `896x1152`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/moderation:
    post:
      summary: Moderate Text Content using AI
      description: >
        This endpoint is used to moderate text content using AI.
        It accepts a JSON object containing the text moderation parameters and returns the
        the moderation results.
      operationId: moderateText
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text_content:
                  type: string
                  description: The text to be moderated.
            example:
                text_content: "This is a sample text to be moderated."

      responses:
        '200':
          description: Text moderated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  moderation:
                    type: object
                    properties:
                      sexual:
                        type: string
                      hate:
                        type: string
                      harassment:
                        type: string
                      self-harm:
                        type: string
                      sexual/minors:
                        type: string
                      hate/threatening:
                        type: string
                      violence/graphic:
                        type: string
                      self-harm/intent:
                        type: string
                      self-harm/instructions:
                        type: string
                      harassment/threatening:
                        type: string
                      violence:
                        type: string
                    description: The moderation results.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  moderation:
                    sexual: "0.016973"
                    hate: "0.001243"
                    harassment: "0.012784"
                    self-harm: "0.000040"
                    sexual/minors: "0.000049"
                    hate/threatening: "0.000002"
                    violence/graphic: "0.000016"
                    self-harm/intent: "0.000059"
                    self-harm/instructions: "0.000007"
                    harassment/threatening: "0.000002"
                    violence: "0.000333"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 3

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/v2/image-text-detection:
    post:
      summary: Detect and identify text in an image using AI
      description: >
        This endpoint is used to modify an existing image using AI.
        It accepts a Form Data containing the image modification parameters and returns the
        modified image.
      operationId: detectTextInImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
                output_type:
                  type: string
                  description: >
                    The type of output to be generated. You can choose between `json` and `text`.
                    `json` will return the text detection results as a JSON object with the scan
                    words marked and positional information. `text` will return the text detection
                    results as a plain text string.
                  enum:
                    - json
                    - text
            example:
                image: "/path/to/image.jpg"
                output_type: "json"

      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: The HTTP status code.
                  status:
                    type: string
                    description: Status indicating the success of the response.
                  data:
                    type: string
                    description: The response data.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
              example:
                code: 200
                status: 'success'
                data: 'WorqHat Introduction to WorqHat AI Custom Models Studio'
                processing_time: 4554
                processing_id: '7a07501f-a611-4c19-b5f9-b62e429c54f8'
                processing_count: 1
        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/v2/image-analysis:
    post:
      summary: Analyze an image using AI
      description: >
        Analyse an Image using AI. This endpoint helps to identify the different objects in the
        image, classify them and assign them under different aliases. It also analyses the Colour
        combinations of the different objects, describes the activities and the dominant colours
        in the image.
      operationId: analyzeImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
            example:
              image: "/path/to/image.jpg"

      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: The HTTP status code.
                  status:
                    type: string
                    description: Status indicating the success of the response.
                  data:
                    type: object
                    properties:
                      analysed_data:
                        type: array
                        items:
                          type: array
                        description: Analyzed data.
                      quality:
                        type: object
                        properties:
                          brightness:
                            type: number
                            description: Brightness value.
                          contrast:
                            type: number
                            description: Contrast value.
                          sharpness:
                            type: number
                            description: Sharpness value.
                        description: Quality information.
                      foreground:
                        type: object
                        properties:
                          dominant_colors:
                            type: array
                            items:
                              type: string
                            description: Dominant colors in the foreground.
                          quality:
                            type: array
                        description: Foreground information.
                      background:
                        type: object
                        properties:
                          dominant_colors:
                            type: array
                            items:
                              type: string
                            description: Dominant colors in the background.
                          quality:
                            type: array
                        description: Background information.
                      primary_colours:
                        type: array
                        items:
                          type: array
                        description: Primary colors.
                    description: The response data.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed.
              example:
                code: 200
                status: 'success'
                data:
                  analysed_data: [ [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ] ]
                  quality:
                    brightness: 74.43968200683594
                    contrast: 85.29368591308594
                    sharpness: 44.84498977661133
                  foreground:
                    dominant_colors: [ Array ]
                    quality: [ Object ]
                  background:
                    dominant_colors: [ Array ]
                    quality: [ Object ]
                  primary_colours: [ [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ], [ Object ] ]
                processing_time: 3193
                processing_id: '9a7cc5d3-735a-4299-8d84-1fbaab309ba4'
                processing_count: 1

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/v2/face-detection:
    post:
      summary: Identify Faces and Characteristics in an Image
      description: >
        This endpoint is used to identify faces and characteristics in an image.
        It accepts a Form Data containing the image and returns the
        the face detection results.
      operationId: detectFacesInImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
            example:
              image: "/path/to/image.jpg"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      analysed_data:
                        type: array
                        items:
                          type: object
                          properties:
                            age_range:
                              type: object
                              properties:
                                high:
                                  type: integer
                                  example: 26
                                low:
                                  type: integer
                                  example: 18
                            beard:
                              type: object
                              properties:
                                confidence:
                                  type: number
                                  example: 73.7099380493164
                                value:
                                  type: boolean
                                  example: false
                            bounding_box:
                              type: object
                              properties:
                                height:
                                  type: number
                                  example: 0.22712668776512146
                                left:
                                  type: number
                                  example: 0.3961663544178009
                                top:
                                  type: number
                                  example: 0.2599637806415558
                                width:
                                  type: number
                                  example: 0.22138258814811707
                            confidence:
                              type: number
                              example: 99.99722290039062
                            emotions:
                              type: array
                              items:
                                type: object
                  processing_time:
                    type: integer
                    example: 2189
                  processing_id:
                    type: string
                    example: b577b18e-1313-47d4-a709-ed3bb219ea52
                  processing_count:
                    type: integer
                    example: 1

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/v2/image-moderation:
    post:
      summary: Moderate an Image using AI
      description: >
        This endpoint is used to moderate an image using AI.
        It accepts a Form Data containing the image and returns the
        the moderation results.
      operationId: moderateImageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
            example:
              image: "/path/to/image.jpg"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      analysed_data:
                        type: array
                        items:
                          type: object
                          properties:
                            Confidence:
                              type: number
                              example: 92.51395416259766
                            Name:
                              type: string
                              example: Revealing Clothes
                            ParentName:
                              type: string
                              example: Suggestive
                  processing_time:
                    type: integer
                    example: 1268
                  processing_id:
                    type: string
                    example: 492e385b-f1ec-412a-904e-3f55fd36fd86
                  processing_count:
                    type: integer
                    example: 1
        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/images/v2/facial-comparison:
    post:
      summary: Compare two faces using AI
      description: >
        This endpoint is used to compare two faces using AI. It returns the matching percentage
        for all the images that match.
        It accepts a Form Data containing the two images and returns the
        the facial comparison results.
      operationId: compareFacesV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                source_image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
                target_image:
                  type: string
                  format: binary
                  description: The image to be sent as input.
            example:
              source_image: "/path/to/image.jpg"
              target_image: "/path/to/image.jpg"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      analysed_data:
                        type: array
                        items:
                          type: object
                          properties:
                            Confidence:
                              type: number
                              example: 92.51395416259766
                  processing_time:
                    type: integer
                    example: 1268
                  processing_id:
                    type: string
                    example: 492e385b-f1ec-412a-904e-3f55fd36fd86
                  processing_count:
                    type: integer
                    example: 1
        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/speech-text:
    post:
      summary: Convert Speech to Text using AI
      description: >
        This endpoint is used to convert speech to text using AI.
        It accepts a Form Data containing the audio file and returns the
        the speech to text conversion results.
      operationId: speechToText
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                audio:
                  type: string
                  format: binary
                  description: The audio file to be sent as input. The audio file can be of any format.
            example:
                audio: "/path/to/audio.mp3"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Audio Conversion Process.
                  data:
                    type: object
                    properties:
                      text:
                        type: string
                        description: The Extracted Text from the Audio.
                      speaker_labels:
                        type: array
                        properties:
                          speaker:
                            type: string
                            description: The speaker label.
                          text:
                            type: string
                            description: The text associated with the speaker.

                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  data:
                    text: "This is a sample text to be converted to speech."
                    speaker_labels: [
                      {
                        speaker: "A",
                        text: "This is a sample text to be converted to speech."
                      }
                    ]
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 12

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/v2/web-extract:
    post:
      summary: Extract text from a web page using AI.
      description: >
        This endpoint is used to extract text from a web page using AI. It can take into account
        all the features such as metadata, inline code, codeblocks, image & html references and
        other links as well.
      operationId: extractTextFromWebPageV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url_path:
                    type: string
                    description: The URL of the web page to be extracted.
                headline:
                    type: boolean
                    description: Whether to extract the headline of the web page.
                    default: true
                inline_code:
                    type: boolean
                    description: Whether to extract the inline code of the web page.
                    default: true
                code_blocks:
                    type: boolean
                    description: Whether to extract the codeblocks of the web page.
                    default: true
                references:
                    type: boolean
                    description: >
                      Whether to extract the references of images and other external links in the web page.
                    default: true
                tables:
                    type: boolean
                    description: Whether to extract the tables in the web page.
                    default: true
              example:
                url_path: "https://www.worqhat.com"
                headline: true
                inline_code: true
                code_blocks: true
                references: true
                tables: true

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Audio Conversion Process.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      text_content:
                        type: string
                        description: The extracted text content from the web page.
                      tags:
                        type: array
                        description: The extracted tags from the web page.
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The name of the tag.
                            value:
                              type: string
                              description: The value associated with the tag.
                            data:
                              type: object
                              description: Additional data associated with the tag.
                example:
                  status: "success"
                  data:
                    text_content: |
                      WorqHat

                      🎉 Our Conversational Language Model WorqBot is now live for Beta use! Try out Now.🤖

                      Resources

                      APIs

                      Connect your app to WorqHat

                      Documentations

                      Learn how to use our products

                      Changelogs

                      Check what's new

                      Careers

                      Find your dream role

                      Community

                      Connect with other developers, designers, and entrepreneurs

                      Security

                      Our Security Principles and Practices

                      Blog

                      Interviews, tutorials, Updates and more

                      Status

                      Outage updates and announcements

                      Green Initiatives

                      Partnerships to make the World Greener

                      Contact Us



                      Enterprise WorqHat Playground

                      Join Waitlist

                      Careers
                      - Documentation
                      - Changelog
                      - Blogs
                      - Security

                      Subscribe to our newsletter

                      Stay up to date with the latest news and updates from WorqHat.


                      Join us!
                      - LinkedIn >
                      - Instagram
                      - Facebook
                      - Twitter
                      - GitHub

                      © 2023. Winlysis Pvt. Ltd., India All rights reserved.

                      - Terms & Conditions
                      - Privacy Policy
                      - Statu
                    tags:
                      - name: language
                        value: en
                        data: { }
                      - name: thumbnail
                        value: "/resources/WorqHat TM Logo.png"
                        data: { }
                      - name: current_date
                        value: "2023-01-01"
                        data: { }
                      - name: title
                        span:
                          - "0"
                          - "7"
                        span_text: WorqHat
                        value: WorqHat
                        data: { }
                      - name: link
                        span:
                          - "45"
                          - "52"
                        span_text: WorqBot
                        value: "//playground.worqhat.app/worqbot"
                        data: { }
                      - name: image
                        span:
                          - "94"
                          - "94"
                        value: "/resources/WorqHat TM Logo.png"
                        data:
                          alt: WorqHat Logo
                      - name: control
                        span:
                          - "94"
                          - "105"
                        span_text: " Resources "
                        value: " Resources "
                        data: { }
                      - name: subheading
                        span:
                          - "12016"
                          - "12042"
                        span_text: "Future-proof your business"
                        value: "Future-proof your business"
                        data: { }
                      - name: link
                        span:
                          - "12224"
                          - "12238"
                        span_text: "Join Waitlist "
                        value: "https://join.worqhat.com/waitlist"
                        data: { }
                      - name: image
                        span:
                          - "12295"
                          - "12295"
                        value: "/resources/integrations/logo-dropbox-40.svg"
                        data:
                          alt: Dropbox Icon
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 12

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
            description: Unauthorized
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Error401Response'
        '404':
            description: Not Found
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Error404Response'
        '406':
            description: Not Acceptable
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Error406Response'
        '500':
            description: Internal Server Error
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Error500Response'

  /api/ai/v2/pdf-extract:
    post:
      summary: Extract text from a PDF using AI.
      description: >
        This endpoint is used to extract text from a PDF using AI. Scanning simultaneously across
        all pages and with the capability to understand human handwriting, this endpoint can
        extract text from any PDF.
      operationId: extractTextFromPDFV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The PDF file to be sent as input.
            example:
                file: "/path/to/pdf.pdf"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Audio Conversion Process. In case you have an error for `multipart/form-data` requests, try removing the `Content-Type` header.
                  data:
                    type: string
                    description: The converted text.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  data: "This is a sample text to be converted."
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 12

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/list-datasets:
    get:
      summary: Retrieves the list of pre-trained datasets
      description: >
        This endpoint fetches all the datasets that you have trained along with the dataset IDs
        and the training status.
      operationId: listDatasets
      tags:
        - AI Dataset Management
      security:
        - bearerAuth: [ ]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Audio Conversion Process.
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        dataset_id:
                          type: string
                          example: dataset123
                          description: The ID of the dataset.
                        dataset_name:
                          type: string
                          example: Dataset 1
                          description: The name of the dataset.
                        dataset_description:
                          type: string
                          example: This is dataset 1
                          description: The description of the dataset.
                        training_for:
                          type: string
                          example: Search Models
                          description: The purpose of the dataset. It is usually either for
                            ``Search Models`` or ``Generative Models``.
                        type:
                          type: string
                          example: Self
                          description: The type of the dataset when trained. It holds values as
                            ``Self`` for datasets available to the User and ``Org`` for datasets
                            available to the members of the Organization.
                        dataset_timestamp:
                          type: object
                          properties:
                            _seconds:
                              type: integer
                              example: 1624954636
                              description: The timestamp of the dataset creation in seconds.
                            _clock_hash:
                              type: integer
                              example: 1634954636579
                              description: The clock hash of the dataset. Used for making sure
                                all the Machine Learning are in sync with the dataset.

                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  data:
                    - dataset_id: "dataset123"
                      dataset_name: "Dataset 1"
                      dataset_description: "This is dataset 1"
                      training_for: "Search Models"
                      type: "Self"
                      dataset_timestamp:
                        _seconds: 1624954636
                        _clock_hash: 1634954636579
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 12

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/delete-datasets/{datasetId}:
    delete:
      summary: Deletes a pretrained AI Model Dataset
      description: >
        This endpoint deletes a pretrained AI Model Dataset. This is a permanent action and cannot be undone.
      operationId: deleteDataset
      tags:
        - AI Dataset Management
      security:
        - bearerAuth: [ ]
      parameters:
        - in: path
          name: datasetId
          description: ID of the dataset to be deleted
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Audio Conversion Process.
                  data:
                    type: string
                    description: The deletion status of the dataset.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  data: "This is a sample text to be converted."
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 12

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/content/v2/new/alpha:
    post:
      summary: Latest AI Model with Data upto July 23, (Unstable)
      description: >
        Our latest AI model that can be used to generate content and has data upto July 2023.
        However, this is only an information based model and it excels in Informational Based
        tasks than Creative ones.
      operationId: generateContentV2Alpha
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Text or Command to be processed.
                conversation_history:
                  type: array
                  description: >
                    The conversation history of the user as an array of objects. Each object
                    should have a `question` and `answer` property as the key and value respectively.
                  items:
                    type: object
                    properties:
                      conversation:
                        type: string
                        description: The conversation between the user and the AI as a key value pair.
                training_data:
                  type: string
                  description: >
                    The training data to be used while generating the content. This can be used to
                    pass in smaller content based on how you want the model to behave, and
                    specific behavioural or restrictive traits you want to add. This is optional.
            example:
                question: "What is the capital of India?"
                conversation_history: [
                    {
                        "What is the capital of India?": "New Delhi"
                    },
                    {
                        "What is the capital of USA?": "Washington DC"
                    }]
                training_data: 'You are alex and you are one of the best Tour Guides.'

      responses:
        '200':
          description: Text Content Generated Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  content:
                    type: string
                    description: The text content generated.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  processing_time: 888
                  content: >
                    "Hello! My name is Alex, and I am your tour guide. I am here to assist
                    you and provide you with information about the places we will be visiting. If you have any questions or need any help during our tour, feel free to ask. I'm here to make your experience enjoyable and memorable. Let's have a great time exploring together"
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/content/v2:
    post:
      summary: AiCon V2 (Stable)
      description: >
        Content Generation AI focused only on Business Content Generation Purpose. Trained on top
        of actual business and financial data with added data security and privacy.
      operationId: generateContentV2
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Text or Command to be processed.
                preserve_history:
                  type: boolean
                  description: >
                    Whether to preserve the conversation history of the user. If set to true,
                    the conversation history will be preserved and the conversation history will
                    be accepted as `conversation_history` in the request body.
                conversation_history:
                  type: array
                  description: >
                    The conversation history of the user as an array of objects. Each object
                    should have a `question` and `answer` property as the key and value respectively.
                  items:
                    type: object
                    properties:
                      conversation:
                        type: string
                        description: The conversation between the user and the AI as a key value pair.
                randomness:
                    type: integer
                    description: >
                        The randomness factor to be used while generating the content. The higher the
                        randomness, the more creative the content will be. The value should be between
                        0 and 1. `0` means it will be absolutely to the point and stops
                        hallucinations. `1` means it will be completely creative and creates a
                        content surrounding your questions a lot.
                    default: 0.5
                training_data:
                    type: string
                    description: >
                        The training data to be used while generating the content. This can be used to
                        pass in smaller content based on how you want the model to behave, and
                        specific behavioural or restrictive traits you want to add. This is optional.
                stream_data:
                    type: boolean
                    description: >
                        Whether to stream the data as it is being generated. If set to true, the
                        response will be streamed as the data is being generated. This is useful
                        when you want to generate a lot of content and want to save the data as it
                        is being generated. You need to handle Server Sent Events for this use case.
                    default: false
            example:
              question: "What is the capital of India?"
              preserve_history: true
              randomness: 0.5
              stream_data: false
              conversation_history: [
                {
                  "What is the capital of India?": "New Delhi"
                },
                {
                  "What is the capital of USA?": "Washington DC"
                }]
              training_data: 'You are alex and you are one of the best Tour Guides.'

      responses:
        '200':
          description: Text Content Generated Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  content:
                    type: string
                    description: The text content generated.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  processing_time: 888
                  content: >
                    "Hello! My name is Alex, and I am your tour guide. I am here to assist
                    you and provide you with information about the places we will be visiting. If you have any questions or need any help during our tour, feel free to ask. I'm here to make your experience enjoyable and memorable. Let's have a great time exploring together"
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/content/v3:
    post:
      summary: AiCon V3 (Advanced)
      description: >
        Content Generation AI focused only on Business Content Generation Purpose. Trained on top
        of actual business and financial data with added data security and privacy. This is one
        of our best and largest models capable of highly creative content and complex situational
        thinking.
      operationId: generateContentV3
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Text or Command to be processed.
                preserve_history:
                  type: boolean
                  description: >
                    Whether to preserve the conversation history of the user. If set to true,
                    the conversation history will be preserved and the conversation history will
                    be accepted as `conversation_history` in the request body.
                conversation_history:
                  type: array
                  description: >
                    The conversation history of the user as an array of objects. Each object
                    should have a `question` and `answer` property as the key and value respectively.
                  items:
                    type: object
                    properties:
                      conversation:
                        type: string
                        description: The conversation between the user and the AI as a key value pair.
                randomness:
                  type: integer
                  description: >
                    The randomness factor to be used while generating the content. The higher the
                    randomness, the more creative the content will be. The value should be between
                    0 and 1. `0` means it will be absolutely to the point and stops
                    hallucinations. `1` means it will be completely creative and creates a
                    content surrounding your questions a lot.
                  default: 0.5
                training_data:
                  type: string
                  description: >
                    The training data to be used while generating the content. This can be used to
                    pass in smaller content based on how you want the model to behave, and
                    specific behavioural or restrictive traits you want to add. This is optional.
                stream_data:
                  type: boolean
                  description: >
                    Whether to stream the data as it is being generated. If set to true, the
                    response will be streamed as the data is being generated. This is useful
                    when you want to generate a lot of content and want to save the data as it
                    is being generated. You need to handle Server Sent Events for this use case.
                  default: false
            example:
              question: "What is the capital of India?"
              preserve_history: true
              randomness: 0.5
              stream_data: false
              conversation_history: [
                {
                  "What is the capital of India?": "New Delhi"
                },
                {
                  "What is the capital of USA?": "Washington DC"
                }]
              training_data: 'You are alex and you are one of the best Tour Guides.'

      responses:
        '200':
          description: Text Content Generated Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  content:
                    type: string
                    description: The text content generated.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  processing_time: 888
                  content: >
                    "Hello! My name is Alex, and I am your tour guide. I am here to assist
                    you and provide you with information about the places we will be visiting. If you have any questions or need any help during our tour, feel free to ask. I'm here to make your experience enjoyable and memorable. Let's have a great time exploring together"
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/create:
    post:
      summary: Create Database Collection
      description: >
        Create a Database Collection for your Organization. Each collection stores your data in the form of Documents which are structures of JSON Objects. You can run complex Queries on all the data that is present in a Collection.
      operationId: createDatabaseCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                collectionSchema:
                  type: object
                  description: >
                    The Schema of the Collection. This is used to validate the data that is being
                    stored in the Collection. **_This is optional_**. You can pass in the variables on how you want to structure the data as. We currently support Data Types such as `string`, `number`, `float`, `boolean`, `date`, `timestamp`, `json`, `map`, `array`, `geopoint`, `uuid`, `ip`.
                collectionSortBy:
                  type: string
                  description: >
                    The Field by which you want to sort the data in the Collection. **_This is optional_**. By default we will sort it by the Document Creation Time of the data that you add.
              example:
                collection: "Users"
                collectionSchema:
                  name: "string"
                  age: "number"
                  weight: "float"
                  is_active: "boolean"
                  date_of_birth: "date"
                  timestamp: "timestamp"
                  address: "json"
                  hobbies: "array"
                  location: "geopoint"
                  id: "uuid"
                  ip_address: "ip"
                collectionSortBy: "name"

      responses:
        '200':
          description: Output from the Database Creation Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  database:
                    type: object
                    properties:
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  database:
                    collection: "Users"
                    elapsed_time: 800

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/all:
    post:
      summary: Fetch All Data from a Collection
      description: >
        Fetch all the data from a Collection. This is useful when you want to fetch all the data from a Collection and perform some operations on it.
      operationId: fetchAllDataFromCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
              example:
                collection: "Users"

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            sampleDbContent:
                              type: string
                              description: The data that is stored in the Collection.
                            sampleDbContent2:
                              type: string
                              description: The data that is stored in the Collection.
                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data:
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/document:
    post:
      summary: Fetch a Document from a Collection
      description: >
        Fetch a Document from a Collection. This is useful when you want to fetch a specific Document from a Collection and perform some operations on it.
      operationId: fetchDocumentFromCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                documentId:
                  type: string
                  description: The ID of the Document that you want to fetch.
              example:
                collection: "Users"
                documentId: "1234567890"

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            sampleDbContent:
                              type: string
                              description: The data that is stored in the Collection.
                            sampleDbContent2:
                              type: string
                              description: The data that is stored in the Collection.
                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data:
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/count:
    post:
      summary: Fetch the Count of Documents with a Not-Null Field/Key in a Collection
      description: >
        Fetch the Count of Documents in a Collection. This is to fetch the number of Documents that have a specific Field/Key that is not null.
      operationId: fetchCountOfDocumentsInCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                key:
                  type: string
                  description: The Field/Key that you want to check for.
              example:
                collection: "Users"
                key: "name"

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: string
                        description: The Count of Documents with a Not-Null Field/Key in a Collection
                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data: 124

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/unique:
    post:
      summary: Fetch the Unique Values of a Field/Key in a Collection (Sortable)
      description: >
        Fetch the Unique Values of a Field/Key in a Collection. You can also sort the response in a specific order of `asc` or `desc` on the basis of the Field/Key that you pass in.
      operationId: fetchUniqueValuesOfFieldInCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                key:
                  type: string
                  description: The Field/Key that you want to check unique values for.
                orderBy:
                  type: string
                  description: >
                    The Field/Key that you want to sort the response by. This is optional. By default we will sort it by the Field/Key that you pass in `key`. If you add a `orderBy` Field/Key, we will sort the response by that Field/Key.
                orderType:
                  type: string
                  enum: [asc, desc]
                  description: >
                    The Order Type that you want to sort the response by. This is optional. By default we will sort it in `asc` order. If you add a `orderType` Field/Key, we will sort the response by that Order Type on the `orderBy` Field/Key.
              example:
                collection: "Users"
                key: "name"
                orderBy: "age"
                orderType: "desc"

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: array
                      items:
                        type: object
                        properties:
                          sampleDbContent:
                            type: string
                            description: The data that is stored in the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data:
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/query:
    post:
      summary: Run Simple and Compound Queries on a Collection
      description: >
        Run Simple and Compound Queries on a Collection. You can run a simple `WHERE` query or a compound `AND` or `OR` query on a Collection. This is useful when you want to fetch a specific Document from a Collection and perform some operations on it. You can also sort the response in a specific order of `asc` or `desc` on the basis of the Field/Key that you pass in and limit the number of Documents that you want to fetch.
      operationId: fetchDocumentFromCollectionQuery
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                queries:
                  type: array
                  description: >
                    The Queries that you want to run on the Collection. You can run a simple `WHERE` query or a compound `AND` or `OR` using the `join` query parameter on a Collection.
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        description: The Field/Key that you want to run the query on.
                      operator:
                        type: string
                        enum: ["<", "<=", "==", ">", ">=", "!=", "less than", "less than or equal to", "equal to", "greater than", "greater than or equal to", "not equal to"]
                        description: >
                          The Operator that you want to run the query with. This is optional. By default we will run the query with the `==` operator. If you add a `operator` Field/Key, we will run the query with that Operator.
                      value:
                        type: string
                        description: >
                          The Value that you want to run the query with. This is optional. By default we will run the query with the `==` operator. If you add a `value` Field/Key, we will run the query with that Value.
                compounding:
                  type: string
                  enum: ["and", "or"]
                  description: >
                    The Compounding Operator that you want to run the query with. This is optional. By default we will run the query with the `and` operator if you pass multiple queries. If you add a `compounding` parameter, we will run the query with that Compounding Operator.
                orderBy:
                  type: string
                  description: >
                    The Field/Key that you want to sort the response by. This is optional. By default we will sort it by the Field/Key that you pass in as default orderBy value when collection was created. If you add a `orderBy` Field/Key, we will sort the response by that Field/Key.
                orderType:
                  type: string
                  enum: [asc, desc]
                  description: >
                    The Order Type that you want to sort the response by. This is optional. By default we will sort it in `asc` order. If you add a `orderType` Field/Key, we will sort the response by that Order Type on the `orderBy` Field/Key.
                limit:
                  type: integer
                  description: >
                    The Limit of the number of Documents that you want to fetch. This is optional. By default we will fetch all the Documents that match the query. If you add a `limit` Field/Key, we will limit the response by that number.
                startAfter:
                  type: string
                  description: >
                    The number of documents to skip. This is optional. By default we will not skip any documents. If you add a `startAfter` value, we will skip the number of documents that you pass in.
              example:
                collection: "Users"
                queries:
                  - field: "name"
                    operator: "equal to"
                    value: "Alex"
                  - field: "age"
                    operator: "greater than"
                    value: 18
                compounding: "and"
                orderBy: "age"
                orderType: "desc"
                limit: 10
                startAfter: 5

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            sampleDbContent:
                              type: string
                              description: The data that is stored in the Collection.
                            sampleDbContent2:
                              type: string
                              description: The data that is stored in the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data:
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/fetch/natural-query:
    post:
      summary: Run Natural Language Queries on a Collection
      description: >
        Run Natural Language Queries on a Collection. Describe the data that you want to fetch from a Collection in a natural language format and we will run the query for you.
      operationId: fetchDocumentFromCollectionNLQ
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                query:
                  type: string
                  description: >
                    The Query that you want to run on the Collection. Describe the data that you want to fetch from a Collection in a natural language format and we will run the query for you.
              example:
                collection: "Users"
                queries: "Fetch all the users with age greater than 18"

      responses:
        '200':
          description: Output from the Database Collection Fetch Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            sampleDbContent:
                              type: string
                              description: The data that is stored in the Collection.
                            sampleDbContent2:
                              type: string
                              description: The data that is stored in the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    data:
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"
                      - sampleDbContent: "This is a sample content"
                        sampleDbContent2: "This is a sample content 2"

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/add:
    post:
      summary: Add Documents to a Collection
      description: >
        Add Documents to a Collection. You can add your documents to a Collection using this endpoint in the form of Json.
      operationId: addDocumentToCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to add. **_This is optional_**. If you don't pass a Document ID, we will generate a random ID for you. *Make sure this is unique*. You can add `string` data types as the Document ID, we will convert it automatically.
                data:
                  description: >
                    The Data that you want to store in the Collection. You can add your documents to a Collection using this endpoint in the form of `JSON` objects in NoSQL.
                  type: object
                  properties:
                    sampleDbContent:
                      type: string
                      description: The data that you want to store in the Collection.
                    sampleDbContent2:
                      type: string
                      description: The data that you want to store in the Collection.
              example:
                collection: "Users"
                docId: "1234567890"
                data:
                  sampleDbContent: "This is a sample content"
                  sampleDbContent2: "This is a sample content 2"

      responses:
        '200':
          description: Output from the Database Collection Addition Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/update:
    post:
      summary: Update Documents in a Collection
      description: >
        Update the documents in a collection. You can pass in the values as a Collection and we will update the document. SPECIAL CASE: Nested JSON. If you want to update a nested JSON, there are two ways. You can either replace the entire Nested JSON by passing in the New JSON Value or you can replac any specific key in the Nested JSON by passing it in as a dot-notation key value pair.
      operationId: updateDocumentInCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to update.
                data:
                  description: >
                    The Data that you want to update in the Collection. You can add your documents to a Collection using this endpoint in the form of Json. To update Nested JSONs, you can either pass in the entire Nested JSON or you can pass in the key value pair in the form of dot-notation to update a specific key in the Nested JSON.
                  type: object
                  properties:
                    sampleDbContent:
                      type: string
                      description: The data that you want to store in the Collection.
                    sampleDbContent2:
                      type: string
                      description: The data that you want to store in the Collection.
              example:
                collection: "Users"
                docId: "1234567890"
                data:
                  sampleDbContent: "This is a sample content"
                  sampleDbContent2: "This is a sample content 2"

      responses:
        '200':
          description: Output from the Database Collection Addition Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/delete:
    post:
      summary: Delete Documents from a Collection
      description: >
        Delete a Specific Document from a Collection. You can pass in the Document ID and we will delete the Document from the Collection.
      operationId: deleteDocumentFromCollection
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to update.
              example:
                collection: "Users"
                docId: "1234567890"

      responses:
        '200':
          description: Output from the Database Collection Addition Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/increment:
    post:
      summary: Increment a Number/Numeric Field/Key in a Document
      description: >
        Increment a Number/Numeric Field/Key in a Document. You can pass in the Document ID and the Field/Key that you want to increment and we will increment or decrement the value for you.
      operationId: incrementNumberInDocument
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to update.
                field:
                  type: string
                  description: The Field/Key that you want to increment or decrement.
                increment:
                  type: integer
                  description: The value that you want to increment or decrement the Field/Key by. You can pass in a `negative` value to decrement the Field/Key and a `positive` value to increment the Field/Key.
              example:
                collection: "Users"
                docId: "1234567890"
                field: "age"
                increment: 1

      responses:
        '200':
          description: Output from the Database Collection Edits Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/array/update/add:
    post:
      summary: Add an Element to an Array in a Document
      description: >
        Add an Element to an Array in a Document. You can pass in the Document ID and the Field/Key that you want to add an element to and we will add the element to the Array for you. If the Array does not exist, we will create a new Array and add the element to it.
      operationId: addElementToArrayInDocument
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to update.
                field:
                  type: string
                  description: The Field/Key that you want to increment or decrement.
                arrayUnion:
                  type:
                    - string
                    - boolean
                    - number
                  description: The value that you want to add to the Array.

              example:
                collection: "Users"
                docId: "1234567890"
                field: "identities"
                arrayUnion: "sfdcsfc"

      responses:
        '200':
          description: Output from the Database Collection Edits Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/collections/data/array/update/remove:
    post:
      summary: Remove an Element from an Array in a Document
      description: >
        Remove an Element from an Array in a Document. You can pass in the Document ID and the Field/Key that you want to remove an element from and we will remove the element from the Array for you.
      operationId: removeElementFromArrayInDocument
      tags:
        - Database Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection:
                  type: string
                  description: The Name of the Collection or the Group where you want to store all your data.
                docId:
                  type: string
                  description: The ID of the Document that you want to update.
                field:
                  type: string
                  description: The Field/Key that you want to increment or decrement.
                arrayRemove:
                  type:
                    - string
                    - boolean
                    - number
                  description: The value that you want to add to the Array.

              example:
                collection: "Users"
                docId: "1234567890"
                field: "identities"
                arrayRemove: "sfdcsfc"

      responses:
        '200':
          description: Output from the Database Collection Edits Process
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                  data:
                    type: object
                    properties:
                      databaseId:
                        type: string
                        description: The ID of the Database where the data is stored.
                      collection:
                        type: string
                        description: The Name of the Collection or the Group where you want to store all your data.
                      elapsed_time:
                        type: integer
                        description: The time taken to process the request, in milliseconds.
                      documentId:
                        type: string
                        description: The ID of the Document that you added to the Collection.

                example:
                  status: "success"
                  processing_time: 888
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554
                  data:
                    databaseId: "1234567890"
                    collection: "Users"
                    elapsed_time: 800
                    documentId: "1234567890"
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/datasets/train-datasets:
    post:
      summary: Train Custom Datasets for Search and LLM (Language Model)
      description: >
        Train Custom Datasets for Search and LLM (Language Model). You can train your own custom datasets for Search and LLM (Language Model) using this endpoint. You can pass in the Dataset Name, the Dataset Type and the Dataset File and we will train the dataset for you.
      operationId: trainDatasets
      tags:
        - AI Dataset Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          multi-part/form-data:
            schema:
              type: object
              properties:
                datasetId:
                  type: string
                  description: The ID of the Dataset that you want to train. This is optional. If you don't pass a Dataset ID, we will generate a random ID for you. *Make sure this is unique*. You can pass in a old id if you want to add in more data to your existing Trained Dataset.
                dataset_name:
                  type: string
                  description: The Name of the Dataset that you want to train.
                dataset_type:
                  type: string
                  description: The Type of the Training Dataset after Saving. It can be either `self` or `org`.
                  enum:
                    - self
                    - org
                json_data:
                  type: string
                  description: The JSON Data that you want to train. You can pass in the JSON Data in the form of a stringified JSON.
                training_file:
                  type: string
                  format: binary
                  description: The Training File that you want to train. You can pass in the Training File in the form of a CSV or a PDF file.
            example:
              datasetId: "1234567890"
              dataset_name: "Sample Dataset"
              dataset_type: "self"
              json_data: "{'data': 'This is a sample data'}"
              training_file: "sample.csv"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the Dataset Creation Process.
                  data:
                    type: object
                    properties:
                      dataset_id:
                        type: string
                        description: The ID of the created dataset.
                      dataset_name:
                        type: string
                        description: The name of the created dataset.
                      dataset_description:
                        type: string
                        description: The description of the created dataset.
                      training_for:
                        type: string
                        description: The type of training for the dataset.
                      status:
                        type: string
                        description: The status of the dataset.
                      dataset_timestamp:
                        type: object
                        properties:
                          _seconds:
                            type: integer
                            description: The seconds component of the dataset timestamp.
                          _clock_hash:
                            type: integer
                            description: The clock hash component of the dataset timestamp.
                    description: The information about the created dataset.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what is considered in the Billing Process. This is either the number of times the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  data:
                    dataset_id: "0109c3db-5968-4704-b99e-84d1b8201319"
                    dataset_name: "sampled ataset"
                    dataset_description: ""
                    training_for: "Self"
                    status: "Training"
                    dataset_timestamp:
                      _seconds: 1697742460
                      _clock_hash: 762483
                  processing_time: 5359
                  processing_id: "9cb58eda-8ff3-417c-a5d0-1b427471a3d4"
                  processing_count: 132

        '400':
          description: >
            Bad Request. This mostly happens because of invalid image sizes.
            Neither `height` nor `width` of the image should be less than 128px. Only one of the
            sides of the image should be greater than or equal to 512px. (Eg: 512x512, 512x768, 768x512)
            Maximum dimensions supported is 512x896.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/search/v2:
    post:
      summary: Run a Text AI Based Search on Trained Datasets
      description: >
        Run a Text AI Based Search on Trained Datasets. You can run a Text AI Based Search on Trained Datasets using this endpoint. You can pass in the Dataset ID and the Search Query and we will run the search for you.
      operationId: searchV2
      tags:
        - AI Dataset Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Search Query that you want to search for.
                training_data:
                  type: string
                  description: The ID of the Trained Dataset that you want to search in.
              example:
                question: "What is the capital of India?"
                training_data: "1234567890"

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the request.
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        sId:
                          type: string
                          description: The ID of the item.
                        type:
                          type: string
                          description: The type of the item.
                        name:
                          type: string
                          description: The name of the item.
                        ppu:
                          type: number
                          description: The price per unit of the item.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what is considered in the Billing Process.
                example:
                  status: "success"
                  result:
                    - sId: "07743dc2-2c1f-4b15-919e-7f7aae66586c"
                      type: "donut"
                      name: "Old Fashioned"
                      ppu: 0.55
                  processing_time: 873
                  processing_id: "9b174f6d-df21-460d-b81a-72ff3d9b9852"
                  processing_count: 2
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/search/v3:
    post:
      summary: Run a Context and Meaning Based Search on Trained Datasets
      description: >
        Run a Context and Meaning Based Search on Trained Datasets. You can run a Context and Meaning Based Search on Trained Datasets using this endpoint. You can pass in the Dataset ID and the Search Query and we will run the search for you. This is mostly used in cases where you want to build a recommendation engine or suggest people based on meaning and emotional ideas.
      operationId: searchV3
      tags:
        - AI Dataset Management
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Search Query that you want to search for.
                training_data:
                  type: string
                  description: The ID of the Trained Dataset that you want to search in.
                search_count:
                  type: integer
                  description: The number of results that you want to return.
              example:
                question: "What is the capital of India?"
                training_data: "1234567890"
                search_count: 10

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the request.
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        results:
                          type: object
                          properties:
                            sId:
                              type: string
                              description: The ID of the item.
                            type:
                              type: string
                              description: The type of the item.
                            name:
                              type: string
                              description: The name of the item.
                            ppu:
                              type: string
                              description: The price per unit of the item.
                          description: The detailed information about the item.
                        distance:
                          type: number
                          description: The distance of the item.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what is considered in the Billing Process.
                example:
                  status: "success"
                  result:
                    - results:
                        sId: "07743dc2-2c1f-4b15-919e-7f7aae66586c"
                        type: "donut"
                        name: "Old Fashioned"
                        ppu: "0.55"
                      distance: 0.1902
                    - results:
                        sId: "59183537-9324-44fd-a1e9-023f6acefc52"
                        type: "donut"
                        name: "Cake"
                        ppu: "0.55"
                      distance: 0.2543
                    - results:
                        sId: "b29b523e-f5c3-4402-8080-9f3416837a00"
                        type: "donut"
                        name: "Raised"
                        ppu: "0.55"
                      distance: 0.268
                  processing_time: 3323
                  processing_id: "4e553b00-1898-4337-8003-291cab2f8a2b"
                  processing_count: 4
        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

  /api/ai/content/v2-large/answering:
    post:
      summary: AiCon V2 Large (Based on Custom Trained Datasets) - Question Answering
      description: >
        Content Generation AI focused only on Business Content Generation Purpose. Trained on top
        of actual business and financial data with added data security and privacy. You can also pass in your own custom trained datasets to generate content based on your own data.
      operationId: aiconV2LargeQuestionAnswering
      tags:
        - AI Services
      security:
        - bearerAuth: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  description: The Text or Command to be processed.
                datasetId:
                  type: string
                  description: The ID of the Dataset that you want to use for the Question Answering.
                preserve_history:
                  type: boolean
                  description: >
                    Whether to preserve the conversation history of the user. If set to true,
                    the conversation history will be preserved and the conversation history will
                    be accepted as `conversation_history` in the request body.
                conversation_history:
                  type: array
                  description: >
                    The conversation history of the user as an array of objects. Each object
                    should have a `question` and `answer` property as the key and value respectively.
                  items:
                    type: object
                    properties:
                      conversation:
                        type: string
                        description: The conversation between the user and the AI as a key value pair.
                randomness:
                    type: integer
                    description: >
                        The randomness factor to be used while generating the content. The higher the
                        randomness, the more creative the content will be. The value should be between
                        0 and 1. `0` means it will be absolutely to the point and stops
                        hallucinations. `1` means it will be completely creative and creates a
                        content surrounding your questions a lot.
                    default: 0.5
                instructions:
                    type: string
                    description: >
                        The instructions to be used while generating the content. This can be used to
                        pass in smaller content based on how you want the model to behave, and
                        specific behavioural or restrictive traits you want to add. This is optional.
                stream_data:
                    type: boolean
                    description: >
                        Whether to stream the data as it is being generated. If set to true, the
                        response will be streamed as the data is being generated. This is useful
                        when you want to generate a lot of content and want to save the data as it
                        is being generated. You need to handle Server Sent Events for this use case.
                    default: false
            example:
              question: "What is the capital of India?"
              datasetId: "1234567890"
              preserve_history: true
              randomness: 0.5
              stream_data: false
              conversation_history: [
                {
                  "What is the capital of India?": "New Delhi"
                },
                {
                  "What is the capital of USA?": "Washington DC"
                }]
              instructions: 'You are alex and you are one of the best Tour Guides.'

      responses:
        '200':
          description: Text Content Generated Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status indicating the success of the text moderation.
                  content:
                    type: string
                    description: The text content generated.
                  processing_time:
                    type: integer
                    description: The time taken to process the request, in milliseconds.
                  processing_id:
                    type: string
                    description: A universally unique identifier for the request. This can be used to track the request in the logs.
                  processing_count:
                    type: integer
                    description: The number of times the request has been processed. This is what
                      is considered in the Billing Process. This is either the number of times
                      the image is processed or the number of words that the server processes.
                example:
                  status: "success"
                  processing_time: 888
                  content: >
                    "Hello! My name is Alex, and I am your tour guide. I am here to assist
                    you and provide you with information about the places we will be visiting. If you have any questions or need any help during our tour, feel free to ask. I'm here to make your experience enjoyable and memorable. Let's have a great time exploring together"
                  processing_id: "4b139bfe-1f71-4345-b539-fa6c1700f166"
                  processing_count: 6554

        '400':
          description: >
            Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400Response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401Response'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404Response'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error406Response'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500Response'

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: 'sk-<api_key>'

  schemas:
    Error400Response:
      type: object
      properties:
        status:
          type: string
          description: Status code indicating the error.
        message:
          type: string
          description: A message describing the error.
        processing_id:
          type: string
          description: A universally unique identifier for the request. This can be used to track the request in the logs.
        processing_time:
          type: string
          description: The time taken to process the request, in milliseconds.
      example:
        status: "400"
        message: "Bad Request"
        processing_id: "123e4567-e89b-12d3-a456-426614174000"
        processing_time: "343"


    Error401Response:
      type: object
      properties:
        status:
          type: string
          description: Status code indicating the error.
        message:
          type: string
          description: A message describing the error.
        processing_id:
          type: string
          description: A universally unique identifier for the request. This can be used to track the request in the logs.
        processing_time:
          type: string
          description: The time taken to process the request, in milliseconds.
      example:
        status: "401"
        message: "Unauthorized"
        processing_id: "123e4567-e89b-12d3-a456-426614174000"
        processing_time: "343"


    Error406Response:
      type: object
      properties:
        status:
          type: string
          description: Status code indicating the error.
        message:
          type: string
          description: A message describing the error.
        processing_id:
          type: string
          description: A universally unique identifier for the request. This can be used to track the request in the logs.
        processing_time:
          type: string
          description: The time taken to process the request, in milliseconds.
      example:
        status: "406"
        message: "Not Acceptable"
        processing_id: "123e4567-e89b-12d3-a456-426614174000"
        processing_time: "343"


    Error404Response:
      type: object
      properties:
        status:
          type: string
          description: Status code indicating the error.
        message:
          type: string
          description: A message describing the error.
        processing_id:
          type: string
          description: A universally unique identifier for the request. This can be used to track the request in the logs.
        processing_time:
          type: string
          description: The time taken to process the request, in milliseconds.
      example:
        status: "404"
        message: "Not Found"
        processing_id: "123e4567-e89b-12d3-a456-426614174000"
        processing_time: "343"

    Error500Response:
      type: object
      properties:
        status:
          type: string
          description: Status code indicating the error.
        message:
          type: string
          description: A message describing the error.
        processing_id:
          type: string
          description: A universally unique identifier for the request. This can be used to track the request in the logs.
        processing_time:
          type: string
          description: The time taken to process the request, in milliseconds.
      example:
        status: "500"
        message: "Internal Server Error"
        processing_id: "123e4567-e89b-12d3-a456-426614174000"
        processing_time: "343"