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

# Retrieve a single file by ID

> Retrieve detailed information for a single file by its ID.
Only files that the authenticated user is authorized to access will be returned.
Returns 404 if the file does not exist or the user does not have access.

Query Parameters:
- include_content: Set to 'true' to include the full text content of the document (default: false)

The response includes comprehensive document details including:
- Basic metadata (id, filename, title, extension, dates, page count)
- Full text content of the document (only when include_content=true)
- Processing status (status, status_vision, status_detail if failed)
- Associated tags and workspace information
- File size (if available)
- Parser/ingestion pipeline (if available, after parsing starts)
- Signature (TLSH hash for duplicate detection)



## OpenAPI

````yaml /api-reference/openapi-v3.yaml get /api/v3/files/{id}
openapi: 3.0.3
info:
  title: Paradigm API
  version: xenial-xerus (v3)
  description: >-
    A versatile and adaptable tool designed to integrate Generative AI into your
    applications
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Files Processing
    description: Operations about files processing
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/files/{id}:
    get:
      tags:
        - Files
      summary: Retrieve a single file by ID
      description: >-
        Retrieve detailed information for a single file by its ID.

        Only files that the authenticated user is authorized to access will be
        returned.

        Returns 404 if the file does not exist or the user does not have access.


        Query Parameters:

        - include_content: Set to 'true' to include the full text content of the
        document (default: false)


        The response includes comprehensive document details including:

        - Basic metadata (id, filename, title, extension, dates, page count)

        - Full text content of the document (only when include_content=true)

        - Processing status (status, status_vision, status_detail if failed)

        - Associated tags and workspace information

        - File size (if available)

        - Parser/ingestion pipeline (if available, after parsing starts)

        - Signature (TLSH hash for duplicate detection)
      operationId: api_v3_files_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this Document.
          required: true
        - in: query
          name: include_content
          schema:
            type: boolean
          description: >-
            When true, include the full text content of the document in the
            response (default: false). Recommended to only enable when needed as
            content can be large.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileRetrieveResponseSerializerV3'
              examples:
                BasicFileDetails:
                  value:
                    id: 123
                    filename: project_proposal.pdf
                    workspace:
                      id: 1
                      name: Engineering Team
                    summaries:
                      - language: en
                        summary: This document outlines Q4 initiatives...
                    title: Q4 Project Proposal
                    extension: pdf
                    status: embedded
                    status_vision: embedded
                    created_at: '2024-01-15T10:30:00Z'
                    updated_at: '2024-01-15T10:35:00Z'
                    total_pages: 25
                    size: 2458624
                    tags:
                      - id: 10
                        name: Project X
                        auto_assigned: false
                    created_by:
                      id: 42
                      first_name: Jane
                      last_name: Doe
                      username: jdoe
                    signature: >-
                      T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2
                    parser: v2.2.1
                    external_metadata: null
                  summary: Basic file details
                FileFromExternalDatasource:
                  value:
                    id: 124
                    filename: SRV-456789.pdf
                    workspace:
                      id: 1
                      name: Engineering Team
                    summaries: []
                    title: ServiceNow Incident SRV-456789
                    extension: pdf
                    status: embedded
                    status_vision: embedded
                    created_at: '2024-01-15T10:30:00Z'
                    updated_at: '2024-01-15T10:35:00Z'
                    total_pages: 3
                    size: 102400
                    tags: []
                    created_by:
                      id: 42
                      first_name: Jane
                      last_name: Doe
                      username: jdoe
                    signature: >-
                      T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2
                    external_metadata:
                      external_id: SRV-456789
                      doc_type: incident
                      additional_metadata:
                        external_url: https://servicenow.example.com/incident/SRV-456789
                        external_full_path: ServiceNow > Incidents > SRV-456789
                        created_at: '2024-01-10T08:00:00Z'
                        modified_at: '2024-01-12T16:45:00Z'
                  summary: File from external datasource
                  description: >-
                    A file that was ingested from an external system.
                    `external_metadata` contains the external ID, type, and any
                    extra metadata that was passed at upload time.
                WithContentIncluded:
                  value:
                    id: 123
                    filename: project_proposal.pdf
                    workspace:
                      id: 1
                      name: Engineering Team
                    summaries:
                      - language: en
                        summary: This document outlines Q4 initiatives...
                    title: Q4 Project Proposal
                    extension: pdf
                    status: embedded
                    status_vision: embedded
                    created_at: '2024-01-15T10:30:00Z'
                    updated_at: '2024-01-15T10:35:00Z'
                    total_pages: 25
                    size: 2458624
                    tags: []
                    created_by:
                      id: 42
                      first_name: Jane
                      last_name: Doe
                      username: jdoe
                    signature: >-
                      T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2
                    content: |-
                      Q4 Project Proposal

                      Executive Summary

                      This document outlines our strategic initiatives for Q4...
                    parser: v2.2.1
                    external_metadata: null
                  summary: With content included
                FailedDocumentWithErrorDetails:
                  value:
                    id: 126
                    filename: corrupted_file.pdf
                    workspace:
                      id: 2
                      name: Marketing
                    summaries: []
                    title: Corrupted File
                    extension: pdf
                    status: failed
                    status_vision: '-'
                    created_at: '2024-01-16T11:00:00Z'
                    updated_at: '2024-01-16T11:05:00Z'
                    total_pages: 0
                    size: 1024
                    tags: []
                    created_by: null
                    signature: null
                    status_detail: 'Failed to parse PDF: File is corrupted or encrypted'
                    external_metadata: null
                  summary: Failed document with error details
          description: Detailed file information
        '401':
          description: Authentication failed - missing or invalid API key
        '404':
          description: File not found or not accessible
      security:
        - bearerAuth: []
components:
  schemas:
    FileRetrieveResponseSerializerV3:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        filename:
          type: string
          readOnly: true
          description: Filename of the document
        workspace:
          allOf:
            - $ref: '#/components/schemas/WorkspaceInFileResponseSerializerV3'
          nullable: true
          readOnly: true
          description: Workspace the document belongs to
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/DocumentSummaryResponse'
          readOnly: true
          description: Document summaries (all languages)
        title:
          type: string
          nullable: true
          maxLength: 255
        extension:
          type: string
          description: File extension of the document
        status:
          $ref: '#/components/schemas/Status88dEnum'
        status_vision:
          $ref: '#/components/schemas/StatusVisionEnum'
        created_at:
          type: string
          format: date-time
          description: Creation date of the resource
        updated_at:
          type: string
          format: date-time
          readOnly: true
        total_pages:
          type: integer
          readOnly: true
          description: Total number of pages
        size:
          type: integer
          nullable: true
          readOnly: true
          description: Size of the file in bytes.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagItem'
          readOnly: true
          description: List of tags associated with the document
        created_by:
          allOf:
            - $ref: '#/components/schemas/CreatedBy'
          nullable: true
          readOnly: true
          description: >-
            User who created the file. Null when the file was created by the
            system.
        upload_session_uuid:
          type: string
          format: uuid
          nullable: true
          readOnly: true
          description: Upload session UUID associated with this document
        signature:
          type: string
          nullable: true
          readOnly: true
          description: TLSH hash for duplicate detection.
        content:
          type: string
          nullable: true
          description: >-
            Full text content of the document. Only included when
            include_content=true query parameter is provided.
        status_detail:
          type: string
          nullable: true
          description: >-
            Detailed error information. Only present when document processing
            has failed.
        parser:
          type: string
          nullable: true
          description: >-
            Parser/ingestion pipeline used for document processing (e.g.,
            'v2.1', 'v3.0'). 
        external_metadata:
          allOf:
            - $ref: '#/components/schemas/ExternalMetadata'
          description: External document metadata
      required:
        - created_at
        - created_by
        - extension
        - external_metadata
        - filename
        - id
        - signature
        - size
        - summaries
        - tags
        - total_pages
        - updated_at
        - upload_session_uuid
        - workspace
    WorkspaceInFileResponseSerializerV3:
      type: object
      description: Minimal workspace info for file responses.
      properties:
        id:
          type: integer
          description: Workspace ID
        name:
          type: string
          description: Workspace name
        workspace_type:
          type: string
          description: Workspace type (company, personal, or custom)
      required:
        - id
        - name
        - workspace_type
    DocumentSummaryResponse:
      type: object
      properties:
        language:
          allOf:
            - $ref: '#/components/schemas/DocumentSummaryResponseLanguageEnum'
          description: |-
            Language of the summary.

            * `en` - English
            * `fr` - French
            * `es` - Spanish
            * `it` - Italian
            * `ar` - Arabic
            * `nl` - Dutch
            * `sv` - Swedish
            * `de` - German
            * `ja` - Japanese
            * `zh` - Chinese
            * `ko` - Korean
        summary:
          type: string
          description: Summary of the document.
      required:
        - summary
    Status88dEnum:
      enum:
        - pending
        - parsing
        - parsing_failed
        - embedding
        - embedding_failed
        - embedded
        - fail
        - updating
      type: string
      description: |-
        * `pending` - Pending
        * `parsing` - Parsing
        * `parsing_failed` - Parsing Failed
        * `embedding` - Embedding
        * `embedding_failed` - Embedding Failed
        * `embedded` - Embedded
        * `fail` - Fail
        * `updating` - Updating
    StatusVisionEnum:
      enum:
        - pending
        - processing
        - embedded
        - fail
        - '-'
      type: string
      description: |-
        * `pending` - Pending
        * `processing` - Processing
        * `embedded` - Embedded
        * `fail` - Fail
        * `-` - Not available
    TagItem:
      type: object
      description: Serializer for tag items in file list response.
      properties:
        id:
          type: integer
          description: Tag ID
        name:
          type: string
          description: Tag name
        auto_assigned:
          type: boolean
          description: >-
            True if this tag was automatically assigned by the system, False if
            manually assigned by a user
      required:
        - auto_assigned
        - id
        - name
    CreatedBy:
      type: object
      description: Shallow user object for the file creator.
      properties:
        id:
          type: integer
          description: User ID
        first_name:
          type: string
          description: First name
        last_name:
          type: string
          description: Last name
        username:
          type: string
          description: Username
      required:
        - first_name
        - id
        - last_name
        - username
    ExternalMetadata:
      type: object
      properties:
        external_id:
          type: string
          description: External document ID
        doc_type:
          type: string
          description: External document type
        additional_metadata:
          description: Additional metadata associated with the document
      required:
        - additional_metadata
        - doc_type
        - external_id
    DocumentSummaryResponseLanguageEnum:
      enum:
        - en
        - fr
        - es
        - it
        - ar
        - nl
        - sv
        - de
        - ja
        - zh
        - ko
      type: string
      description: |-
        * `en` - English
        * `fr` - French
        * `es` - Spanish
        * `it` - Italian
        * `ar` - Arabic
        * `nl` - Dutch
        * `sv` - Swedish
        * `de` - German
        * `ja` - Japanese
        * `zh` - Chinese
        * `ko` - Korean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````