WebInfer

🔁

Replicate

Community models and custom deployments

Budget
Specialized
API

Configure Replicate

Add your Replicate API key in Settings

Go to Settings
Capabilities
chat
image-generation
custom-models
Configuration Schema
Required and optional fields for configuring this provider
FieldTypeRequired
apiKey
password
Required
CLI Usage
For users running the daemon server locally or a self-hosted gateway

Add provider:

npx webinfer provider add replicate --key YOUR_API_KEY

Test connection:

npx webinfer provider test replicate

Get your API key from https://replicate.com/

Programmatic Usage
Use Replicate in your code with WebInfer

Basic usage:

import { generateText } from "webinfer"

// WebInfer automatically routes to the best available provider
const result = await generateText({
  prompt: "Write a haiku about programming"
})

console.log(result.text)

Specify Replicate explicitly:

import { generateText } from "webinfer"

const result = await generateText({
  prompt: "Write a haiku about programming",
  provider: "replicate"
})

console.log(result.text)
console.log("Provider:", result.provider)
console.log("Model:", result.model)

Streaming:

import { streamText } from "webinfer"

const { textStream } = await streamText({
  prompt: "Write a story about AI",
  provider: "replicate"
})

for await (const chunk of textStream) {
  process.stdout.write(chunk)
}
Image Models
Default: black-forest-labs/flux-schnell
black-forest-labs/flux-schnellFLUX.1 Schnell
512x512
1024x1024
black-forest-labs/flux-devFLUX.1 Dev
512x512
1024x1024
stability-ai/sdxlStable Diffusion XL
512x512
1024x1024