Vercel AI SDK
Use Chutes with the Vercel AI SDK.
The Vercel AI SDK can call Chutes through an OpenAI-compatible provider configured with baseURL, apiKey, and a live model ID.
Status
OpenAI-compatible client
Base URL
https://llm.chutes.ai/v1
Live model example
Qwen/Qwen3-32B-TEE
Catalog checked
Jun 25, 2026; context 40K
Full setup walkthrough
Everything you need is on this page — no need to leave for the toolkit. Each step is copy-paste runnable and uses a live model id from the catalog.
- 01
Install the Chutes provider
bashnpm install @chutes-ai/ai-sdk-provider ai - 02
Create the provider and generate
createChutestypescriptimport { createChutes } from '@chutes-ai/ai-sdk-provider'; import { generateText } from 'ai'; const chutes = createChutes({ apiKey: process.env.CHUTES_API_KEY }); const { text } = await generateText({ model: chutes(process.env.CHUTES_MODEL ?? 'Qwen/Qwen3-32B-TEE'), prompt: 'Say hello in one sentence.', }); console.log(text); - 03
Provide the API key
In a Next.js app, putCHUTES_API_KEY=cpk_...in.env.localand read it server-side only.bashexport CHUTES_API_KEY=cpk_...
The framework contract
Set
base_url / baseURL / api_base
Value
https://llm.chutes.ai/v1
Set
model
Value
Qwen/Qwen3-32B-TEE from the live catalog
Troubleshooting
Symptom
The model ID fails
Likely cause
The catalog changed or the client cached model metadata.
Fix
Refresh /v1/models and update the config.
Symptom
Auth falls into anonymous limits
Likely cause
The key is missing or not sent as Bearer auth.
Fix
Export CHUTES_API_KEY=cpk_... and send Authorization: Bearer.
Symptom
Routing aliases fail
Likely cause
Saved default aliases need a dashboard Model Routing pool.
Fix
Use a concrete model ID or an inline comma-separated pool first.