Files API
Theclient.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:- Upload - Send files to the platform
- Process - Use files for predictions or other operations
- 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
Purpose | Description | Common File Types |
---|---|---|
fine-tune | For fine-tuning models | Training data, JSON files |
assistants | General usage (default) | Images, PDFs, text files |
assistants_output | Output from assistants | Generated content |
batch | Input files for batch processing | Large collections |
batch_output | Output from batch processing | Results and reports |
vision | For vision-based models | Images, screenshots |
datasets | For dataset creation | Labeled data collections |
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
TheFileResponse
object has the following structure: