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

# Retrieve File

> Returns metadata for a single file (size, content type, purpose, etc.).
Use the `/v1/files/{file_id}/content` endpoint to download the bytes.

Return metadata (size, filename, purpose, creation time) for one file. For the bytes, use [Retrieve File Content](/perceptron-mk1/api-reference/endpoint/retrieve-file-content). Compatible with [OpenAI's Retrieve file endpoint](https://developers.openai.com/api/reference/resources/files/methods/retrieve).

Rate limit: **100 requests/min**.


## OpenAPI

````yaml api-reference/openapi.json GET /v1/files/{file_id}
openapi: 3.1.0
info:
  title: Perceptron API
  contact:
    name: Perceptron API Support
    email: support@perceptron.inc
  version: 1.0.0
servers:
  - url: https://api.perceptron.inc
security: []
tags:
  - name: Chat Completions
    description: Chat completions API (OpenAI-compatible)
  - name: Detection
    description: Native Perceptron image detection API
  - name: Models
    description: Model listing and metadata API
  - name: Files
    description: File upload, listing, retrieval, and deletion API
paths:
  /v1/files/{file_id}:
    get:
      tags:
        - Files
      summary: Retrieve a file
      description: |-
        Returns metadata for a single file (size, content type, purpose, etc.).
        Use the `/v1/files/{file_id}/content` endpoint to download the bytes.
      operationId: handle_retrieve_file
      parameters:
        - name: file_id
          in: path
          description: The id of the file to retrieve.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: File metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '401':
          description: Authentication failed. Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: Invalid API key
                  param: null
                  type: authentication_error
        '404':
          description: No such file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: 'No such File object: file-missing'
                  param: id
                  type: invalid_request_error
        '500':
          description: Internal server error while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: The server had an error while processing your request.
                  param: null
                  type: server_error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    File:
      type: object
      required:
        - object
        - id
        - bytes
        - created_at
        - filename
        - purpose
      properties:
        bytes:
          type: integer
          format: int64
          description: File size in bytes.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the file was created.
        filename:
          type: string
          description: Original file name.
        id:
          type: string
          description: File ID, e.g. `file-abc123`.
        object:
          type: string
          description: Always "file".
        purpose:
          $ref: '#/components/schemas/FilePurpose'
          description: File purpose.
    OpenAIErrorResponse:
      type: object
      description: OpenAI-compatible error response format.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/OpenAIErrorDetail'
    FilePurpose:
      type: string
      enum:
        - vision
        - user_data
      example: vision
    OpenAIErrorDetail:
      type: object
      description: OpenAI-compatible error detail.
      required:
        - message
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your Perceptron API key

````