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

# Trigger document processing

> Create the document record and enqueue asynchronous processing. Select chunked retrieval for vector search or full_document for full-text use. Poll processing_status; request acceptance is not processing completion.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/knowledge-base/process-document
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/knowledge-base/process-document:
    post:
      tags:
        - Knowledge Base
      summary: Trigger document processing
      description: >-
        Create the document record and enqueue asynchronous processing. Select
        chunked retrieval for vector search or full_document for full-text use.
        Poll processing_status; request acceptance is not processing completion.
      operationId: process_document_api_v1_knowledge_base_process_document_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessDocumentRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponseSchema'
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    ProcessDocumentRequestSchema:
      properties:
        document_uuid:
          type: string
          title: Document Uuid
          description: Document UUID to process
        s3_key:
          type: string
          title: S3 Key
          description: S3 key of the uploaded file
        retrieval_mode:
          type: string
          title: Retrieval Mode
          description: >-
            Retrieval mode: 'chunked' for vector search or 'full_document' for
            full text retrieval
          default: chunked
      type: object
      required:
        - document_uuid
        - s3_key
      title: ProcessDocumentRequestSchema
      description: Request schema for triggering document processing.
    DocumentResponseSchema:
      properties:
        id:
          type: integer
          title: Id
        document_uuid:
          type: string
          title: Document Uuid
        filename:
          type: string
          title: Filename
        file_size_bytes:
          type: integer
          title: File Size Bytes
        file_hash:
          type: string
          title: File Hash
        mime_type:
          type: string
          title: Mime Type
        processing_status:
          type: string
          title: Processing Status
        processing_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Processing Error
        total_chunks:
          type: integer
          title: Total Chunks
        retrieval_mode:
          type: string
          title: Retrieval Mode
          default: chunked
        custom_metadata:
          additionalProperties: true
          type: object
          title: Custom Metadata
        docling_metadata:
          additionalProperties: true
          type: object
          title: Docling Metadata
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        organization_id:
          type: integer
          title: Organization Id
        created_by:
          type: integer
          title: Created By
        is_active:
          type: boolean
          title: Is Active
        has_live_content:
          type: boolean
          title: Has Live Content
          description: >-
            Whether agents can currently retrieve this document's content. Stays
            true while an edited document is re-indexed or after its re-index
            fails, because the previous version keeps serving until a new one
            succeeds.
          default: false
      type: object
      required:
        - id
        - document_uuid
        - filename
        - file_size_bytes
        - file_hash
        - mime_type
        - processing_status
        - total_chunks
        - custom_metadata
        - docling_metadata
        - created_at
        - updated_at
        - organization_id
        - created_by
        - is_active
      title: DocumentResponseSchema
      description: Response schema for document metadata.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.