Skip to main content

Files API

The client.files lets you upload, retrieve, and manage files used by the VLM Run platform. Files are essential for predictions, fine-tuning, and dataset creation.

Quick Examples

Upload a File

Retrieve a File

List Files

Delete a File

File Lifecycle

Files in VLM Run follow a simple lifecycle:
  1. Upload - Send files to the platform
  2. Process - Use files for predictions or other operations
  3. Manage - List, retrieve, or delete files as needed

Uploading Files

Basic Upload

With Purpose

Files can be categorized by purpose, which affects how they can be used:

From File Object

Available Purposes

Retrieving Files

Get File Details

List Files

Delete Files

Common Patterns

Upload and Process

The most common pattern is uploading a file and using it immediately:

Batch Processing Multiple Files

Temporary File Management

Clean up files after use:

Optimization Features

File Caching

VLM Run automatically detects duplicate files using content hashing:

Pre-upload Caching Check

Check if a file exists before uploading:

Response Structure

The FileResponse object has the following structure:
Example usage:

Error Handling

Best Practices

Use Descriptive Filenames

Check Cache for Efficiency

Clean Up Unused Files

Set Appropriate Timeouts for Large Files