详细内容
Replicate is joining Cloudflare
Run AI with an API.
Run and fine-tune models. Deploy custom models. All with one line of code.
NodePythonHTTP
import Replicate from
;
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN
})
const model =
"black-forest-labs/flux-2-pro"
const input = {
prompt:
"a poolside patio at sunset with vin
};
const [output] = await replicate.run(model, { input });
console.log(output);

A poolside patio at sunset with vintage lounge chairs.

A soft armchair shaped like a peeled banana.

A woman relaxing in a french bookstore.

A futuristic robot looking into the distance.

An abstract painting of a sunrise.
With Replicate you can
Generate imagesGenerate speechGenerate musicRestore imagesGenerate videos from imagesLarge Language Models (LLMs)Caption Images
\
\
\
\
google/imagen-4-fast\
\
Use this fast version of Imagen 4 when speed and cost are more important than quality\
\
2.3Mruns\
\
Official
\
\
\
\
bytedance/seedream-4\
\
Unified text-to-image generation and precise single-sentence editing at up to 4K resolution\
\
15Mruns\
\
Official
\
\
\
\
black-forest-labs/flux-1.1-pro\
\
Faster, better FLUX Pro. Text-to-image model with excellent image quality, prompt adherence, and output diversity.\
\
64.6Mruns\
\
Official
\
\
\
\
ideogram-ai/ideogram-v3-turbo\
\
Turbo is the fastest and cheapest Ideogram v3. v3 creates images with stunning realism, creative designs, and consistent styles\
\
4.8Mruns\
\
Official
\
\
\
\
qwen/qwen-image\
\
An image generation foundation model in the Qwen series that achieves significant advances in complex text rendering.\
\
1.1Mruns\
\
Official
\
\
\
\
black-forest-labs/flux-schnell\
\
The fastest image generation model tailored for local development and personal use\
\
557.8Mruns\
\
Official
\
\
\
\
google/nano-banana\
\
Google's latest image editing model in Gemini 2.5\
\
47.3Mruns\
\
Official
\
\
\
\
google/imagen-4\
\
Google's Imagen 4 flagship model\
\
6.1Mruns\
\
Official
\
\
\
\
google/imagen-4-fast\
\
Use this fast version of Imagen 4 when speed and cost are more important than quality\
\
2.3Mruns\
\
Official
\
\
\
\
bytedance/seedream-4\
\
Unified text-to-image generation and precise single-sentence editing at up to 4K resolution\
\
15Mruns\
\
Official
\
\
\
\
black-forest-labs/flux-1.1-pro\
\
Faster, better FLUX Pro. Text-to-image model with excellent image quality, prompt adherence, and output diversity.\
\
64.6Mruns\
\
Official
\
\
\
\
ideogram-ai/ideogram-v3-turbo\
\
Turbo is the fastest and cheapest Ideogram v3. v3 creates images with stunning realism, creative designs, and consistent styles\
\
4.8Mruns\
\
Official
\
\
\
\
qwen/qwen-image\
\
An image generation foundation model in the Qwen series that achieves significant advances in complex text rendering.\
\
1.1Mruns\
\
Official
\
\
\
\
black-forest-labs/flux-schnell\
\
The fastest image generation model tailored for local development and personal use\
\
557.8Mruns\
\
Official
\
\
\
\
google/nano-banana\
\
Google's latest image editing model in Gemini 2.5\
\
47.3Mruns\
\
Official
\
\
\
\
google/imagen-4\
\
Google's Imagen 4 flagship model\
\
6.1Mruns\
\
Official
fermatresearch
meta
laion-ai
vaibhavs10
prompthero
stability-ai
google-research
jbilcke
microsoft
tomasmcm
pollinations
pixray
tstramer
mcai
pagebrain
lucataco
zylim0702
fermatresearch
laion-ai
prompthero
google-research
microsoft
pollinations
tstramer
pagebrain
zylim0702
meta
vaibhavs10
stability-ai
jbilcke
tomasmcm
pixray
mcai
lucataco
Thousands of models contributed by our community
All the latest models are on Replicate. They’re not just demos — they all actually work and have production-ready APIs.
AI shouldn’t be locked up inside academic papers and demos. Make it real by pushing it to Replicate.
\
\
\
\
prunaai/z-image-turbo\
\
Z-Image Turbo is a super fast text-to-image model of 6B parameters developed by Tongyi-MAI.\
\
36.4Kruns
\
\
lightricks/ltx-2-retake\
\
Take any shot and edit specific sections. Rephrase, change the action, camera angles and more\
\
284runs\
\
Official
\
\
\
\
google/gemini-3-pro\
\
Google's most advanced reasoning Gemini model\
\
13.1Kruns\
\
Official
\
\
\
\
black-forest-labs/flux-2-pro\
\
High-quality image generation and editing with support for eight reference images\
\
101.3Kruns\
\
Official
\
\
\
\
openai/gpt-5.1\
\
The best model for coding and agentic tasks with configurable reasoning effort.\
\
53.8Kruns\
\
Official
\
\
\
\
google/nano-banana-pro\
\
Google's state of the art image generation and editing model 🍌🍌\
\
1.4Mruns\
\
Official
\
\
\
\
prunaai/z-image-turbo\
\
Z-Image Turbo is a super fast text-to-image model of 6B parameters developed by Tongyi-MAI.\
\
36.4Kruns
\
\
lightricks/ltx-2-retake\
\
Take any shot and edit specific sections. Rephrase, change the action, camera angles and more\
\
284runs\
\
Official
\
\
\
\
google/gemini-3-pro\
\
Google's most advanced reasoning Gemini model\
\
13.1Kruns\
\
Official
\
\
\
\
black-forest-labs/flux-2-pro\
\
High-quality image generation and editing with support for eight reference images\
\
101.3Kruns\
\
Official
\
\
\
\
openai/gpt-5.1\
\
The best model for coding and agentic tasks with configurable reasoning effort.\
\
53.8Kruns\
\
Official
\
\
\
\
google/nano-banana-pro\
\
Google's state of the art image generation and editing model 🍌🍌\
\
1.4Mruns\
\
Official
\
\
\
\
qwen/qwen-image-edit-plus-lora\
\
Qwen Image Edit 2509 LoRA explorer, uses HuggingFace URLs to load any safetensor\
\
54.4Kruns\
\
Official
\
\
minimax/hailuo-2.3\
\
A high-fidelity video generation model optimized for realistic human motion, cinematic VFX, expressive characters, and strong prompt and style adherence across both text-to-video and image-to-video workflows\
\
13.1Kruns\
\
Official
\
\
google/veo-3.1\
\
New and improved version of Veo 3, with higher-fidelity video, context-aware audio, reference image and last frame support\
\
119.2Kruns\
\
Official
\
\
\
\
openai/sora-2\
\
OpenAI's Flagship video generation with synced audio\
\
123.1Kruns\
\
Official
\
\
\
\
bytedance/seedream-4\
\
Unified text-to-image generation and precise single-sentence editing at up to 4K resolution\
\
15Mruns\
\
Official
\
\
\
\
philz1337x/crystal-upscaler\
\
High-precision image upscaler optimized for portraits, faces and products. One of the upscale modes powered by Clarity AI. X:https://x.com/philz1337x\
\
210.8Kruns\
\
Official
\
\
\
\
qwen/qwen-image-edit-plus-lora\
\
Qwen Image Edit 2509 LoRA explorer, uses HuggingFace URLs to load any safetensor\
\
54.4Kruns\
\
Official
\
\
minimax/hailuo-2.3\
\
A high-fidelity video generation model optimized for realistic human motion, cinematic VFX, expressive characters, and strong prompt and style adherence across both text-to-video and image-to-video workflows\
\
13.1Kruns\
\
Official
\
\
google/veo-3.1\
\
New and improved version of Veo 3, with higher-fidelity video, context-aware audio, reference image and last frame support\
\
119.2Kruns\
\
Official
\
\
\
\
openai/sora-2\
\
OpenAI's Flagship video generation with synced audio\
\
123.1Kruns\
\
Official
\
\
\
\
bytedance/seedream-4\
\
Unified text-to-image generation and precise single-sentence editing at up to 4K resolution\
\
15Mruns\
\
Official
\
\
\
\
philz1337x/crystal-upscaler\
\
High-precision image upscaler optimized for portraits, faces and products. One of the upscale modes powered by Clarity AI. X:https://x.com/philz1337x\
\
210.8Kruns\
\
Official
How it works
You can get started with any model with just one line of code. But as you do more complex things, you can fine-tune models or deploy your own custom code.
Run models
Our community has already published thousands of models that are ready to use in production. You can run these with one line of code.
import replicate
output = replicate.run(
"black-forest-labs/flux-dev",
input={
"aspect_ratio": "1:1",
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic",
}
)
print(output)
Fine-tune models with your own data
You can improve models with your own data to create new models that are better suited to specific tasks.
Image models like SDXL can generate images of a particular person, object, or style.
Train a model:
training = replicate.trainings.create(
destination="mattrothenberg/drone-art"
version="ostris/flux-dev-lora-trainer:e440909d3512c31646ee2e0c7d6f6f4923224863a6a10c494606e79fb5844497",
input={
"steps": 1000,
"input_images":
https://example.com/images.zip
,
"trigger_word": "TOK",
},
)
This will result in a new model:

mattrothenberg/drone-art
Fantastical images of drones on land and in the sky
0runs

mattrothenberg/drone-art
Fantastical images of drones on land and in the sky
0runs
Then, you can run it with one line of code:
output = replicate.run(
"mattrothenberg/drone-art:abcde1234...",
input={"prompt": "a photo of TOK forming a rainbow in the sky"}),
)
Deploy custom models
You aren’t limited to the models on Replicate: you can deploy your own custom models using Cog, our open-source tool for packaging machine learning models.
Cog takes care of generating an API server and deploying it on a big cluster in the cloud. We scale up and down to handle demand, and you only pay for the compute that you use.
First, define the environment your model runs in with cog.yaml:
build:
gpu: true
system_packages:
- "libgl1-mesa-glx"
- "libglib2.0-0"
python_version: "3.10"
python_packages:
- "torch==1.13.1"
predict: "predict.py:Predictor"
Next, define how predictions are run on your model with predict.py:
from cog import BasePredictor, Input, Path
import torch
class Predictor(BasePredictor):
def setup(self):
"""Load the model into memory to make running multiple predictions efficient"""
self.model = torch.load("./weights.pth")
# The arguments and types the model takes as input
def predict(self,
image: Path = Input(description="Grayscale input image")
) -> Path:
"""Run a single prediction on the model"""
processed_image = preprocess(image)
output = self.model(processed_image)
return postprocess(output)
Scale on Replicate
Thousands of businesses are building their AI products on Replicate. Your team can deploy an AI feature in a day and scale to millions of users, without having to be machine learning experts.
Learn more about our enterprise plans
%20--%3e%3csvg%20version=%271.1%27%20id=%27Layer_1%27%20xmlns=%27http://www.w3.org/2000/svg%27%20xmlns:xlink=%27http://www.w3.org/1999/xlink%27%20x=%270px%27%20y=%270px%27%20viewBox=%270%200%20315.74%2053.17%27%20style=%27enable-background:new%200%200%20315.74%2053.17;%27%20xml:space=%27preserve%27%3e%3cstyle%20type=%27text/css%27%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3cpath%20class=%27st0%27%20d=%27M31.8,27.33c2.45,0.19,4.58,1.23,6.4,3.11c1.81,1.89,2.72,4.48,2.72,7.78c0,4.05-1.34,7.28-4.03,9.69%20c-2.69,2.4-6.55,3.61-11.6,3.61H0.69V4.14h24.54c4.34,0,7.81,1.18,10.43,3.54c2.62,2.36,3.92,5.49,3.92,9.4%20c0,2.97-0.82,5.33-2.47,7.07c-1.65,1.74-3.42,2.71-5.3,2.9V27.33z%20M12.36,23.72h10.18c1.74,0,3.13-0.48,4.17-1.45%20c1.04-0.97,1.56-2.25,1.56-3.85c0-1.46-0.51-2.64-1.52-3.54c-1.01-0.9-2.27-1.34-3.78-1.34H12.36V23.72z%20M23.25,42.11%20c1.84,0,3.26-0.47,4.28-1.41c1.01-0.94,1.52-2.24,1.52-3.89c0-1.56-0.52-2.79-1.56-3.71c-1.04-0.92-2.38-1.38-4.03-1.38h-11.1%20v10.39H23.25z%27/%3e%3cpath%20class=%27st0%27%20d=%27M81.43,51.51H70.12v-3.39c-2.83,2.97-6.46,4.45-10.89,4.45c-4.15,0-7.48-1.36-10.01-4.07%20c-2.52-2.71-3.78-6.28-3.78-10.71V16.02h11.24v19.37c0,2.07,0.57,3.76,1.7,5.06c1.13,1.3,2.59,1.94,4.38,1.94%20c2.31,0,4.11-0.81,5.41-2.44c1.3-1.63,1.94-4.11,1.94-7.46V16.02h11.31V51.51z%27/%3e%3cpath%20class=%27st0%27%20d=%27M116.27,51.51H86.32v-2.13L100.4,25H86.67v-8.98h29.43v2.13l-14.08,24.38h14.25V51.51z%27/%3e%3cpath%20class=%27st0%27%20d=%27M151.11,51.51h-29.95v-2.13L135.24,25h-13.74v-8.98h29.43v2.13l-14.08,24.38h14.25V51.51z%27/%3e%3cpath%20class=%27st0%27%20d=%27M167.93,24.36h20.46v10.18h-20.46v16.97h-11.67V4.14h34.01v10.25h-22.34V24.36z%27/%3e%3cpath%20class=%27st0%27%20d=%27M271.28,36.66h-26.02c0.67,4.4,3.96,6.86,8.94,6.86c3.92,0,7.79-1.54,10.69-3.77l4.34,7.52%20c-3.97,3.41-9.12,5.3-15.03,5.3c-11.9,0-20.04-7.25-20.04-18.81c0-5.47,1.82-9.97,5.44-13.51c3.63-3.54,8.08-5.3,13.36-5.3%20c5.14,0,9.45,1.72,12.94,5.16c3.49,3.44,5.28,7.99,5.37,13.65V36.66z%20M248.37,25.63c-1.41,0.99-2.38,2.36-2.9,4.1h14.64%20c-0.52-1.84-1.41-3.23-2.69-4.17c-1.27-0.94-2.76-1.41-4.45-1.41C251.32,24.15,249.79,24.64,248.37,25.63z%27/%3e%3cpath%20class=%27st0%27%20d=%27M229.91,36.66h-26.02c0.67,4.4,3.96,6.86,8.94,6.86c3.92,0,7.79-1.54,10.69-3.77l4.34,7.52%20c-3.97,3.41-9.12,5.3-15.03,5.3c-11.9,0-20.04-7.25-20.04-18.81c0-5.47,1.82-9.97,5.44-13.51c3.63-3.54,8.08-5.3,13.36-5.3%20c5.14,0,9.45,1.72,12.94,5.16c3.49,3.44,5.28,7.99,5.37,13.65V36.66z%20M207,25.63c-1.41,0.99-2.38,2.36-2.9,4.1h14.64%20c-0.52-1.84-1.41-3.23-2.69-4.17c-1.27-0.94-2.76-1.41-4.45-1.41C209.94,24.15,208.41,24.64,207,25.63z%27/%3e%3cpath%20class=%27st0%27%20d=%27M315.05,51.51h-11.31v-2.83c-2.88,2.59-6.55,3.89-11.03,3.89c-4.81,0-8.9-1.76-12.27-5.27%20c-3.37-3.51-5.06-8.03-5.06-13.54c0-5.47,1.69-9.97,5.06-13.51c3.37-3.54,7.46-5.3,12.27-5.3c4.48,0,8.16,1.3,11.03,3.89V0.6h11.31%20V51.51z%20M301.16,40.38c1.72-1.72,2.58-3.92,2.58-6.61c0-2.64-0.86-4.83-2.58-6.58c-1.72-1.74-3.76-2.62-6.12-2.62%20c-2.5,0-4.55,0.86-6.15,2.58c-1.6,1.72-2.4,3.92-2.4,6.61c0,2.73,0.8,4.95,2.4,6.65c1.6,1.7,3.65,2.55,6.15,2.55%20C297.4,42.96,299.44,42.1,301.16,40.38z%27/%3e%3c/g%3e%3c/svg%3e)



Automatic scale
If you get a ton of traffic, Replicate scales up automatically to handle the demand. If you don't get any traffic, we scale down to zero and don't charge you a thing.
- CPU$0.000100/sec
- Nvidia T4 GPU$0.000225/sec
- Nvidia L40S GPU$0.000975/sec
- 2x Nvidia L40S GPU$0.001950/sec
- Nvidia A100 (80GB) GPU$0.001400/sec
- 8x Nvidia A100 (80GB) GPU$0.011200/sec
- Learn more about pricing
Pay for what you use
Replicate only bills you for how long your code is running. You don't pay for expensive GPUs when you're not using them.
Forget about infrastructure
Deploying machine learning models at scale is hard. If you've tried, you know. API servers, weird dependencies, enormous model weights, CUDA, GPUs, batching.
06:58 GMT07:15 GMT07:32 GMT07:49 GMT08:06 GMT08:23 GMT08:40 GMT08:58 GMT014274154
Prediction throughput(requests per second)
Logging & monitoring
Metrics let you keep an eye on how your models are performing, and logs let you zoom in on particular predictions to debug how your model is behaving.
Replicate logo
Imagine what you can build
Autonomous RobotsZero-shot autonomous robots with open source models Paint with AIAn iPad app that lets you paint with AI emojis.shAI Emojis Never Gonna Give You UpVideo fine tunes on Replicate Language Model CLILanguage model command line interface
Imagine
Autonomous RobotsZero-shot autonomous robots with open source models
what
you
Paint with AIAn iPad app that lets you paint with AI
can
Never Gonna Give You UpVideo fine tunes on Replicate
build.
Language Model CLILanguage model command line interface
With Replicate and tools like Next.js and Vercel, you can wake up with an idea and watch it hit the front page of Hacker News by the time you go to bed.
Replicate glyphDownload logo glyph as SVG
Download wordmark as SVG
Replicate glyphDownload logo glyph as SVG
Download wordmark as SVG

















