Developers

Use Katalock from your own app, CLI, or backend. The API is OpenAI-compatible (point the official OpenAI SDK at our base URL) and it's pay-as-you-go: metered from your prepaid balance, never from a subscription.

What is Katalock?

Katalock is a verified mixture-of-experts (MoE) system. In AI, a mixture-of-experts means that instead of leaning on one model for every question, each task is routed to the expert best suited to it, and for answers that matter, several experts respond independently and their answers are cross-checked before a single one is returned. Katalock turns that into a product: the right expert for each job, plus a verification layer that scores how much the experts agree, so you get an answer you can actually trust. Powered by AiM Intelligence.

How Usage & Billing Works

Chat has a rolling session limit and a weekly limit. When you hit one, the reset time shows in your own local time (with the date for the weekly reset). Top up your Katalock wallet (₹ in India, S$ in Singapore, RM in Malaysia, Rp in Indonesia) to keep going right away. The Developer API is separate and prepaid: every call meters real tokens against your wallet balance at the pay-as-you-go rate of the tier you pick (Lucy, Tara, Stargazer, or AiM), so you only pay for what you use, never from a subscription.

Minimum Top-UpS$3
Rate Limit60/min

Introductory pricing, local tax where applicable, may change. The API only ever draws your prepaid balance, it can never overspend.

Loading your account…

Base URL & Auth

Base URL: https://www.katalock.net/api/v1. Authenticate with a Bearer token (your API key).

Chat Completions (OpenAI-Compatible)

Python: OpenAI SDK, Base-URL Swap

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_KATALOCK_API_KEY",
    base_url="https://www.katalock.net/api/v1",
)

resp = client.chat.completions.create(
    model="katalock-tara",  # Lucy (fast) · Tara (smart) · Stargazer (pro)
    messages=[
        {"role": "user", "content": "Write a Diwali offer for my shop, in Hindi."}
    ],
)
print(resp.choices[0].message.content)

JavaScript / TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.KATALOCK_API_KEY,
  baseURL: "https://www.katalock.net/api/v1",
});

const resp = await client.chat.completions.create({
  model: "katalock-tara",
  messages: [{ role: "user", content: "Summarise this invoice in Tamil." }],
});
console.log(resp.choices[0].message.content);

cURL

curl https://www.katalock.net/api/v1/chat/completions \
  -H "Authorization: Bearer $KATALOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "katalock-tara",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Streaming, Tools and JSON

The endpoint follows OpenAI's: stream (Server-Sent Events, with usage and the cost in the last chunk), tools, tool_choice and parallel_tool_calls, response_format (JSON mode), temperature, top_p, stop, seed, the penalties, n (up to 4) and max_tokens. GET https://www.katalock.net/api/v1/models lists the tiers.

stream = client.chat.completions.create(
    model="katalock-lucy",
    messages=[{"role": "user", "content": "Three names for a chai stall"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

# Tools (function calling) work the same way as with OpenAI:
resp = client.chat.completions.create(
    model="katalock-tara",
    messages=[{"role": "user", "content": "What's the weather in Chennai?"}],
    tools=[{"type": "function", "function": {"name": "get_weather",
            "parameters": {"type": "object", "properties": {"city": {"type": "string"}}}}}],
)
print(resp.choices[0].message.tool_calls)

Retry Safely

Send an Idempotency-Key header (any unique string) with chat, verify and media calls (not streaming ones). If your request is retried within 24 hours with the same key, you get the first answer back and are charged once. A retry that arrives while the first is still running gets a 409; try again in a few seconds. A request refused before it ran (balance, limits, input) can be retried with the same key.

curl https://www.katalock.net/api/v1/chat/completions \
  -H "Authorization: Bearer $KATALOCK_API_KEY" \
  -H "Idempotency-Key: order-1234-summary" \
  -H "Content-Type: application/json" \
  -d '{ "model": "katalock-tara", "messages": [{"role": "user", "content": "Hello"}] }'

Verify: The K-Computer Wedge

Not just an answer: a confidence-scored, cross-checked one. Your prompt is answered several times over and independently cross-checked, an adjudicator reconciles the results, and any claim only one pass made is flagged. Returns confidence (high / medium / low), agreement, and notes on anything unverified.

curl https://www.katalock.net/api/v1/verify \
  -H "Authorization: Bearer $KATALOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "What is the GST rate on cotton sarees in India?" }'

# → {
#     "answer": "...",
#     "confidence": "high",
#     "agreement": 0.83,
#     "panel_size": 6,
#     "notes": null,
#     "katalock": { "cost_inr": 1.4, "balance_inr": 198.6 }
#   }

You pay for what the panel actually used (every model's own token count) plus a small verified fee; the most it can cost is held while it runs and the rest comes back. Add "stream": true to get progress events while the panel works, then the result as one event (verified calls have their own limit of 20 a minute per key).

Shareable Results & the “Verified by Katalock” Badge

Pass "share": true and the response adds a public result page and an embeddable badge you can drop on your site — a trust mark that links back to the cross-checked answer.

curl https://www.katalock.net/api/v1/verify \
  -H "Authorization: Bearer $KATALOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "Is GSTR-3B due on the 20th?", "share": true }'

# → { ..., "share_url": "https://www.katalock.net/v/v_abc123",
#          "badge_url": "https://www.katalock.net/api/badge/v_abc123" }

# Embed the badge (links to the verified result):
<a href="https://www.katalock.net/v/v_abc123">
  <img src="https://www.katalock.net/api/badge/v_abc123" alt="Verified by Katalock">
</a>

Images, Songs, Video and HD

One endpoint, POST https://www.katalock.net/api/v1/media, paid from your balance. Nothing is watermarked and files are hosted for you. Images and songs come back in the response; a video or HD upscale returns a job id you poll. If a video fails, the full price goes back to your balance. Pass reference photos as images (https links). Which qualities each tier can use: Lucy Basic and Cinematic video and Normal images; Tara adds Medium video, Enhanced images and songs; Stargazer and AiM add Advanced and Ultra video.

# An image
curl https://www.katalock.net/api/v1/media -H "Authorization: Bearer $KATALOCK_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "image", "model": "katalock-tara", "quality": "enhanced", "prompt": "A Diwali sale poster, gold and maroon" }'
# → { "kind": "image", "url": "https://...", "cost_inr": 12, "balance_inr": 488 }

# A video (kind: video, quality: basic | cinematic | medium | advanced | ultra, seconds, aspect, images)
curl https://www.katalock.net/api/v1/media -H "Authorization: Bearer $KATALOCK_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "video", "model": "katalock-stargazer", "quality": "cinematic", "prompt": "Rain on a Mumbai street at night" }'
# → { "id": "mjob_...", "status": "processing", "poll": "/api/v1/media?id=mjob_..." }

curl "https://www.katalock.net/api/v1/media?id=mjob_..." -H "Authorization: Bearer $KATALOCK_API_KEY"
# → { "status": "processing" | "succeeded" | "failed", "url": "https://..." }

# HD: upscale a finished video to 1080p
curl https://www.katalock.net/api/v1/media -H "Authorization: Bearer $KATALOCK_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "upscale", "video_id": "mjob_..." }'

Balance, Limits and Errors

Every call reserves the most it can cost before it runs and gives back what it didn't use, so parallel calls can never overspend your balance. Each key can have a daily spending cap and its own requests-a-minute limit (Limits, next to the key above); caps reset at 00:00 UTC. GET https://www.katalock.net/api/v1/balance shows the balance, today's spend and the key's limits. Errors use OpenAI's shape: 401 bad key, 402 balance too low, 403 the tier can't use that quality, 409 the same Idempotency-Key is still running, 422 blocked by the safety check, 429 rate limit or daily cap (see Retry-After), 502 the model didn't answer (nothing charged).

curl https://www.katalock.net/api/v1/balance -H "Authorization: Bearer $KATALOCK_API_KEY"
# → { "balance_inr": 488, "key": { "daily_cap_inr": 500, "spent_today_inr": 12, "cap_left_inr": 488, "rate_per_min": 60 } }

Run a Studio Graph

Build a media graph once in Katalock Studio (product shots, reels, voiceovers), save it, then run it from your own app. Fill its Text and Your-file nodes by node id. It costs the same credits as pressing Run in Studio, and results land in your Library. A video renders in the background: check it with the run_id.

curl https://www.katalock.net/api/v1/studio/run \
  -H "Authorization: Bearer $KATALOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "workflow_id": "<your graph id>", "inputs": { "<text node id>": "New mango juice, summer launch" } }'

# → { "status": "done" | "rendering", "finals": [...], "credits": 12, "run_id": 42 }

curl "https://www.katalock.net/api/v1/studio/run?run_id=42" -H "Authorization: Bearer $KATALOCK_API_KEY"

Katalock Code From Your Terminal

Work on a Code project from your own computer. Your files go to your Katalock project, Katalock builds the change on its build server (with your project's secrets, rules and hooks), and the result comes back into your folder. One file, no installs, Node 18 or newer. It skips binaries, files over 400 KB and anything that looks like a secret (.env, keys).

curl -fsSLO https://www.katalock.net/katalock.mjs
node katalock.mjs login <your API key>
node katalock.mjs init "a booking site for my salon"   # or: init --project <id>
node katalock.mjs build "add a contact form"            # send, build, bring back
node katalock.mjs run "npm test"                        # run a command on the build server
node katalock.mjs ci                                    # GitHub checks on Katalock's pull request
node katalock.mjs ci fix                                # fix failing checks and push the fix

Use Katalock Inside Your Agent (MCP Server)

Katalock is also an MCP server: add it to Claude Code, Cursor, Copilot, or any MCP-capable agent and they get a verify tool (K-Computer cross-check) and an ask tool, so your agent can fact-check itself mid-task. Same key, same pay-as-you-go balance.

Claude Code (CLI)

claude mcp add --transport http katalock https://www.katalock.net/api/mcp/server \
  --header "Authorization: Bearer $KATALOCK_API_KEY"

Cursor / Generic MCP Client (mcp.json)

{
  "mcpServers": {
    "katalock": {
      "type": "http",
      "url": "https://www.katalock.net/api/mcp/server",
      "headers": { "Authorization": "Bearer YOUR_KATALOCK_API_KEY" }
    }
  }
}

Tools exposed: verify (confidence-scored, cross-checked) and ask (fast single-model). Discovery is free; only tool calls draw down your balance.

Katalock Code tools: code_new_project, code_plan, code_build, code_status, code_cancel, code_read_file, code_write_file, code_versions, code_restore, code_preview, code_publish, code_export_github, code_search, code_run, code_write_files, code_ci_status, code_ci_fix, code_ci_push, code_get_files. Planning is free, except a Deep plan, which costs up to 10 credits, charged only if you build it; builds use your Katalock credits, capped per build. Agents can read the step-by-step guide as the katalock://guide resource, or at /llms.txt.

WebMCP (browser agents): KatalockAi also publishes these tools to in-browser AI agents via the emerging navigator.modelContext standard, so an agent running in the user's browser can call katalock_verify / katalock_ask on their own signed-in session, no key required. Where a browser doesn't yet support the standard, the same tools are discoverable on window.katalockWebMCP.

Use Katalock Inside n8n

Because the API is OpenAI-compatible, any n8n workflow can call Katalock. Add an HTTP Request node (works on every n8n version) pointed at the endpoint below, or import this ready-made workflow.

// Import into n8n: Workflows → ⋯ → Import from clipboard
{
  "name": "Katalock — verified answer",
  "nodes": [
    { "parameters": {}, "name": "Manual Trigger", "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1, "position": [400, 300] },
    { "parameters": {
        "method": "POST",
        "url": "https://www.katalock.net/api/v1/verify",
        "sendHeaders": true,
        "headerParameters": { "parameters": [
          { "name": "Authorization", "value": "Bearer YOUR_KATALOCK_API_KEY" }
        ] },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={ \"prompt\": \"What is the GST rate on cotton sarees?\" }"
      },
      "name": "Katalock verify", "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4, "position": [640, 300] }
  ],
  "connections": { "Manual Trigger": { "main": [[{ "node": "Katalock verify", "type": "main", "index": 0 }]] } }
}

Prefer n8n's built-in OpenAI node? Create an OpenAI credential with the base URL and your Katalock key, then use model katalock-auto. For the cross-checked wedge, call /verify (as above) instead of /chat/completions. You can also add Katalock via n8n's MCP Client node.

Models & Per-Tier Pricing

Each Katalock model is a named tier. You choose the tier per request; the price is metered from your prepaid balance at that tier's own rate, so you only pay premium rates when you ask for a premium tier. Amounts are per 1 million tokens, in your local currency.

ModelTierInput / 1MOutput / 1MFor
Lucy katalock-lucyFast……Quick everyday tasks. Lowest price, highest rate limit.
Tara katalock-taraSmart……Balanced reasoning and writing. The sensible default.
Stargazer katalock-stargazerPro……Flagship reasoning, long context, the hardest tasks.
AiM katalock-aimVerified……Cross-checked by a panel; returns one answer with a confidence score.

AiM is the verified tier: it cross-checks a panel and returns one answer with a confidence score via the /verify endpoint. Legacy ids katalock-auto, katalock-fast, katalock-smart keep working (they map to Tara, Lucy and Tara).

Which model should I use?

Start with Tara (katalock-tara), the balanced default. Use Lucy (katalock-lucy) for high-volume, cost-sensitive calls; Stargazer (katalock-stargazer) for the hardest reasoning and long context; and AiM for a cross-checked, confidence-scored answer. In your code, set the model to the tier's id, in Python or TypeScript, model: "katalock-tara" (swap in katalock-lucy or katalock-stargazer). For AiM, call the /verify endpoint instead of chat/completions.

Pricing & Limits

Billed per token from your prepaid balance at the per-tier rates in the table above; the verified AiM tier fans out across a panel and is priced accordingly. Every response includes your cost and remaining balance in the x-katalock-cost-inr / x-katalock-balance-inr headers (in Indian rupees, Katalock's billing base; this page shows them in your currency). When the balance hits zero you get a 402, top up to resume. Each key is rate-limited to 60 requests/min; exceed it and you get a 429 with a retry-after header.

Building something with Katalock?

Tell us at admin@katalock.net.