Setup
Provider Configuration
Create a Venice provider using the OpenAI-compatible adapter:Using
.chat() ensures requests go to Venice’s /chat/completions endpoint. The default openai('model') syntax may use newer OpenAI endpoints that Venice doesn’t support yet.Streaming Chat (Next.js App Router)
API Route
React Component
Generating Text (Non-Streaming)
Structured Output
Tool Calling
Image Generation
Venice image generation can be called directly alongside the AI SDK:Multi-Model Chat (Model Selector)
Let users choose between Venice models:Web Search Integration
Pass Venice parameters for web search:If
experimental_providerMetadata doesn’t pass through, you can use a custom fetch wrapper or call the Venice API directly for web search features.Embeddings
For embeddings, usetextEmbeddingModel() on the provider directly:
Environment Variables
Recommended Models
Vercel AI SDK Docs
Official Vercel AI SDK documentation
Venice Models
Browse all Venice models