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

# Get Source Bounding Boxes

> Locate the quoted text of one or more chat citations in their source attachments. This on-demand operation does not affect chat latency.



## OpenAPI

````yaml https://document-assistant.us.aodocs.app/openapi.json post /assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes
openapi: 3.1.0
info:
  title: Document Assistant API
  description: |
    <p>
      The Document Assistant API enables developers to integrate document-based assistant
      functionalities into their applications using AODocs.
    </p>
    <p>
      The first step is to enable AIDA (AODocs Intelligent Document Assistant) in your tenant.
      The support team will provide you with the necessary information on how to get started.
    </p>
    <p>
      The second step is to enable AIDA on libraries. You need to be an administrator of the
      library to do this.<br />
      AIDA can answer questions only from those documents that are in an AIDA enabled
      library.<br />
      We create a vector store index for these documents. This can take some time. The get
      library API provides the status of the indexation and an estimate of the time
      remaining.<br />
      The content of the index is automatically kept up-to-date near real time with the
      content changes.
    </p>
    <p>
      The third step is to ask questions based on the AODocs documents.<br />
      AIDA automatically filters the results based on the user's permissions.
    </p>
    <p>
      <strong>Authentication:</strong> All API endpoints require a valid OAuth2 token in the
      Authorization header. Ensure the client ID of the OAuth2 token is whitelisted in AODocs.
    </p>
  version: 1.1.0
servers:
  - url: https://document-assistant.us.aodocs.app
    description: Production US
  - url: https://document-assistant.eu.aodocs.app
    description: Production EU
security: []
paths:
  /assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes:
    post:
      tags:
        - chat
      summary: Get Source Bounding Boxes
      description: >-
        Locate the quoted text of one or more chat citations in their source
        attachments. This on-demand operation does not affect chat latency.
      operationId: >-
        get_source_bounding_boxes_assistant_api_v1_tenants__tenant__sources_getBoundingBoxes_post
      parameters:
        - name: tenant
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The domain of the customer
            examples:
              - example.com
            title: Tenant
          description: The domain of the customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceBoundingBoxRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceBoundingBoxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SourceBoundingBoxRequest:
      properties:
        sources:
          items:
            $ref: '#/components/schemas/SourceBoundingBoxSource'
          type: array
          maxItems: 100
          minItems: 1
          title: Sources
      type: object
      required:
        - sources
      title: SourceBoundingBoxRequest
    SourceBoundingBoxResponse:
      properties:
        sources:
          items:
            $ref: '#/components/schemas/SourceBoundingBoxResult'
          type: array
          title: Sources
      type: object
      required:
        - sources
      title: SourceBoundingBoxResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SourceBoundingBoxSource:
      properties:
        id:
          type: string
          maxLength: 512
          title: Id
        document_id:
          type: string
          maxLength: 512
          title: Document Id
        attachment_id:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Attachment Id
        attachment_mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Attachment Mime Type
        quoted_text:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Quoted Text
        location_info:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Location Info
        location_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Type
        revision_id:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Revision Id
      type: object
      required:
        - id
        - document_id
      title: SourceBoundingBoxSource
      description: >-
        The citation fields needed to locate a quote without coupling to chat UI
        data.
    SourceBoundingBoxResult:
      properties:
        id:
          type: string
          title: Id
        status:
          $ref: '#/components/schemas/SourceBoundingBoxStatus'
        bounding_boxes:
          items:
            $ref: '#/components/schemas/BoundingBox'
          type: array
          title: Bounding Boxes
      type: object
      required:
        - id
        - status
      title: SourceBoundingBoxResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SourceBoundingBoxStatus:
      type: string
      enum:
        - matched
        - no_match
        - unsupported
        - source_not_found
        - incomplete
        - error
      title: SourceBoundingBoxStatus
    BoundingBox:
      properties:
        attachment_id:
          type: string
          title: Attachment Id
          description: ID of the attachment containing the box
        page:
          type: integer
          minimum: 1
          title: Page
          description: 1-based page number
        x:
          type: number
          maximum: 1
          minimum: 0
          title: X
        'y':
          type: number
          maximum: 1
          minimum: 0
          title: 'Y'
        width:
          type: number
          maximum: 1
          exclusiveMinimum: 0
          title: Width
        height:
          type: number
          maximum: 1
          exclusiveMinimum: 0
          title: Height
      type: object
      required:
        - attachment_id
        - page
        - x
        - 'y'
        - width
        - height
      title: BoundingBox
      description: >-
        A rectangle in the full attachment page or image viewport.


        Coordinates are normalized fractions in the range 0.0-1.0 with a
        top-left

        origin. PDF coordinates refer to the complete rotated page before
        whitespace

        trimming or tiling; standalone images use their EXIF-normalized
        orientation.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````