🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@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

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts