New:Socket for Asana Is Now Available.Learn more
Get Started

@kyma-api/ai-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kyma-api/ai-sdk

Kyma API provider for the Vercel AI SDK. 16 open-source LLMs, one endpoint, auto-failover.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@kyma-api/ai-sdk

Kyma API provider for the Vercel AI SDK. Access 16 open-source LLMs through one endpoint with automatic failover.

Install

npm install @kyma-api/ai-sdk @ai-sdk/openai-compatible

Setup

Get your API key at kymaapi.com (free $0.50 credit).

export KYMA_API_KEY="ky-your-api-key"

Usage

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

// Use model aliases
const { text } = await generateText({
  model: kyma("best"),
  prompt: "What is quantum computing?",
});

// Stream responses
const result = streamText({
  model: kyma("code"),
  prompt: "Write a React hook for dark mode",
});

// Use specific models
const { text: analysis } = await generateText({
  model: kyma("deepseek-r1"),
  prompt: "Analyze this algorithm's time complexity...",
});

Model Aliases

Use aliases instead of memorizing model IDs:

AliasBest For
bestHighest quality overall
fastFastest response
codeCode generation
cheapLowest cost
reasoningComplex reasoning
agentAgentic tool use
visionImage input
long-context1M token context
balancedQuality + speed balance

Custom Configuration

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

const kyma = createKyma({
  apiKey: "ky-your-api-key",
  baseURL: "https://kymaapi.com/v1", // default
});

Keywords

kyma

FAQs

Package last updated on 18 Apr 2026

Related posts