翻篇收录说明
翻篇网页快照

AI SDK - Vercel

https://vercel.com/ai-sdk

最近抓取:2026-12-05 03:33:50(北京时间)

最近内容变化:2026-12-05 03:33:50(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Build AI applications and agents with the AI SDK, the TypeScript toolkit for model providers, streaming, tool calling, and structured outputs.

正文摘录

The AI layer for building frameworks and agents on VercelRead the docs$npm i aiA unified TypeScript SDK for building AI apps with modern streaming, multi-model, and provider-agnostic capabilitiesTextImageSpeechTranscriptionVideoimport { generateText } from 'ai'; const { text } = await generateText({ model: 'openai/gpt-6.2-astra', prompt: 'Explain the concept of quantum entanglement.',}); console.log(text);Use with AI GatewayGPT-6.2 AstraClaude Fable 5.2Gemini 4 NeonGrok 4.7Mistral Large 4Muse EmberSonarDeepSeek V4.1 Flash 1017 UltrafastCommand AErgo 1.0Qwen 4 35B A3BKimi K3.1 ProGLM 5.4The framework agnostic AI toolkitAI SDK featuresMulti-provider supportSwitch providers with one line of code.Streaming that just worksReal-time responses without custom parsing.Built-in fallbacksReliable production behavior by default.AI Gateway compatibleRoute to any model through one endpoint.AI SDK code examplesAI SDK CoreA unified API for generating text, structured objects, tool calls, and building agents with LLMs.AI SDK UIA set of framework-agnostic hooks for quickly building chat and generative user interface.AI PlaygroundText GenerationSpeechTranscriptionImage GenerationVideo GenerationCodePreviewExplain quantum entanglement.Ask a question…Scale with confidencePlug the AI SDK into an entire ecosystem designed for modern AI applications that scale.Vercel AI GatewayAccess 400+ models with no markup or having to manage multiple API keys.npm i aiVercel SandboxRun agent generated code securely and at scale.npm i @vercel/sandboxWorkflowsNewBuild long-running AI agents and apps that can suspend, resume, and survive function timeouts.npm i workflowAI ElementsA UI component library and custom registry built to build AI-native applications faster.npx ai-elements“OpenCode uses AI SDK.”Dax RaadCEO & Founder, OpenCodeBuild with the AI SDK todayRead the docsChatbot Starter TemplateLearn how to build a full-featured AI chatbot with persistence, multi-modal chat, and more.Copy install promptBuild a Slackbot AgentLearn how to build a Slackbot that responds to direct messages and mentions in channels.Copy install promptBuild a SQL AgentLearn how to build an app that interacts with a PostgreSQL database using natural language.Copy install prompt