> ## 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 Content

> Returns the raw bytes with the file's stored `Content-Type` header.

Download a file's raw bytes (response `Content-Type` matches the upload). For metadata only, use [Retrieve File](/isaac-0.2/api-reference/endpoint/retrieve-file). Compatible with [OpenAI's Retrieve file content endpoint](https://developers.openai.com/api/reference/resources/files/methods/content).

You can pass this content URL as an `image_url` or `video_url` in a chat completion — see [Working with files](/isaac-0.2/guides/files).

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


## OpenAPI

````yaml api-reference/openapi.json GET /v1/files/{file_id}/content
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}/content:
    get:
      tags:
        - Files
      summary: Download a file's contents
      description: Returns the raw bytes with the file's stored `Content-Type` header.
      operationId: handle_retrieve_file_content
      parameters:
        - name: file_id
          in: path
          description: The id of the file whose contents to return.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            File bytes. The response `Content-Type` matches what was supplied at
            upload time.
          content:
            application/octet-stream:
              schema:
                type: array
                items:
                  type: integer
                  format: int32
                  minimum: 0
        '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 fetching file contents.
          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:
    OpenAIErrorResponse:
      type: object
      description: OpenAI-compatible error response format.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/OpenAIErrorDetail'
    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

````