๐Ÿ“– Documentation

Build with
AhanaAI.

REST API, streaming support, MCP integration, and SDKs for Python, Node.js, and Go. Compress anything from anywhere.

REST API Streaming MCP Server 40+ Endpoints

Three lines to compress.

Install the Python SDK and compress your first file in under a minute.

# Install
pip install ahana-acp

# Compress a file
import ahana

result = ahana.compress("data.json", mode="adaptive")
print(f"Saved {result.savings_pct:.1f}% โ†’ {result.output_path}")

# Decompress
original = ahana.decompress("data.json.aarm")
# SHA-256 verified automatically
# Or use the REST API directly
curl -X POST https://api.ahanazip.com/v1/compress \
  -H "Authorization: Bearer aarm_pro_YOUR_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @my_file.json \
  -o my_file.json.aarm

Core endpoints.

Base URL: https://api.ahanazip.com

POST /v1/compress
Compress a file upload. Accepts any binary data up to your tier's size limit. Returns .aarm container. Query params: mode (lossless | adaptive | smart | quantum), level (1โ€“22).
X-AARM-Ratio X-AARM-Savings-Pct X-AARM-Duration-Ms
POST /v1/compress/text
Compress a text string directly. Send JSON body with {"text": "..."}. Returns .aarm container. Ideal for logs, JSON payloads, and API response caching.
POST /v1/compress/url
Compress a file from URL. Send JSON body with {"url": "..."}. We fetch and compress. Useful for compressing remote datasets, model downloads, or web content.
POST /v1/decompress
Decompress a .aarm file. Returns the original bytes, SHA-256 verified. If verification fails, returns 422 with integrity error.
GET /v1/estimate
Estimate compression savings without actually compressing. Analyzes content type and entropy to predict results. Query param: content_type.
GET /v1/stats
Get your account compression statistics: total bytes compressed, total savings, request count, and tier information.

Every response tells you what happened.

Compression metadata is returned in HTTP headers so you can log, monitor, and alert on compression performance.

HeaderExampleDescription
X-AARM-Ratio 8.32 Compression ratio (original รท compressed)
X-AARM-Savings-Pct 87.97 Percentage of bytes saved
X-AARM-Duration-Ms 142 Compression time in milliseconds
X-AARM-Original-Size 104857600 Original file size in bytes
X-AARM-Mode adaptive Compression mode used
X-AARM-Content-Type text/structured Detected content type (adaptive mode)

Native clients for every stack.

๐Ÿ

Python

pip install ahana-acp

Full sync/async support, streaming compression, type hints, and automatic .aarm detection. Python 3.10+.

๐Ÿ“ฆ

Node.js

npm install @ahanaai/acp

ESM and CommonJS. Stream API, Buffer support, TypeScript types included. Node 18+.

๐Ÿฆซ

Go

go get github.com/ahanazip/acp-go

io.Reader/Writer interface, concurrent compression, zero-copy decompression. Go 1.21+.

Works with AI assistants.

The AhanaAI MCP server exposes 6 tools for Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client.

compress_file

Compress a local file to .aarm

compress_url

Compress a file from URL

compress_text

Compress a text string

decompress_file

Decompress a .aarm file

get_compression_stats

View account statistics

estimate_savings

Predict savings for a file

// mcp.json โ€” add to your MCP client config
{
  "mcpServers": {
    "ahanazip": {
      "command": "uvx",
      "args": ["ahanazip-mcp"],
      "env": { "AHANA_API_KEY": "aarm_pro_YOUR_KEY" }
    }
  }
}

Start building.

Get your API key and compress your first file in under a minute.

Get API Key โ†’