For LangChain

Power LangChain with
the best open-source models

Use Kyma as the model provider for your LangChain chains and agents. Just point ChatOpenAI at Kyma: active models, auto-failover, pay per use. No OpenAI or Anthropic key needed.

Best Open Models

Qwen 3.6 Plus for quality, Kimi K2.6 for agents and tools, DeepSeek V4 Flash for value: pick any model with a single string change in ChatOpenAI.

Auto-Failover

For eligible failures, Kyma API tries another compatible route when available. Requests can still fail.

OpenAI-Compatible

LangChain's ChatOpenAI class talks to any OpenAI-compatible endpoint. Set the base URL to Kyma and check feature support for your chosen model.

Recommended Models for LangChain

Ranked by quality, context length, tool support, and cost for real LangChain workloads.

1
Qwen 3.6 PlusVision input

Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page.

qwen-3.6-plus

Reasoning

2
Kimi K2.6Vision input

Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page.

kimi-k2.6

Reasoning

3
DeepSeek V4 FlashTool use

Supports reasoning, tool use. Compare current prices and measured uptime on the model page.

deepseek-v4-flash

Reasoning

4
Gemma 4 31BVision input

Supports reasoning, tool use, vision input. Compare current prices and measured uptime on the model page.

gemma-4-31b

Reasoning

5
Qwen 3 CoderTool use

Supports tool use. Compare current prices and measured uptime on the model page.

qwen-3-coder

Tool use

Setup guide

1. Create account2. Point ChatOpenAI at Kyma 3. Run your LangChain app.

🐍Python (langchain-openai)
# pip install langchain-openai
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="qwen-3.6-plus",
    base_url="https://kymaapi.com/v1",
    api_key="kyma-xxxxx",  # get yours at kymaapi.com
)

resp = llm.invoke("Explain LangChain in one sentence.")
print(resp.content)
🟨JavaScript / TypeScript (@langchain/openai)
// npm install @langchain/openai
import { ChatOpenAI } from "@langchain/openai";

const llm = new ChatOpenAI({
  model: "qwen-3.6-plus",
  apiKey: "kyma-xxxxx", // get yours at kymaapi.com
  configuration: {
    baseURL: "https://kymaapi.com/v1",
  },
});

const resp = await llm.invoke("Explain LangChain in one sentence.");
console.log(resp.content);

Pro Tips

Pick the right model for each chain to balance output quality and cost for your workload.

1

Use kimi-k2.6 for LangChain agents and tool-calling workflows that need long context

2

Use deepseek-v4-flash for high-volume chains where value and a 1M context window matter

3

Use gemma-4-31b to cut costs on simple prompts and cheap vision tasks

Build with LangChain and Kyma API

$0.50 signup credit for eligible free-tier models after email verification. No card required.

Create account

Explore more

Browse the recommended models for LangChain and compare them against the rest of the catalog.