Skip to main content
The GravixLayer SDK provides comprehensive file management capabilities, allowing you to upload, list, retrieve, delete, and access file content. This is useful for managing documents, datasets, and other files that can be used with AI models.
Public Preview: Gravix Layer is currently in Public preview. Features are experimental and may have issues or break as ongoing updates to API endpoints and models continue.

Overview

File management allows you to:
  • Upload Files: Store documents, datasets, and media files
  • List Files: View all uploaded files with metadata
  • Download Content: Retrieve file content for processing
  • Delete Files: Remove files to manage storage

Prerequisites

Before managing files, you need to set up your API key:
API Key Required: You must export your GravixLayer API key in your terminal before using file operations. All file operations are tied to your API key and account.
Set your API key:
  • Windows (CMD)
  • Windows (PowerShell)
  • Linux/macOS
set GRAVIXLAYER_API_KEY=your_api_key_here

Supported File Types

File Purposes

PurposeDescriptionUse Cases
fine-tuneFiles for model fine-tuningTraining datasets, JSONL files
batchFiles for batch processingBulk inference data
visionImage files for vision modelsPNG, JPG, JPEG, GIF, WEBP
user_dataUser-specific data filesPersonal documents, datasets
evalsEvaluation and testing filesTest datasets, benchmark data

Supported Formats

CategoryExtensions
DocumentsPDF, TXT, DOCX, MD
ImagesPNG, JPG, JPEG, GIF, WEBP
DataJSON, CSV, JSONL
CodePY, JS, HTML, CSS, TS

File Expiration

File Expiration with --expires-after:
  • The --expires-after parameter accepts time in seconds
  • Default behavior: Files have no expiration limit when this parameter is not specified
I