Kalvion API · v1

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"}'

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.

FieldTypeNotes
inputstringA single user prompt. Use this or messages.
messagesarray[{"role":"user"|"assistant","content":"…"}], last one from the user. Up to 30 kept.
systemstringOptional instructions for the model.
providerstringOptional: groq or gemini. Omit it for automatic choice with fallback.
max_tokensnumber16 to 4096, default 1024.
temperaturenumber0 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"}}.

HTTPCodeWhat to do
400missing_input, bad_messagesSend input, or messages ending with the user.
401missing_key, invalid_keyCheck the Authorization header and the key.
403pending_approval, inactive_keyThe key is not active. Request a new one.
429daily_limitLimit reached. It resets at 00:00 UTC.
502provider_errorEvery 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.