https://replicate.com
Replicate — Run AI with an API
Run open-source machine learning models with a cloud API
Replicate — Run AI with an API Menu Explore Playground Beta Pricing Docs Blog Changelog Sign in Get started Run AI with an API. Run and fine-tune open-source models. Deploy custom models at scale. All with one line of code. With Replicate you canGenerate imagesGenerate textCaption imagesGenerate musicGenerate speechFine tune modelsRestore imagesstability-ai/stable-diffusion-3A text-to-image model with greatly improved performance in image quality, typography, complex prompt understanding, and resource-efficiency1M runsView on Replicate stability-ai/stable-diffusion-3A text-to-image model with greatly improved performance in image quality, typography, complex prompt understanding, and resource-efficiency1M runsView on Replicate bytedance/sdxl-lightning-4stepSDXL-Lightning by ByteDance: a fast text-to-image model that makes high-quality images in 4 steps535M runsView on Replicate bytedance/sdxl-lightning-4stepSDXL-Lightning by ByteDance: a fast text-to-image model that makes high-quality images in 4 steps535M runsView on Replicate playgroundai/playground-v2.5-1024px-aestheticPlayground v2.5 is the state-of-the-art open-source model in aesthetic quality2M runsView on Replicate playgroundai/playground-v2.5-1024px-aestheticPlayground v2.5 is the state-of-the-art open-source model in aesthetic quality2M runsView on Replicate google-deepmind/gemma-2b-it2B instruct version of Google’s Gemma model91K runsView on Replicate google-deepmind/gemma-2b-it2B instruct version of Google’s Gemma model91K runsView on Replicate yorickvp/llava-13bVisual instruction tuning towards large language and vision models with GPT-4 level capabilities18M runsView on Replicate yorickvp/llava-13bVisual instruction tuning towards large language and vision models with GPT-4 level capabilities18M runsView on Replicate pharmapsychotic/clip-interrogatorThe CLIP Interrogator is a prompt engineering tool that combines OpenAI's CLIP and Salesforce's BLIP to optimize text prompts to match a given image. Use the resulting prompts with text-to-image models like Stable Diffusion to create cool art!3M runsView on Replicate pharmapsychotic/clip-interrogatorThe CLIP Interrogator is a prompt engineering tool that combines OpenAI's CLIP and Salesforce's BLIP to optimize text prompts to match a given image. Use the resulting prompts with text-to-image models like Stable Diffusion to create cool art!3M runsView on Replicate andreasjansson/blip-2Answers questions about images26M runsView on Replicate andreasjansson/blip-2Answers questions about images26M runsView on Replicate meta/musicgenGenerate music from a prompt or melody2M runsView on Replicate meta/musicgenGenerate music from a prompt or melody2M runsView on Replicate riffusion/riffusionStable diffusion for real-time music generation963K runsView on Replicate riffusion/riffusionStable diffusion for real-time music generation963K runsView on Replicate nateraw/musicgen-songstarter-v0.2A large, stereo MusicGen that acts as a useful tool for music producers3K runsView on Replicate nateraw/musicgen-songstarter-v0.2A large, stereo MusicGen that acts as a useful tool for music producers3K runsView on Replicate adirik/styletts2Generates speech from text124K runsView on Replicate adirik/styletts2Generates speech from text124K runsView on Replicate lucataco/xtts-v2Coqui XTTS-v2: Multilingual Text To Speech Voice Cloning385K runsView on Replicate lucataco/xtts-v2Coqui XTTS-v2: Multilingual Text To Speech Voice Cloning385K runsView on Replicate suno-ai/bark🔊 Text-Prompted Generative Audio Model288K runsView on Replicate suno-ai/bark🔊 Text-Prompted Generative Audio Model288K runsView on Replicate fofr/sdxl-emojiAn SDXL fine-tune based on Apple Emojis6M runsView on Replicate fofr/sdxl-emojiAn SDXL fine-tune based on Apple Emojis6M runsView on Replicate mejiabrayan/logoai2M runsView on Replicate mejiabrayan/logoai2M runsView on Replicate swartype/sdxl-pixarCreate Pixar poster easily with SDXL Pixar.592K runsView on Replicate swartype/sdxl-pixarCreate Pixar poster easily with SDXL Pixar.592K runsView on Replicate tencentarc/gfpganPractical face restoration algorithm for *old photos* or *AI-generated faces*82M runsView on Replicate tencentarc/gfpganPractical face restoration algorithm for *old photos* or *AI-generated faces*82M runsView on Replicate nightmareai/real-esrganReal-ESRGAN with optional face correction and adjustable upscale55M runsView on Replicate nightmareai/real-esrganReal-ESRGAN with optional face correction and adjustable upscale55M runsView on Replicate mv-lab/swin2sr3 Million Runs! AI Photorealistic Image Super-Resolution and Restoration4M runsView on Replicate mv-lab/swin2sr3 Million Runs! AI Photorealistic Image Super-Resolution and Restoration4M runsView on Replicate Run modelPythonJavaScriptcURLimport replicate output = replicate.run( "stability-ai/stable-diffusion-3", input={ "prompt": "a photo of vibrant artistic graffiti on a wall saying \"SD3 medium\"" } ) print(output)import Replicate from "replicate"; const replicate = new Replicate(); const output = await replicate.run( "stability-ai/stable-diffusion-3", { input: { prompt: "a photo of vibrant artistic graffiti on a wall saying \"SD3 medium\"" } } ); console.log(output);curl -s -X POST \ -H "Authorization: Token $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -d $'{ "input": { "prompt": "a photo of vibrant artistic graffiti on a wall saying \\"SD3 medium\\"" } }' \ https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictionsRun stability-ai/stable-diffusion-3 with an API Thousands of models contributed by our community All the latest open-source 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. Explore models Push a model How it works You can get started with any open-source model with just one line of code. But as you do more complex things, you fine-tune models or deploy your own custom code. Run open-source 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. Explore models import replicate output = replicate.run( "black-forest-labs/flux-schnell:f2ab8a5bfe79f02f0789a146cf5e73d2a4ff2684a98c2b303d1e1ff3814271db", input={ "prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "output_quality": 90 } ) print(output) Fine-tune models with your own data You can improve open-source models with your own data to create new models that are better suited to specific tasks. Image models like Flux can generate images of a particular person, object, or style. Fine-tune image models Train a model: import replicate training = replicate.trainings.create( version="ostris/flux-dev-lora-trainer:1296f0ab2d695af5a1b5eeee6e8ec043145bef33f1675ce1a2cdb0f81ec43f02", input={ "input_images": "https://my-domain/my-input-images.zip", }, destination="electricdreams/flux-fine-tuned" ) print(training) This will result in a new model: electricdreams/flux-fine-tunedA very special, fine-tuned version of Flux0 runs electricdreams/flux-fine-tunedA very special, fine-tuned version of Flux0 runs Then, you can run it with one line of code: output = replicate.run( "electricdreams/flux-fine-tuned:abcde1234...", input={"prompt": "a photo of TOK riding a rainbow unicorn"}, ) 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. Learn more 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. 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 A40 GPU $0.000575/sec Nvidia A40 (Large) GPU $0.000725/sec Nvidia A100 (40GB) GPU $0.001150/sec Nvidia A100 (80GB) GPU $0.001400/sec 8x Nvidia A40 (Large) GPU $0.005800/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. 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. Logo Imagine what you can build Autonomous Robots Zero-shot autonomous robots with open source models Paint with AI An iPad app that lets you paint with AI emojis.sh AI Emojis Replicover Find the hottest AI models on Replicate Language Model CLI Language model command line interface Imagine Autonomous Robots Zero-shot autonomous robots with open source models what you Paint with AI An iPad app that lets you paint with AI can emojis.sh AI Emojis Replicover Find the hottest AI models on Replicate build. Language Model CLI Language 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. Get started Logo Product Explore Playground Beta Pricing Docs Guides Blog Changelog Community Discord X GitHub Company About Join us Privacy Terms
en
en
https://replicate.com
Edite sit ou a?
kisa wap fe?