Skip to content
rawroute
Docs / AI SDK & Presets

AI SDK & Presets

Official Vercel AI SDK provider and ready-to-use configs for Open WebUI, LibreChat, Dify, LiteLLM and more.

npm install https://rawroute.dev/downloads/rawroute-ai-sdk.tgz ai

Download AI SDK provider

Use the official @rawroute/ai-sdk provider (including generateRawrouteVideo and generateRawrouteSpeech helpers) for Vercel AI SDK, or drop rawroute into LangChain and LlamaIndex—replace only the base URL and API key.

import { createRawroute, generateRawrouteSpeech, generateRawrouteVideo, rawroute } from "@rawroute/ai-sdk"
import { streamText } from "ai"

// Reads RAWROUTE_API_KEY and RAWROUTE_BASE_URL from the environment
const result = streamText({
  model: rawroute("claude-sonnet-5-5"),
  prompt: "Explain exponential backoff with jitter.",
})
for await (const chunk of result.textStream) process.stdout.write(chunk)

// Explicit client configuration, video (/v1/videos) & speech (/v1/audio/speech)
const client = createRawroute({
  baseURL: "https://api.rawroute.dev/v1",
  apiKey: process.env.RAWROUTE_API_KEY,
})

const video = await generateRawrouteVideo({
  model: "veo-3.1",
  prompt: "Slow aerial glide over misty pine mountains at dawn",
  baseURL: "https://api.rawroute.dev",
})

const speech = await generateRawrouteSpeech({
  model: "eleven_v4_turbo",
  input: "Gateway routing verified.",
  baseURL: "https://api.rawroute.dev",
})

Open-Source Presets

Download all integration presets

Ready-to-use configurations for self-hosted workspaces, proxies and observability tools.

# .env / Docker environment
OPENAI_API_BASE_URL=https://api.rawroute.dev/v1
OPENAI_API_KEY=rr_live_your_key_here
DEFAULT_MODELS=claude-sonnet-5-5

# Admin > Connections > OpenAI API URL: https://api.rawroute.dev/v1
# Models: claude-sonnet-5-5, gpt-6.2-sol, gemini-4-neon, grok-4.7