One SDK fits no one
The Python team wants async-iterators. The TypeScript team wants OpenAI compat. The CI team wants cURL. Most platforms ship one and force everyone to adapt.
Ready to get started?
Deploy sovereign AI on your infrastructure - in weeks, not months.
Developers · SDKs · Python · TypeScript · cURL · CLI
kapi_ key.Native Python SDK, OpenAI-compatible drop-in, and a katonic CLI for shell and CI.
One key. Same identity, same audit, same governance.
Most platforms give you one official SDK and call it a day. Need OpenAI compat? You're on your own. Want to script in shell? Reverse-engineer the auth. Each surface ends up with its own quirks, its own retry logic, its own audit gaps. Switching surfaces means re-implementing identity inheritance.
The Python team wants async-iterators. The TypeScript team wants OpenAI compat. The CI team wants cURL. Most platforms ship one and force everyone to adapt.
Each surface invents its own auth model. The CLI uses one key format, the SDK uses another, the cURL examples assume a third. Three places to rotate when something leaks.
Calls from one SDK route through governance. Calls from another might not. Compliance review covers what they can see; the rest goes uninspected until something breaks.
This is what your developers see when they open the Developer Hub at /studio/public-api. Four tabs: API Keys, the full reference for every endpoint, copy-paste Quick Start snippets in four flavours, and the MCP Server connection details. One kapi_ key for everything.
Developer Hub
REST API, Python SDK, and MCP Server - one kapi_ key for all three.
Chat with an agent · run an evaluation · optimize a prompt
from katonic import KatonicClient
async with KatonicClient(api_key="kapi_YOUR_KEY",
base_url="https://app.your-org.katonic.ai") as k:
# Chat with a published agent
resp = await k.chat("hr-assistant", "What is the PTO policy?")
print(resp.message.content)
# Run an evaluation
run = await k.run_evaluation("agent-abc", "ds-xyz", ["accuracy"])
result = await k.poll_evaluation(run.id)
print(f"Score: {result.overall_score}")
# Optimize a prompt against a dataset
job = await k.optimize_prompt("agent-abc", "ds-xyz", max_iterations=3)
result = await k.poll_optimization(job.id)
print(f"Improved: {result.baseline_score} -> {result.best_score}")/studio/public-api renders this in your sandbox today, including the sidebar, the four tabs, the expandable key cards, the 18-tool MCP catalogue, and the four client-config switcher.The katonic CLI ships with the SDK. Login once, then list agents, chat, run evaluations, optimize prompts, and pull quality trends - all from your terminal or CI pipeline. Authenticated with the same kapi_ key.
# 1. Install + login (once)
$ pip install katonic-sdk
$ katonic login
API key: kapi_***************************
Base URL: https://app.your-org.katonic.ai
✓ Logged in as sarah@your-org · scopes: chat, search, evaluations
# 2. List published agents
$ katonic agents list
ID NAME STATUS OWNER agent-hr-001 hr-assistant live hr-team agent-fin-002 finance-bot live finance-team agent-eng-003 eng-helper draft eng-team
# 3. Chat with one
$ katonic agents chat agent-hr-001 "What is the PTO policy?"
HR-2024-08 governs PTO. Standard accrual is 18 days/year
after Year 1, increasing to 25 at Year 5...
[1] HR-2024-08.pdf, p.3 · [2] HR FAQ § 4.2
# 4. Run an eval (CI-friendly)
$ katonic eval run agent-hr-001 ds-pto-tests --evaluators faithfulness,relevancy
Started run-7c3f9a · 50 cases · ETA 2m
Polling... ✓ complete
Faithfulness: 0.94 · Relevancy: 0.91 · pass rate: 98%
# 5. Optimize a prompt
$ katonic optimize agent-hr-001 ds-pto-tests --iterations 3
Iteration 1/3 · score 0.83
Iteration 2/3 · score 0.89
Iteration 3/3 · score 0.94
✓ Improved: 0.83 → 0.94 (+13%)
# 6. Pull the quality trend
$ katonic flywheel trend agent-hr-001
Date Faithfulness Relevancy Pass rate 2024-01-15 0.91 0.88 93% 2024-02-15 0.92 0.90 96% 2024-03-15 0.94 0.91 98%
$ ▋
katonic eval run is the gate that blocks promotion if scores drop. katonic optimize is how teams improve agents from a Slack thread.Async Python or sync?
Async-first. The KatonicClient is an async context manager (async with KatonicClient(...) as k:) returning awaitable methods. Streaming responses are async-iterators. If you don't want async, the OpenAI-compatible drop-in works synchronously and uses the same kapi_ key.
Can I render streaming events?
Yes. The chat completions endpoint streams Server-Sent Events with typed event names. Use the OpenAI TypeScript client for the simplest path - it handles the SSE parsing for you. Or hit the endpoint directly and read response.body as ReadableStream.
How do I rotate keys?
Generate a new key in the Developer Hub, deploy it, revoke the old one. The platform accepts both during your migration window. Audit logs stay continuous. Key creation also supports per-key scopes, RPM/TPM rate limits, and expiry dates.
What's the CI footprint?
Just pip install katonic-sdk and a kapi_ key in env. The CLI runs the same eval/optimize/promote workflows the Studio runs. Wire katonic eval run into your PR pipeline; the gate blocks merges if scores drop below threshold.
One SDK. No flexibility.
The vendor ships their idiomatic SDK in their preferred language. Want OpenAI compat? Not their problem. Want shell? Roll your own. Each surface you need beyond the official one is custom integration.
Cheap to start. Ceiling is low.
Some platforms pretend to be OpenAI and stop there. Works for chat completions. Doesn't work for agent metadata, evaluations, prompt optimization, or anything beyond raw model calls.
Three surfaces. One key. Day one.
Native KatonicClient with full platform API. OpenAI-compatible drop-in for existing apps. CLI for shell + CI. MCP server for AI clients. All authenticated with the same kapi_ key, all routing through the same governance.
An SDK is a contract with the people who'll integrate you for the next decade. Pick one language and you exclude the others. Pick a proprietary protocol and you tax every integration. We picked: native SDK for what we do best, OpenAI compat for what the world has standardized on, MCP for what comes next. One key for all of them - so the security review only happens once.
pip install katonic-sdkSandbox access in 24 hours. Comes with a kapi_ key, a sample agent, and the SDK pre-loaded with three end-to-end examples: chat, evaluation, prompt optimization.
Five minutes from key to streaming response.
