Replicate SDK review
Replicate SDK is the Python client for Replicate, letting you run, stream, and manage cloud-hosted machine learning models from Python code or notebooks.
TL;DR
Replicate SDK is a Python client for Replicate's cloud API for running open-source machine learning models. It suits Python developers who want to call hosted models from scripts, notebooks, or web apps. It supports sync, async, streaming, background predictions with webhooks, and file outputs as file-like objects.
- 918GitHub stars
- +0new stars, week of Oct 25
- ~1.2Mdownloads a week, +5% vs 4-week avg
- #21in Model SDKs and gateways this week
Replicate SDK at a glance
- Category
- Model SDKs and gateways
- Maintained by
- Replicate (organization, @replicate on GitHub)
- License
- Apache 2.0
- Language
- Python, Shell
- Repository
- github.com/replicate/replicate-python
- Website
- replicate.com
- npm package
- replicate 1.4.0
- PyPI package
- replicate 1.0.7
- Latest release
- replicate 1.4.0 on npm, Nov 17, 2025
- First published
- May 11, 2022
What Replicate SDK does
- Replicate SDK runs models on Replicate with replicate.run() and returns outputs, including files as FileOutput objects.
- Replicate SDK supports asyncio by prefixing method names with async_, so several predictions can run concurrently.
- Replicate SDK streams language model tokens through server-sent events using the stream method.
- Replicate SDK creates background predictions you can reload, wait on, cancel, or have report to a webhook when complete.
- Replicate SDK lists predictions, models, and featured collections, with pagination helpers like replicate.paginate.
- Replicate SDK creates models with a chosen name, visibility, and hardware SKU, and lists available hardware.
- Replicate SDK accepts file inputs as public URLs or local file handles.
How it works
You install the replicate package, set REPLICATE_API_TOKEN in your environment, and call Replicate's cloud API from Python. By default the client holds the connection open up to 60 seconds waiting for a prediction; wait=x adjusts this and wait=False disables sync mode. Inside cog models on cog 0.14.11 or later, the token can come from the prediction request context.
How to install and start using Replicate SDK
With pip
pip install replicateRequirements
- Python 3.8 or later
- A Replicate account and API token set as REPLICATE_API_TOKEN
First steps
- Install the package with pip install replicate.
- Get your API token from replicate.com/account.
- Set the token as an environment variable: export REPLICATE_API_TOKEN=<your token>.
- Call replicate.run() with a model identifier and input, then read the returned FileOutput objects.
Who Replicate SDK is for
- Python developers calling hosted image, speech, video, or language models through an API
- Data scientists running models from Jupyter notebooks
- Web developers streaming model file output through Django, FastAPI, or Flask responses
- Cog model authors who need to call Replicate from inside a model with per-request user scoping
Limitations to know
- Replicate SDK runs models on Replicate's cloud, and usage with your API key is charged to your account.
- Replicate SDK 1.0.0 introduced breaking changes: replicate.run() returns FileOutput objects instead of URL strings by default.
- Replicate SDK's FileOutput read() and aread() do not accept a size argument.
- Replicate SDK's replicate.use() interface is experimental and only in the 1.1.0b1 pre-release.
Is Replicate SDK growing? Usage data
In the week of Oct 25–31, 2026, Replicate SDK ranked #331 on the Devtoolwatch Board and #21 in Model SDKs and gateways, with a momentum score of 26 out of 100. Its main package had about 1.2M downloads that week, +5% against its own 4-week average.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 0 |
| Aug 16, 2026 | 0 |
| Aug 23, 2026 | 1 |
| Aug 30, 2026 | 1 |
| Sep 6, 2026 | 3 |
| Sep 13, 2026 | 3 |
| Sep 20, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Oct 4, 2026 | 1 |
| Oct 11, 2026 | 0 |
| Oct 18, 2026 | 1 |
| Oct 25, 2026 | 0 |
On Hacker News
- Run Stable Diffusion on Your M1 Mac’s GPU, 1007 points and 401 comments (Sep 1, 2022)
- Guide to running Llama 2 locally, 683 points and 170 comments (Jul 25, 2023)
- Stable Diffusion animation, 616 points and 96 comments (Aug 31, 2022)
- Snowflake Arctic Instruct (128x3B MoE), largest open source model, 315 points and 217 comments (Apr 24, 2024)
- Replicate is joining Cloudflare, 288 points and 68 comments (Nov 17, 2025)
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
Replicate SDK alternatives
Other LLM SDKs and gateways on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | thinking-orbsthinking-orbs is a React library of dotted, animated thought-orb loading indicators for AI and agent user interfaces. | 3.9k | 1.4M |
| #2 | HeadroomHeadroom compresses tool outputs, logs, files, and RAG chunks locally before they reach the LLM, as a library, proxy, or MCP server. | 78.5k | 125.8k |
| #3 | LiteLLMLiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface. | 62.5k | 23.1M |
| #4 | Honcho Memory library for building stateful agents | 7.9k | – |
| #5 | Anthropic SDKAnthropic SDK is the official Python library for calling the Claude API from Python applications. | 4k | 111M |
| #6 | Hugging Face HubHugging Face Hub is the official CLI and Python client for downloading, uploading and managing models, datasets and Spaces on the… | 4k | 68.3M |
Recent Replicate SDK releases
Replicate SDK FAQ
Is Replicate SDK free and open source?
Yes. Replicate SDK's source code is on GitHub (replicate/replicate-python) under the Apache 2.0 license, so you can use it for free. Its website also links to a pricing page (https://replicate.com/pricing) for any paid plans.
How do I install Replicate SDK?
Run pip install replicate. It needs Node.js >=18.0.0. The install section above has the other options from the project's README.
Is Replicate SDK still maintained?
Activity has slowed: the replicate/replicate-python repository was last updated on Aug 26, 2025, and the latest release, replicate 1.4.0 on npm, came out on Nov 17, 2025.
How popular is Replicate SDK?
Replicate SDK has 918 GitHub stars as of Nov 1, 2026. It gained 0 new stars in the week of Oct 25–31, 2026, against a 12-week average of 1 a week. Its main package had about 1.2M downloads that week, +5% against its own 4-week average. That made it #21 among LLM SDKs and gateways on the Devtoolwatch Board.
What are the best alternatives to Replicate SDK?
Other LLM SDKs and gateways on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: thinking-orbs (#1), Headroom (#2), LiteLLM (#3), Honcho (#4), Anthropic SDK (#5). The alternatives table above has their numbers.
How do I authenticate the Replicate SDK?
Replicate SDK reads your API token from the REPLICATE_API_TOKEN environment variable. Get the token from replicate.com/account. The README advises against putting the token in source code, since anyone using your key would have their usage charged to your account.
How do I get URL strings instead of FileOutput objects?
Replicate SDK returns FileOutput by default since 1.0.0. Pass use_file_output=False to replicate.run() to get the previous behavior, or read output.url. The README recommends using FileOutput objects directly.
Does the Replicate SDK support streaming output?
Replicate SDK supports server-sent event streams for language models. Use replicate.stream() to consume tokens as they are produced, or create a prediction with stream=True and iterate prediction.stream() if you need the prediction ID separately.
How long does replicate.run() wait for a result?
Replicate SDK holds the connection open up to 60 seconds by default. Pass wait=x with x between 1 and 60 seconds to change it, or wait=False to disable sync mode.
What happens when a prediction fails?
Replicate SDK's replicate.run() raises ModelError when a prediction fails. The exception's prediction property gives details such as the prediction ID and logs.
Can I get notified when a prediction finishes?
Replicate SDK can send a webhook when a prediction completes. Pass webhook and webhook_events_filter to replicate.predictions.create() instead of waiting for the result.
Sources
- replicate/replicate-python on GitHub
- Replicate SDK README
- replicate on npm
- replicate on PyPI
- Replicate SDK website
- Release 1.1.0b1 (Jun 9, 2025)
- Release 1.0.7 (May 27, 2025)
- Release 1.0.6 (May 27, 2025)
- Hacker News: Run Stable Diffusion on Your M1 Mac’s GPU
- Hacker News: Guide to running Llama 2 locally
- Hacker News: Stable Diffusion animation
- Devtoolwatch Board, the week of Oct 25–31, 2026
Replicate SDK README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/replicate-sdk/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].