decompress
Expand a KTOF string back into the original JSON structure.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | str | ✅ | KTOF string previously returned by compress, optimize, or prompts_encode. |
options.indent | int | ❌ | Apply indentation when reconstructing JSON for readability. |
options.strict | bool | ❌ | Default True; set False to tolerate unknown markers (useful when debugging legacy payloads). |
Code example
Response example
Errors
400→datais missing or not a valid KTOF payload.410→ Referenced payload expired (if you passed apayload_idinstead of inline data).
Notes
decompressmirrorscompress. Useprompts_decodewhen round-tripping prompt metadata (messages,schemas,token_stats).- Keep compressed payloads under your data retention policy—Kaizen does not store them beyond the TTL associated with your account tier.