API docs
One endpoint for chat completions across several models, with automatic fallback when a model is busy. Free keys, 50 requests per key per day.
Quick start
1. Get a free key on the home page with your email. It looks like kv_live_… and is shown only once.
2. Send your first request:
curl https://kalvion.tech/api/v1/chat \ -H "Authorization: Bearer $KALVION_KEY" \ -H "Content-Type: application/json" \ -d '{"input": "Summarise our refund policy in 2 lines"}'
# pip install requests import os, requests r = requests.post( "https://kalvion.tech/api/v1/chat", headers={"Authorization": f"Bearer {os.environ['KALVION_KEY']}"}, json={"input": "Summarise our refund policy in 2 lines"}, timeout=30, ) r.raise_for_status() print(r.json()["output"])
const r = await fetch("https://kalvion.tech/api/v1/chat", { method: "POST", headers: { "Authorization": `Bearer ${process.env.KALVION_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ input: "Summarise our refund policy in 2 lines" }), }); const data = await r.json(); console.log(data.output);
Authentication
Send your key in the Authorization header as Bearer kv_live_…. Keys are stored hashed, so we cannot show a key again. If you lose it, request a new one with the same email; the old key stops working.
Keep keys on your server. Do not put them in public front-end code or repositories.
POST /api/v1/chat
Send one prompt with input, or a conversation with messages.
| Field | Type | Notes |
|---|---|---|
input | string | A single user prompt. Use this or messages. |
messages | array | [{"role":"user"|"assistant","content":"…"}], last one from the user. Up to 30 kept. |
system | string | Optional instructions for the model. |
provider | string | Optional: groq or gemini. Omit it for automatic choice with fallback. |
max_tokens | number | 16 to 4096, default 1024. |
temperature | number | 0 to 1. Lower is more predictable. |
Response:
{
"id": "run_8c1f…",
"provider": "groq",
"model": "openai/gpt-oss-20b",
"output": "Refunds are available within 30 days…",
"tokens": { "input": 42, "output": 31 },
"latency_ms": 568,
"usage": { "requests_today": 3, "daily_limit": 50 }
}
GET /api/v1/usage
Requests used today for your key. For the last 7 to 30 days, call /api/v1/usage/history?days=7, or open the Dashboard.
curl https://kalvion.tech/api/v1/usage/history?days=7 \
-H "Authorization: Bearer $KALVION_KEY"
Errors
Errors return JSON as {"error":{"code","message"}}.
| HTTP | Code | What to do |
|---|---|---|
| 400 | missing_input, bad_messages | Send input, or messages ending with the user. |
| 401 | missing_key, invalid_key | Check the Authorization header and the key. |
| 403 | pending_approval, inactive_key | The key is not active. Request a new one. |
| 429 | daily_limit | Limit reached. It resets at 00:00 UTC. |
| 502 | provider_error | Every model was busy. Retry after a few seconds. |
Limits
Each key gets 50 requests per day, reset at 00:00 UTC. A request that fails on every model is not counted. Each request has a 9-second budget across models.
Without a key you can still try the live demos on the home page.
Models
Kalvion routes to the fastest available model first and falls back automatically. Current providers are Groq (open models) and Google Gemini. See live availability on the Status page.
KALVION