const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN})const model = const input = { prompt: };const [output] = await replicate.run(model, { input });console.log(output);
A poolside patio at sunset with vintage lounge chairs.
black-forest-labs/flux-2-pro
A soft armchair shaped like a peeled banana.
google/nano-banana-pro
A woman relaxing in a french bookstore.
bytedance/seedream-4
A futuristic robot looking into the distance.
black-forest-labs/flux-pro
An abstract painting of a sunrise.
black-forest-labs/flux-proWith Replicate you can


openai / gpt-image-2
OpenAI's image generation and editing model. Create and edit images from text with close instruction following, sharp text rendering, and detailed edits.
34.4M runs


bytedance / seedream-5-lite
Seedream 5.0 lite is ByteDance's image model with built-in reasoning, example-based editing, and deep domain knowledge.
3.6M runs

black-forest-labs / flux-2-max
The highest fidelity image model from Black Forest Labs
4.3M runs

google / nano-banana-2
Google's fast image generation model with conversational editing, multi-image fusion, and character consistency
22M runs


recraft-ai / recraft-v4-styles-pro-svg
Recraft V4 Styles Pro SVG generates high-quality editable vector images that match a reusable style or attached reference images.
633 runs

google / imagen-4-ultra
Use this ultra version of Imagen 4 when quality matters more than speed and cost
1.8M runs

black-forest-labs / flux-2-flex
Max-quality image generation and editing with support for ten reference images
500.8K runs


openai / gpt-image-1.5
OpenAI's latest image generation model with better instruction following and adherence to prompts
16.2M runs
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.

minimax / h3-lite
Generate videos with MiniMax H3 Lite, the lower-cost version of MiniMax H3. Supports text-to-video, first- and last-frame image-to-video, and reference-based video generation at 480P or 768P.
2.2K runs

minimax / h3-highspeed
Generate videos with MiniMax H3 Highspeed, a faster version of MiniMax H3 that balances quality and speed. Supports text-to-video, first- and last-frame image-to-video, and reference-based video generation at 768P.
666 runs

google / nano-banana-2.1
Google's fast image generation and editing model, with sharp text rendering, multi-image editing, and up to 4K output.
982.3K runs

prunaai / p-video-2-pro-reference
Pruna's reference-to-video model, built on MiniMax H3. Generate 5 to 15 second video from a prompt plus up to 9 images, 3 videos, and 3 audio clips, with speed and cost modes.
137.2K runs
alibaba / wan-3
Wan 3.0 generates video from a text prompt or a starting image, with cinematic motion and support for 480p, 720p, and 1080p output up to 30 seconds.
68.1K runs


bytedance / seedance-2.5
ByteDance's flagship video model, with native audio, 30-second clips, and large sets of image, video, and audio references.
346.9K runs

krea / krea-2-medium
Krea's foundation image model, tuned for expressive illustration, anime, and painterly styles, with consistent results across artistic directions.
42.9K runs

inworld / realtime-tts-2
Inworld's most expressive text-to-speech model, with natural-language steering, real-time latency, and support for more than 100 languages.
115K runs


openai / gpt-image-2
OpenAI's image generation and editing model. Create and edit images from text with close instruction following, sharp text rendering, and detailed edits.
34.4M runs

anthropic / claude-opus-4.7
Anthropic's most capable model, with large gains in agentic coding, better vision, and stronger multi-step reasoning.
566.3K runs


bytedance / seedream-5-lite
Seedream 5.0 lite is ByteDance's image model with built-in reasoning, example-based editing, and deep domain knowledge.
3.6M runs
xai / grok-imagine-video
xAI's video model. Generate short videos with synchronized sound from text, animate an image, or edit a video.
2.1M runs
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.
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 replicateoutput = 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)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": , "trigger_word": "TOK", },)This will result in a new model:

Fantastical images of drones on land and in the sky
0 runs

mattrothenberg / drone-art
Fantastical images of drones on land and in the sky
0 runs
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"}),)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, Pathimport torchclass 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)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 plansIf 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.
Replicate only bills you for how long your code is running. You don't pay for expensive GPUs when you're not using them.
Deploying machine learning models at scale is hard. If you've tried, you know. API servers, weird dependencies, enormous model weights, CUDA, GPUs, batching.
Prediction throughput (requests per second)
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.
Building with Replicate and Cloudflare, you can wake up with an idea and watch it hit the front page of Hacker News by the time you go to bed.