Devtoolwatch BoardGet it every Monday

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.

Updated Nov 1, 2026. Review written Oct 22, 2026 from the project's own sources; usage data refreshed every Monday.

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.

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 replicate

Requirements

  • Python 3.8 or later
  • A Replicate account and API token set as REPLICATE_API_TOKEN

First steps

  1. Install the package with pip install replicate.
  2. Get your API token from replicate.com/account.
  3. Set the token as an environment variable: export REPLICATE_API_TOKEN=<your token>.
  4. 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.

New GitHub stars per week for Replicate SDK12 weeks from Aug 9, 2026: 0, 0, 1, 1, 3, 3, 0, 0, 1, 0, 1, 0 new stars, an average of 1 a week.Aug 9week of Oct 25
New GitHub stars per week for the last 12 weeks, from GitHub's stargazer history (today's stargazers by the week they starred).
Show the weekly numbers
New GitHub stars per week for Replicate SDK
Week ofNew stars
Aug 9, 20260
Aug 16, 20260
Aug 23, 20261
Aug 30, 20261
Sep 6, 20263
Sep 13, 20263
Sep 20, 20260
Sep 27, 20260
Oct 4, 20261
Oct 11, 20260
Oct 18, 20261
Oct 25, 20260

On Hacker News

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:

Model SDKs and gateways ranked by momentum, the week of Oct 25–31, 2026
RankToolStarsDownloads/wk
#1thinking-orbsthinking-orbs is a React library of dotted, animated thought-orb loading indicators for AI and agent user interfaces.3.9k1.4M
#2HeadroomHeadroom compresses tool outputs, logs, files, and RAG chunks locally before they reach the LLM, as a library, proxy, or MCP server.78.5k125.8k
#3LiteLLMLiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface.62.5k23.1M
#4Honcho Memory library for building stateful agents7.9k–
#5Anthropic SDKAnthropic SDK is the official Python library for calling the Claude API from Python applications.4k111M
#6Hugging Face HubHugging Face Hub is the official CLI and Python client for downloading, uploading and managing models, datasets and Spaces on the…4k68.3M

All LLM SDKs and gateways, ranked

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

  1. replicate/replicate-python on GitHub
  2. Replicate SDK README
  3. replicate on npm
  4. replicate on PyPI
  5. Replicate SDK website
  6. Release 1.1.0b1 (Jun 9, 2025)
  7. Release 1.0.7 (May 27, 2025)
  8. Release 1.0.6 (May 27, 2025)
  9. Hacker News: Run Stable Diffusion on Your M1 Mac’s GPU
  10. Hacker News: Guide to running Llama 2 locally
  11. Hacker News: Stable Diffusion animation
  12. 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:

Devtoolwatch badge for Replicate SDK

[![Devtoolwatch](https://index.devtoolwatch.com/badge/replicate-sdk.svg)](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].