# 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](https://app.keln.ai){ .md-button .md-button--primary }
[Quickstart ↗](quickstart.md){ .md-button }
## Your first request
=== "Python"
```python
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="")
```
=== "TypeScript"
```typescript
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"
```bash
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](migrate.md) 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](api/responses.md) (for [Codex](codex.md)) and an
[Anthropic-compatible API](api/anthropic.md) (Claude Code), and runs inside
[Claude Desktop](claude-desktop.md).
## What Keln does for you
None of this needs setup. It's on for every request you send.
<div class="grid cards" markdown>
- [Routing & failover ↗](capabilities/routing.md)
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 ↗](capabilities/quality.md)
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 ↗](capabilities/normalization.md)
Keln honors standard OpenAI parameters or translates them per model. The
[chat completions reference](api/chat-completions.md#parameters) documents how each parameter
behaves, field by field.
- [Reasoning control ↗](capabilities/reasoning.md)
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 ↗](capabilities/structured-outputs.md)
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) ↗](capabilities/images.md)
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 ↗](capabilities/caching.md)
Repeated prompt prefixes are billed at the per-model cached rate. No `cache_control`
configuration is needed.
- [Reliability & SLOs ↗](capabilities/reliability.md)
Speed targets, and delivered latency measured on your own traffic, shown in the
[usage dashboard](platform/usage.md).
- [Zero data retention ↗](capabilities/privacy.md)
Prompts and completions are not stored and not used for training.
</div>
## Pricing
Keln prices every model per million tokens and publishes the rates on the
[Models & pricing](models-pricing.md) 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
<div class="grid cards" markdown>
- [Quickstart ↗](quickstart.md)
First request in 2 minutes
- [API reference ↗](api/index.md)
Endpoints, parameters, errors
- [Models & pricing ↗](models-pricing.md)
The rate card
</div>
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.
fromopenaiimportOpenAIclient=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,)forchunkinstream:print(chunk.choices[0].delta.contentor"",end="")
importOpenAIfrom"openai";constclient=newOpenAI({baseURL:"https://api.keln.ai/v1",apiKey:process.env.KELN_API_KEY,});conststream=awaitclient.chat.completions.create({model:"deepseek-ai/deepseek-v4-flash",messages:[{role:"user",content:"Say hello from Keln."}],stream:true,});forawait(constchunkofstream){process.stdout.write(chunk.choices[0]?.delta?.content??"");}
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.
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.
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.