Setup
Provider Configuration
Create a Venice provider using the OpenAI-compatible adapter:Using
.chat() ensures requests go to Venice’s /chat/completions endpoint. In recent AI SDK versions, the default openai('model') syntax uses the Responses API instead, which Venice serves at /responses in beta with some limitations. See the Responses API guide before using it.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