Replicate Predictions Downloader (Python)
Download and organize all your Replicate predictions, including images, videos, 3D models, and metadata.
Why
Replicate doesn't keep your prediction data forever. Per their data retention policy, predictions created via the API have their inputs, outputs, files, and logs automatically removed after one hour by default. Predictions made on the website are kept indefinitely, but output files still need downloading if you want local copies. This tool grabs everything while it's still there.
Features
- Batch download all your Replicate prediction outputs
- Organize by model into clean directory structures
- Smart filenames with dates, model names, and prompt snippets
- ZIP archives for each model for easy backup
- Date filtering - download predictions from specific time ranges
- Incremental downloads - only fetch new predictions since last run
- Full metadata export as JSON
Installation
pip install replicate-predictions-downloader
Or with pipx for isolated CLI usage:
pipx install replicate-predictions-downloader
Setup
-
Get your API token from replicate.com/account/api-tokens
-
Set your token:
export REPLICATE_API_TOKEN=your_token_here
Or create a
.envfile:REPLICATE_API_TOKEN=your_token_here
Usage
Download all predictions
replicate-downloader
Download predictions from a specific date
replicate-downloader --since "2024-01-15"
replicate-downloader --since "7 days ago"
replicate-downloader --since yesterday
Download predictions in a date range
replicate-downloader --since "2024-01-01" --until "2024-06-30"
Incremental download (since last run)
replicate-downloader --last-run
Output Structure
replicate_outputs_2024-01-15/
├── by-model/
│ ├── stable-diffusion/
│ │ ├── 2024-01-15_stable-diffusion_a-photo-of-an-astronaut_abc123.png
│ │ ├── 2024-01-15_stable-diffusion_sunset-over-mountains_def456.png
│ │ └── abc123_metadata.json
│ ├── stable-diffusion.zip
│ ├── flux-pro/
│ │ └── ...
│ └── flux-pro.zip
└── replicate_metadata_2024-01-15.json
Python API
You can also use the downloader programmatically:
from replicate_downloader import ReplicateDownloader
downloader = ReplicateDownloader(
api_token="your_token", # or use REPLICATE_API_TOKEN env var
since="7 days ago",
)
downloader.run()
Options
| Option | Description |
|---|---|
-s, --since DATE |
Download predictions created since this date |
-u, --until DATE |
Download predictions created until this date |
-l, --last-run |
Only download predictions since the last successful run |
--all |
Download all predictions (default) |
--version |
Show version |
--help |
Show help |
Date Formats
The --since and --until options support:
- ISO format:
2024-01-15 - Relative:
yesterday,7 days ago,2 weeks ago,1 month ago
Related
- replicate-predictions-downloader - Node.js version
- Replicate Python SDK
License
MIT
Metadata
Release files for replicate-predictions-downloader 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| replicate_predictions_downloader-1.1.0.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| replicate_predictions_downloader-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.8 kB
Release files / replicate_predictions_downloader-1.1.0.tar.gz
| Download URL | replicate_predictions_downloader-1.1.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f3759ec45b9a1ffb53ba97fcbec8775040d0b8410943dc11d184aa9ced67a30
|
|
BLAKE2b-256 checksum How to use checksums |
5ce16f815329af0e9ff16b509acfdccb4a7c0a107d2f6cfc53c71eefa31c954c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / replicate_predictions_downloader-1.1.0-py3-none-any.whl
| Download URL | replicate_predictions_downloader-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c7ceb24c6fe8bb1cc81b8a5487f4051e121dd2b7336633b3de306e20a4dac79
|
|
BLAKE2b-256 checksum How to use checksums |
eee70d3a6389bbb44d257546689fc64d77e6352f29b913ce3421ad8f7f49a2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|