Files
Upload & Pricing
Upload files to a collection via the dashboard or API. Each file gets its own download price and is stored on Cloudflare R2 for fast, global delivery.
Uploading via Dashboard
Navigate to a collection's Files tab and click Upload File. You will configure:
| Field | Required | Description |
|---|---|---|
| File | Yes | The file to upload (max 100 MB) |
| Name | Yes | Display name shown in discovery and dashboard |
| Price (USD) | Yes | Per-download price charged via MPP |
| Description | No | Brief description of the file contents |
The file name is auto-filled from the uploaded file. The original filename is used in the download URL:
/fl/<collection-id>/<filename>.Uploading via API
Use multipart form data to upload files programmatically:
Terminal
curl -X POST https://api.payweave.dev/api/v1/files/:collectionId/files \
-H "Authorization: Bearer <token>" \
-H "X-Workspace-Id: <workspace-id>" \
-F "[email protected]" \
-F "name=Training Dataset" \
-F "priceUsd=0.50" \
-F "description=10k rows of labeled sentiment data"Pricing
Each file has an independent price in USD. When an agent or user downloads the file, they pay exactly that amount via MPP. The payment is split between your wallet and the PayWeave platform fee.
| Plan | Platform Fee |
|---|---|
| Free | 3% per download |
| Pro ($9/month) | 1% per download |
Supported file types
Any file type is supported — PayWeave stores the original file with its MIME type and serves it with the correct Content-Type header. Common examples:
| Type | Extensions |
|---|---|
| Datasets | .csv, .json, .parquet, .jsonl |
| Models | .onnx, .pt, .safetensors, .bin |
| Documents | .pdf, .docx, .txt, .md |
| Archives | .zip, .tar.gz, .7z |
| Media | .png, .jpg, .mp4, .mp3 |
| Software | .wasm, .so, .dll |
Managing files
Terminal
# List files in collection
GET /api/v1/files/:collectionId/files
# Upload file
POST /api/v1/files/:collectionId/files (multipart form data)
# Update file metadata
PATCH /api/v1/files/:collectionId/files/:fileId
{ "name": "Updated Name", "priceUsd": "1.00" }
# Archive file
DELETE /api/v1/files/:collectionId/files/:fileIdDownload flow (agent perspective)
Terminal
# 1. Request file → get 402 challenge
curl https://api.payweave.dev/fl/<collection-id>/<filename>
# → 402 Payment Required + WWW-Authenticate header
# 2. Pay and retry with credential
curl https://api.payweave.dev/fl/<collection-id>/<filename> \
-H "Authorization: Payment <credential>"
# → 200 OK + file bytes + Payment-Receipt header
# Or use the mppx CLI:
npx mppx https://api.payweave.dev/fl/<collection-id>/<filename>
PayWeave