Vercel AI SDK

Use Kyma with the
Vercel AI SDK

Official Kyma provider, active open models, streaming support, and a working Next.js starter.

Official Kyma provider

Use `@kyma-api/ai-sdk` with the Vercel AI SDK. No custom wrapper code needed.

Streaming-ready starter

The repo includes a Next.js chatbot starter using `streamText` and `useChat`.

One API, active models

Use Kyma aliases or active model IDs through one endpoint with Kyma routing and failover.

Quick path

npm install @kyma-api/ai-sdk ai

import { generateText } from "ai";
import { kyma } from "@kyma-api/ai-sdk";

const { text } = await generateText({
  model: kyma("best"),
  prompt: "Explain retrieval-augmented generation in one paragraph.",
});

What to use

Best default: bestqwen-3.6-plus

Code-focused: codeqwen-3-coder

Fast path: fastqwen-3-32b

Agent/tool use: agentkimi-k2.5

Long context: long-contextgemini-2.5-flash

Build on a working path

Start with the official guide, validate with the Next.js starter, then adapt for your app.