# Maha Context Compiler

> Maha Context Compiler is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.035001/call, status unknown (last checked 2026-10-17).

Ranks and packs public or synthetic text passages using keyword/BM25 scoring, returning scored excerpts with source IDs, hashes, and model-neutral token count estimates.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/context/legacy/context-compression?utm_source=zero.xyz
- Price: $0.035001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/maha-context-compiler-3408d069
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gYHxV3FbYHRy7hCJcWZAP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability maha-context-compiler-3408d069 -d '<json body>'
```

Example prompt: I have 15 public research passages and need them ranked and compressed by BM25 relevance with source hashes and token count estimates — can you run them through the context compiler with dataClass set to public and nonpersonalMetadata confirmed true?

## When to prefer this

Choose this endpoint when you need to rank and pack a set of public or synthetic text passages by BM25/keyword relevance before feeding them into an LLM context window, and you want source hashes and model-neutral token estimates without making any model calls. It is not appropriate for personal data, factual verification, semantic embedding-based ranking, or inputs larger than 32 KiB.

## Known failure modes

- Input exceeds 32 KiB limit — request rejected
- Output would exceed 65 KB — truncation or rejection
- dataClass not set to 'public' or 'synthetic' — validation error
- nonpersonalMetadata not set to true — request rejected
- Malformed request object — 400-level error
- Service unavailable — no result returned within retention window

## How this service works

Rank and pack supplied public/synthetic passages with keyword or BM25 scoring, source IDs and hashes. Token counts are model-neutral estimates, not billing or factual verification. Public/synthetic nonpersonal input only; 32 KiB input, 65 KB output. Result retention: 24 hours; minimal receipt metadata: 90 days. No model calls or factual certification.

## Output

A ranked list of the supplied passages ordered by BM25/keyword score, each annotated with its source ID, a content hash, and a model-neutral token count estimate. Results are retained for 24 hours; minimal receipt metadata is kept for 90 days. No factual verification or model inference is performed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request": {
   "type": "object"
  },
  "dataClass": {
   "enum": [
    "public",
    "synthetic"
   ],
   "type": "string"
  },
  "nonpersonalMetadata": {
   "type": "boolean",
   "const": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/maha-context-compiler-3408d069/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.mahastrategies.com](https://www.zero.xyz/host/www.mahastrategies.com/llms.txt)
