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

AI SDK

https://ai-sdk.dev/

最近抓取:2026-12-04 23:53:16(北京时间)

最近内容变化:2026-12-04 23:53:16(北京时间)

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

访问原网页

页面简介

A unified TypeScript SDK for building AI apps with modern streaming, fallbacks, and multi-model support—powered by Vercel.

正文摘录

Universal AI layer for building frameworks and agentsA unified TypeScript SDK for building AI apps with modern streaming, fallbacks, and multi-model support—powered by VercelFor humansFor agents$npm install aiText GenerationImage GenerationSpeechTranscriptionVideo GenerationDecisionsgenerate-text.tsRun it withAI GatewayProviderCustomimport { generateText } from 'ai'; const { text } = await generateText({ model: 'spacexai/grok-4.7', prompt: 'Explain the concept of quantum entanglement.', }); console.log(text);Explain quantum entanglement in simple terms.Entanglement is nature's way of keeping a secret between two particles. Once entangled, observing one instantly reveals information about the other — no signal needed, no matter how far apart they are.See all supported LLM modelsWeekly downloads46.3MGitHub stars28.4KContributors790+Models supported100+The framework agnostic AI toolkitThe open-source AI toolkit designed to help developers build AI-powered applications and agents with React, Next.js, Vue, Svelte, Node.js, and more.Next.jsReactSvelteAngularVueNuxtSolidMulti-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 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 interfaces.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 100+ 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-elementsWhat builders say about the AI SDK“We built a full AI agent with 40+ tools, resumable streams, and multi-step reasoning on AI SDK. Every hard problem we’d solved with duct tape before, streaming, tool call repair, message management, tool based UI, they already had a clean API for.”Adir DuchanSenior AI Engineer, Elementor“OpenCode uses AI SDK.”Dax RaadCEO & Founder, OpenCodeBuild with the AI SDK todayGet started with the AI SDK by using our recipes or templates.Read the docs$npm i aiChatbot 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