comparar · AI
Both work with Next.js. In a kit you pick one, and your agent gets the rule to use only that one.
| Claude API | Vercel AI SDK | |
|---|---|---|
| What it is | Anthropic's official SDK for calling Claude. | Streaming, chat and tools with any model (Claude by default). |
| Frameworks | Next.js, Node.js, Bun | Next.js |
| Paquetes | @anthropic-ai/sdk | ai @ai-sdk/anthropic @ai-sdk/react |
| Skill oficial | anthropics/skills@claude-api | vercel/ai@ai-sdk |
| How your agent uses it | Use `askClaude()` from `src/lib/claude.ts`, or the `claude` client for advanced cases (streaming, tools). Always check `stop_reason` before reading the response. Read the `claude-api` skill before changing models or parameters. | Call models from Route Handlers or Server Actions with `streamText` / `generateText` from `ai` and the `anthropic("claude-opus-5-5")` provider. On the client use `useChat` from `@ai-sdk/react`. There's an example in `src/app/api/chat/route.ts`. |
| Kits that offer it | api-fastify, api-hono, api-nestjs, saas-ai-next, saas-next-better-auth, saas-next-supabase | saas-ai-next, saas-next-better-auth, saas-next-supabase |
| Chosen in | 0 installs | 0 installs |