kyma-ai
v0.1.0
Published
Official Kyma API client — free LLM API gateway. Every open source model, one endpoint.
Downloads
21
Maintainers
Readme
kyma-ai
Official Node.js client for Kyma API — free LLM API gateway. Every open source model, one endpoint.
Install
npm install kyma-aiQuick Start
import Kyma from "kyma-ai";
const kyma = new Kyma({ apiKey: "kyma-your-key" });
// Simple: ask a question
const answer = await kyma.ask("Explain quantum computing simply");
console.log(answer);
// Full control: OpenAI-compatible chat
const response = await kyma.chat.completions.create({
model: "llama-3.3-70b",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello!" },
],
});
console.log(response.choices[0].message.content);
// Streaming
const stream = await kyma.chat.completions.create({
model: "qwen-3-32b",
messages: [{ role: "user", content: "Write a poem" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}Available Models
const models = await kyma.listModels();
models.forEach(m => console.log(m.id));20+ models from Meta, Google, Alibaba, OpenAI, NVIDIA, and more. All free to start.
Check Balance
const { balance, lifetime_spent } = await kyma.getBalance();
console.log(`Balance: $${balance.toFixed(2)}`);OpenAI SDK Compatible
Kyma wraps the official OpenAI SDK. Access it directly:
const openai = kyma.openai;
// Use any OpenAI SDK featureGet Your API Key
- Sign up at kymaapi.com
- Get your
kyma-API key from the dashboard - Start building!
