Skip to content

Replicate

Overview

Replicate — a cloud platform for launching ML models via a simple API.

What It Does

  • Launch thousands of pre-trained models;
  • Scale without your own infrastructure;
  • Pay for usage;
  • API for generating images, text, and more.

Use Cases

  • Quick access to models;
  • Image and text generation without GPU;
  • Prototypes and production.

Replicate vs OpenRouter

Replicate OpenRouter
Focus All types of ML models LLM
Suitable For Images, audio, text Language models

Getting Started

pip install replicate

Example of launching a text generation model:

import replicate

output = replicate.run(
    "meta/llama-2-70b-chat:latest",
    input={"prompt": "Tell me about RAG"},
)
print(output)

API key is obtained from your personal account. Billing is based on actual usage.

See Also