Files Overview
Files let you sell digital downloads through PayWeave with per-download pricing via MPP. Upload files to a collection, set a price, and agents or users pay to download — no accounts, no subscriptions, just pay-per-download.
When to use Files
Files are ideal when you want to monetize static content that agents or users download directly. Common use cases:
Datasets - ML training data, research datasets, financial data feeds.
Model weights - LoRAs, embeddings, fine-tuned checkpoints, ONNX models.
Digital goods - Reports, templates, design assets, software packages.
RAG sources - Knowledge bases, indexed documents, proprietary content for AI agents.
Files vs Apps vs Gateways vs Functions
| Files | Functions | Apps | Gateways | |
|---|---|---|---|---|
| Content | Static files | Dynamic code | Your server | Upstream API |
| Infrastructure | Fully managed (R2) | Fully managed | You manage | You manage upstream |
| Pricing | Per-download in dashboard | Per-handler in dashboard | Per-route in code | Per-endpoint in dashboard |
| Best for | Datasets, models, digital goods | New APIs from scratch | Existing server apps | Wrapping existing APIs |
How it works
When an agent or user requests a file download:
1. PayWeave checks for a valid payment credential. If missing, it responds with 402 Payment Required with the file's download price.
2. The caller submits payment on Tempo and retries with Authorization: Payment <credential>.
3. PayWeave verifies the payment and streams the file directly from R2 storage.
4. The file is returned with Content-Disposition: attachment and a Payment-Receipt header.
File URLs
Each collection receives a base URL. Files within the collection are accessible by filename:
Collection: https://api.payweave.dev/fl/<collection-id>
File: https://api.payweave.dev/fl/<collection-id>/<filename>Limits
| Limit | Value |
|---|---|
| Max file size | 100 MB |
| Storage | Cloudflare R2 (unlimited) |
| Minimum price | $0.0001 per download |
| Supported formats | Any file type |
PayWeave