Seedance 2.5 from ByteDance is officially available on Apiframe.

Replicate API Guide: Pricing, Models & Code (2026)

Replicate API explained: models, real pricing, auth, and working code for developers in 2026.

Apiframe Team Published August 10, 2026 August 10, 2026 · 10 min read Beginner
Replicate API Guide: Pricing, Models & Code (2026)

If you've ever wanted to run a machine learning model without setting up your own GPU hardware, you've probably run into Replicate. It's one of the most widely used platforms for running open source and proprietary models through a simple HTTP API. It comes up constantly in conversations about image generation, video generation, and self-hosted language models. This guide covers what the Replicate API actually is, how sign-in and pricing work, and how to make your first call.

What Is the Replicate API

Replicate is a platform for running machine learning models through a hosted API instead of managing your own GPU infrastructure. You send a request with some input, like a prompt or an image, whatever the model expects. Replicate runs it on hardware it manages, and you get the output back.

Replicate isn't a single model or even a single company's models. It hosts thousands of models contributed by the open source community, plus a set of "official models" it maintains directly. These span image generation, video generation, audio, and large language models. That's different from something like the OpenAI API or the Anthropic API, where you're calling one company's models. On Replicate, you're choosing from a huge and constantly growing catalog, and each model comes from a different creator with its own quirks.

In November 2025, Cloudflare announced it was acquiring Replicate. The deal closed in early 2026, and Replicate continues to operate under its own brand with the same API and pricing, now as part of Cloudflare's broader AI infrastructure push. It's worth knowing about if you're evaluating long-term platform risk, but it hasn't changed how the API works day to day.

How the Replicate API Works

Models and versions

Every model on Replicate has an owner and a name, like black-forest-labs/flux-schnell or meta/meta-llama-3.1-405b-instruct. Community-published models also have specific version IDs (long strings of characters) that pin you to an exact snapshot of that model. This matters because model authors can push updates that change behavior or outputs. Official models, by contrast, have stable APIs that don't require pinning a version ID. You just reference the model name directly.

The predictions API

Every run on Replicate is called a "prediction." There are three ways to create one depending on what you're running: community models use the predictions.create endpoint, official models use models.predictions.create, and deployments (your own dedicated instance of a model) use deployments.predictions.create.

You also choose between two modes:

Sync mode holds the HTTP request open and returns the output directly once the model finishes, up to a configurable timeout (60 seconds by default). Enable it by setting a Prefer: wait header.

Async mode (the default) returns immediately with a prediction ID and a status of starting. You then either poll the prediction URL until it's done, or supply a webhook URL that Replicate calls when the run completes.

For anything that might take more than a few seconds, like image or video generation, async mode with polling or webhooks is the more reliable pattern. Sync mode works best for fast, lightweight models.

Getting a Replicate API Key

Replicate creates a default API token for you when you sign up. You can create additional tokens (for separate environments or projects) from your account's API tokens page. Tokens are 40-character strings that always start with the prefix r8_.

To authenticate a request, pass the token in the Authorization header as a Bearer token:

bash
Authorization: Bearer r8_your_token_here

A few practical notes: store the token as an environment variable rather than typing it directly into your code, use different tokens for development and production, and know that Replicate actively scans public GitHub repositories for leaked tokens and will automatically disable any it finds exposed.

Replicate API Pricing

Replicate is pay-as-you-go, with no subscription and no minimum spend. How you're billed depends on the type of model and how it's hosted.

Public models (the shared catalog) bill you only for the time your prediction is actively processing. Setup time and idle time are free. You're sharing hardware capacity with other users, so you can occasionally hit a cold start, where a model is loaded into memory for the first time, or scaling limits depending on demand from other customers.

Private models and deployments run on hardware dedicated to you, so you pay for all the time an instance is online, including setup and idle time, not just active processing. The exception is "fast booting fine-tunes," which only bill for active time even though they're technically private.

Pricing is metered per second of compute, and the rate depends on which hardware tier a model runs on:

HardwarePrice per secondPrice per hour
CPU (Small)$0.000025$0.09
CPU$0.000100$0.36
Nvidia T4$0.000225$0.81
Nvidia L40S$0.000975$3.51
Nvidia A100 (80GB)$0.001400$5.04
Nvidia H100$0.001525$5.49
Nvidia H200$0.001525$5.49

Some models don't bill by time at all. Flux models like black-forest-labs/flux-dev charge per output image ($0.025 each), flux-schnell charges $3.00 per thousand images, and flux-1.1-pro runs $0.04 per image. Language models on Replicate typically bill per token. For example, deepseek-ai/deepseek-r1 at $3.75 per million input tokens and $0.01 per thousand output tokens. You'll find the exact billing method on each model's page before you commit to using it.

Is there a free tier

Not in the sense of ongoing free credits. Replicate lets you run a curated set of models for free to try the platform, but you'll need to set up billing fairly quickly to go beyond that. There's no large free-credit grant for new accounts the way some AI APIs offer. Budget for real usage from day one rather than assuming a trial allowance will cover meaningful testing. If you're comparing options with more generous free tiers, see our roundup of what's actually free in AI image APIs and AI video APIs.

Code Example: Your First API Call

Here's a minimal example using Python and the requests library to run an official model, submit the job asynchronously, and poll until it reaches a completed or failed state:

python
import requests
import time

REPLICATE_API_TOKEN = "r8_your_token_here"
headers = {
    "Authorization": f"Bearer {REPLICATE_API_TOKEN}",
    "Content-Type": "application/json",
}

# Create a prediction (async mode is the default)
response = requests.post(
    "https://api.replicate.com/v1/models/black-forest-labs/flux-schnell/predictions",
    headers=headers,
    json={"input": {"prompt": "a cat wearing a hat"}},
)
prediction = response.json()

# Poll until the prediction reaches a terminal state
get_url = prediction["urls"]["get"]
while prediction["status"] not in ("succeeded", "failed"):
    time.sleep(1)
    prediction = requests.get(get_url, headers=headers).json()

print(prediction["output"])

If you'd rather avoid writing your own polling loop, Replicate also has official Python and JavaScript client libraries that wrap this pattern. You can also pass a webhook URL in the request body to have Replicate notify your server directly when a job completes.

Rate Limits and Reliability

Replicate limits prediction creation to 600 requests per minute. All other endpoints (fetching results, listing predictions, and so on) are capped at 3,000 requests per minute. You'll get a 429 response with a message like "Request was throttled. Your rate limit resets in ~30s" if you exceed it. Short bursts above the limit are tolerated before throttling kicks in.

One thing worth planning around: if your account is low on credit or hasn't set up a payment method after being granted trial credit, Replicate applies much stricter limits (as low as 1 request per second) to prevent runaway spend. Setting up auto-reload on your credit balance avoids this.

On the "is Replicate slow" question: for public models, yes, you can hit cold starts, where a model is loaded into memory for the first time, when it hasn't been used recently. You're also sharing a request queue with everyone else using that model. If consistent speed matters for your product, a deployment (your own dedicated instance with a configurable minimum scale) avoids the shared-queue problem, at the cost of paying for idle time too.

What Replicate Is Good At (and Where It Falls Short)

The biggest strength is breadth. If a new open source model drops on Hugging Face or gets published by a research lab, such as the latest release in the Stable Diffusion family, there's a good chance someone's already pushed a working version to Replicate within days, sometimes hours. That makes it a genuinely useful place to test niche or cutting-edge models without setting up your own infrastructure to run them.

The tradeoffs are real too. Because community models are published by many different people, quality and reliability vary a lot: some are well-maintained with clear input schemas, others are abandoned or break when the underlying weights change. Latency is inconsistent across models for the same reason, and error handling isn't standardized since each model's author defines their own input validation. If you need a small number of models with rock-solid uptime and predictable behavior, Replicate's official models are the safer bet within the platform. But you're then closer to a curated subset than the full catalog that draws people to Replicate in the first place.

For teams that want one integration covering image, video, and music generation with a single request and response format rather than model-by-model quirks, it's worth comparing that experience against a unified API like Apiframe, which we cover more below.

Replicate API Alternatives

If what you actually need is reliable access to a specific set of well-supported image, video, or music models rather than the entire open source catalog, a managed multi-model API can be a simpler fit than Replicate's marketplace-style setup. Apiframe is one option: it gives you one API key and one consistent request format across models like Flux, Seedream, Kling, Veo, and Suno. You're not maintaining separate integration logic for each provider the way you sometimes need to on Replicate. For video generation specifically, tools like Runway and Pika Labs are also worth comparing, and WaveSpeed AI is another hosting platform with a similar model to Replicate's. It's a different trade-off (fewer models, more consistency) rather than a drop-in replacement. Check the models directory to see whether it covers what you need before switching anything over.

FAQ

Does Replicate have a free tier?

Not an ongoing one. You can try a curated set of models for free, but you'll need to set up billing to use the platform beyond that. There's no large free-credit grant for new accounts.

How do I get a Replicate API key?

Sign up and Replicate creates a default token automatically. You can create and manage additional tokens from your account's API tokens page. Tokens start with r8_ and go in the Authorization: Bearer header.

Is the Replicate API slow?

It can be. Cold starts, where a model is loaded into memory for the first time, are common on public models that haven't been used recently. You also share a request queue with other customers using the same model. Deployments with dedicated hardware avoid the shared-queue issue.

What does the Replicate API actually cost?

It depends on the model. Most models bill per second of compute time, at a rate that depends on the GPU tier (T4, A100, H100, and so on). Some models bill per output image or per token instead. There's no subscription or minimum spend. You only pay for what you run.

Can I run any open source model on Replicate?

Not automatically. Someone needs to have published it to the platform first using Replicate's Cog packaging tool. Most popular open source releases show up quickly, but it's not guaranteed for every model on day one.

Apiframe Team

The team behind Apiframe - making AI generation accessible to everyone.

Power your next AI product with Apiframe.

Instant access to 70+ media models through a single API. Start free and scale when you're ready.