Skip to main content
The AI Gateway supports managing files in two ways:
  1. Provider Files: Uploading and managing files directly to any provider using the unified signature
  2. AI Gateway Files: Uploading files to the AI Gateway and using them for batching/fine-tuning requests with any provider

1. Provider Files

Upload and manage files directly to providers (OpenAI, Bedrock, etc.) using the AI Gateway’s unified API signature. This approach is useful when you need provider-specific file features or want to manage files directly on the provider’s platform.

Supported Providers

Quick Example


2. AI Gateway Files

Upload files to the AI Gateway and reuse them for batching inference with any provider and fine-tuning with supported providers. This approach is ideal for:
  • Testing your data with different foundation models
  • Performing A/B testing across multiple providers
  • Batch inference with provider-agnostic file management
  • Reusing the same file across multiple batch jobs

File Requirements

  • Format: JSONL files where each line contains a single request payload

Uploading Files

Listing Files

Get File Details

Get File Content


File Format Examples

Batch Inference JSONL Format

Each line should be a valid JSON object representing a single request:

Fine-tuning JSONL Format

For fine-tuning, each line should contain training examples:

Security & Best Practices

  • Encryption: Files are encrypted at rest using AES-256
  • Access Control: File access is gated by workspace permissions
  • Provider Upload: The AI Gateway uploads files to providers using least-privilege credentials

Last modified on September 15, 2026