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

# Get file

> Get the file details by its unique ID.



## OpenAPI

````yaml get /api/files/{file_id}
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/files/{file_id}:
    get:
      tags:
        - Files
      summary: Get file
      description: Get the file details by its unique ID.
      operationId: get_file_api_files__file_id__get
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Unique ID of the file to retrieve.
            title: File Id
          description: Unique ID of the file to retrieve.
      responses:
        '200':
          description: File retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileModel'
        '400':
          description: Bad request. Invalid file ID format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized. You must authenticate to call this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The specified file wasn't found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    FileModel:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Unique ID for the file.
        owner_id:
          type: string
          title: Owner Id
          description: The logged in user's email ID.
        name:
          type: string
          title: Name
          description: Name of the uploaded file.
        bucket_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket Name
          description: Name of the S3 bucket that stores this file.
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
          description: URL from which the file was originally uploaded.
        s3_url:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Url
          description: S3 URL of the uploaded file.
        size:
          type: integer
          title: Size
          description: Size of the file in bytes.
        access_count:
          type: integer
          title: Access Count
          description: Number of times you accessed the file.
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp of the upload.
        accessed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Accessed At
          description: Timestamp when the file was last accessed.
      type: object
      required:
        - owner_id
        - name
        - size
      title: FileModel
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    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:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````