Skip to main content

Vercel AI SDK Integration

Perfect for Next.js apps. Add caching, security, and logging to your AI features with minimal code changes.

Install

Setup Provider

API Route (Streaming)

React Component

Non-Streaming

Structured Output

Using Anthropic

Environment Variables

Add to .env.local:

Full Example

All Vercel AI SDK features work: streaming, structured output, tools, and multi-provider support. Every request goes through Raptor for caching, security, and logging.