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

# Get File by ID

> Get a file by ID.

<RequestExample>
  ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  !pip install vlmrun

  from vlmrun.client import VLMRun

  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Get the file by ID
  response = client.files.get(file_id="file_123")
  ```

  ```typescript Node.js SDK theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";

  const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });

  // Get the file by ID
  const response = await client.files.get("file_123");
  console.log(response);
  ```
</RequestExample>


## OpenAPI

````yaml GET /v1/files/{file_id}
openapi: 3.1.0
info:
  title: VLM Run Unified Server
  description: Unified server for VLM Run Agent and API
  termsOfService: https://vlm.run/terms-of-service
  contact:
    name: VLM Run Support Team
    url: https://vlm.run/
    email: support@vlm.run
  version: 2026-05-19.0
servers: []
security: []
paths:
  /v1/files/{file_id}:
    get:
      tags:
        - files
      summary: Get File Route
      description: Get a file by ID.
      operationId: get_file_route_v1_files__file_id__get
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            title: File Id
        - name: generate_public_url
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to generate a public URL for the file
            default: true
            title: Generate Public Url
          description: Whether to generate a public URL for the file
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    StoreFileResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier of the file
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
          description: Name of the file
        bytes:
          type: integer
          title: Bytes
          description: Size of the file in bytes
        purpose:
          type: string
          enum:
            - assistants
            - batch
            - fine-tune
            - vision
            - datasets
          title: Purpose
          description: Purpose of the file
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Date and time when the file was created (in UTC timezone)
        object:
          type: string
          const: file
          title: Object
          description: Type of the file
          default: file
        public_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Public Url
          description: Presigned URL of the file
      type: object
      required:
        - filename
        - bytes
        - purpose
      title: StoreFileResponse
      description: Response to the file upload API.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````