Skip to content

What is Keln

Open models now match frontier models, at up to 8× lower cost. Keln is the reliability layer that makes them production-ready.

Keln gives you one OpenAI-compatible endpoint and one flat price per model, and routes every request across verified providers with failover, normalized outputs, and zero data retention.

Get an API key Quickstart ↗

Your first request

from openai import OpenAI

client = OpenAI(
    base_url="https://api.keln.ai/v1",
    api_key="YOUR_KELN_KEY",
)

stream = client.chat.completions.create(
    model="deepseek-ai/deepseek-v4-flash",
    messages=[{"role": "user", "content": "Say hello from Keln."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.keln.ai/v1",
  apiKey: process.env.KELN_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "deepseek-ai/deepseek-v4-flash",
  messages: [{ role: "user", content: "Say hello from Keln." }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
curl https://api.keln.ai/v1/chat/completions \
  -H "Authorization: Bearer $KELN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Say hello from Keln."}],
    "stream": true
  }'

Coming from OpenAI or OpenRouter? The migration guide covers the base-URL change and the parameters and response fields that differ from OpenAI.

Building agents or want to connect your coding harness? Keln also serves the Responses API (for Codex) and an Anthropic-compatible API (Claude Code), and runs inside Claude Desktop.

What Keln does for you

None of this needs setup. It's on for every request you send.

  • Routing & failover ↗ Keln predicts each route's TTFT for your prompt size. If a route is slower than predicted, the request starts on a second route and the slower attempt is canceled. If a node fails mid-stream, another node is re-prompted with the tokens generated so far and resumes.

  • Quality verification ↗ Keln probes every route against a trusted reference and scores it on test tasks against other routes. This detects silent quantization and degraded output. Keln removes a failing route before it serves you, and returns it only once it passes again.

  • Request normalization ↗ Keln honors standard OpenAI parameters or translates them per model. The chat completions reference documents how each parameter behaves, field by field.

  • Reasoning control ↗ One field, reasoning_effort, controls thinking on every model. Keln returns the reasoning trace in the reasoning_content field on both streaming and non-streaming responses.

  • Structured outputs & tools ↗ Keln supports JSON mode, JSON schema, and tool calling in the standard OpenAI shape. It validates structured responses and routes each request to capacity it has verified for the requested mode.

  • Images (vision) ↗ Models with the Vision badge accept images in the OpenAI content-parts format. Keln returns a 400 if you send an image to a text-only model.

  • Caching discount ↗ Repeated prompt prefixes are billed at the per-model cached rate. No cache_control configuration is needed.

  • Reliability & SLOs ↗ Speed targets, and delivered latency measured on your own traffic, shown in the usage dashboard.

  • Zero data retention ↗ Prompts and completions are not stored and not used for training.

Pricing

Keln prices every model per million tokens and publishes the rates on the Models & pricing page. The rate is fixed: it does not change with user, load, or which provider serves you. Cached input is billed at the per-model cached rate.

Where to go next