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

# Read File

> Read a file out of the sandbox.

Binary files should be fetched with ``encoding=base64``; utf-8 reads of
non-text content are rejected rather than silently mangled.



## OpenAPI

````yaml get /v1/sandboxes/{sandbox_id}/files
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/sandboxes/{sandbox_id}/files:
    get:
      tags:
        - V1 - Sandboxes
      summary: Read File
      description: |-
        Read a file out of the sandbox.

        Binary files should be fetched with ``encoding=base64``; utf-8 reads of
        non-text content are rejected rather than silently mangled.
      operationId: read_file
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            title: Sandbox Id
        - name: path
          in: query
          required: true
          schema:
            type: string
            title: Path
        - name: encoding
          in: query
          required: false
          schema:
            type: string
            default: utf-8
            title: Encoding
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadFileOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ReadFileOut:
      properties:
        path:
          type: string
          title: Path
        content:
          type: string
          title: Content
        encoding:
          type: string
          title: Encoding
      type: object
      required:
        - path
        - content
        - encoding
      title: ReadFileOut
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````