Documentation Index
Fetch the complete documentation index at: https://docs.getkaizen.io/llms.txt
Use this file to discover all available pages before exploring further.
API Methods
Every SDK call follows the same shape: send structured JSON, receive a KTOF payload (or decoded data), and inspect the stats to quantify savings. Use the links below for detailed, language-specific docs.| Method | Description | Request model | Response highlights |
|---|---|---|---|
KaizenClient | Configure base URL, headers, and lifecycle helpers. | KaizenClientConfig | Async context manager, env loading |
compress | Generic JSON → KTOF compression with size stats. | EncodeRequest | result, stats |
decompress | Expand a KTOF string back into JSON. | DecodeRequest | data, operation |
optimize | Compression plus token stats in one round-trip. | EncodeRequest + token_models | stats, token_stats |
optimize_request | Encode raw provider payloads (messages, tools, metadata). | OptimizeRequestPayload | result, schema echoes |
optimize_response | Decode provider replies back into structured JSON. | OptimizeResponsePayload | result |
prompts_encode | Auto-detect JSON snippets inside prompts and compress. | PromptEncodePayload | result, stats, optional token_stats |
prompts_decode | Hydrate a ktof string by ID or inline payload. | PromptDecodePayload | result, metadata, replay_meta |
health | Lightweight readiness probe. | None | status, uptime (when enabled) |
- Source:
python/kaizen_client/client.py - Models:
python/kaizen_client/models.py - Tests:
python/tests/test_client.py