WebInfer

🟧

Amazon Bedrock

AWS Bedrock models (Claude, Llama, Titan)

Flagship
Major Cloud Provider
API

Configure Amazon Bedrock

Enable Amazon Bedrock in Settings

Go to Settings
Capabilities
chat
embeddings
enterprise
Configuration Schema
Required and optional fields for configuring this provider
FieldTypeRequired
region
text
Optional
CLI Usage
For users running the daemon server locally or a self-hosted gateway

Add provider:

npx webinfer provider add amazon-bedrock

Test connection:

npx webinfer provider test amazon-bedrock
Programmatic Usage
Use Amazon Bedrock 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 Amazon Bedrock explicitly:

import { generateText } from "webinfer"

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

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: "amazon-bedrock"
})

for await (const chunk of textStream) {
  process.stdout.write(chunk)
}