Replicate

Setup Replicate provider and learn how to use it in the starter kit.

The Replicate provider unlocks access to an extensive library of open-source AI models through a streamlined cloud API, seamlessly integrated with the AI SDK. It's particularly well-known for image generation capabilities.

Replicate

Setup

Generate API Key

Visit the Replicate website, create an account or sign in, then navigate to your account settings to generate your personal API token.

Add API Key to Environment

Add your API token to your project's .env file (e.g., in apps/web):

.env
REPLICATE_API_TOKEN=your-api-key

Configure Provider (Optional)

The starter kit automatically uses the REPLICATE_API_TOKEN environment variable. For advanced configurations (such as proxies or custom headers), you can create a tailored provider instance. For comprehensive details, refer to the AI SDK Replicate documentation.

Features

Use Cases

Image Generation

Create unique visuals, artwork, or variations based on text prompts using a diverse set of image models. Check out the Image Generation Demo.

Access Niche Models

Utilize specialized open-source models for specific tasks that might not be available through other major providers.

AI Experimentation

Quickly experiment with different community-published models for various AI tasks without managing infrastructure.

How is this guide?

Last updated on

On this page

Make AI your edge, not replacement.