The Cerebras provider for the AI SDK contains language model support for Cerebras, offering high-speed AI model inference powered by Cerebras Wafer-Scale Engines and CS-3 systems.
The Cerebras provider for the AI SDK contains language model support for Cerebras, offering high-speed AI model inference powered by Cerebras Wafer-Scale Engines and CS-3 systems.
Deploying to Vercel? With Vercel's AI Gateway you can access Cerebras (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. Get started with AI Gateway.
Setup
npm i ai @ai-sdk/cerebras
Skill for Coding Agents
If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:
npx skills add vercel/ai
Usage
import { cerebras } from '@ai-sdk/cerebras';
import { generateText } from 'ai';
const { text } = await generateText({
model: cerebras('gpt-oss-120b'),
prompt: 'Write a JavaScript function that sorts a list:',
});
The Cerebras provider for the AI SDK contains language model support for Cerebras, offering high-speed AI model inference powered by Cerebras Wafer-Scale Engines and CS-3 systems.