# Maha Strategies Document Compress & Evaluate

> Maha Strategies Document Compress & Evaluate is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Compiles 1-8 documents into a token-budgeted context pack and measures exact retention of 1-32 caller-labelled evidence spans, returning the pack, source-linked passages, token savings, and retention metrics.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/compress/evaluate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/maha-strategies-document-compress-evaluate-5d25f2b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_depRs-PtXUSBz1sEM_Mb6

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-strategies-document-compress-evaluate-5d25f2b9 -d '<json body>'
```

Example prompt: Compress these 3 research documents into a context pack with a 4000-token budget, and check that my 5 labelled evidence spans — like 'quarterly revenue increased 12%' and 'CEO resigned in March' — are retained in the output.

## When to prefer this

Choose this endpoint when you need to both compress multiple documents to fit a token budget AND verify that specific, caller-labelled evidence spans survive the compression — giving you a measurable retention score. It is uniquely suited for RAG pipelines, LLM context preparation, and any workflow where you must prove key facts are preserved after compression, not just assume they are. Prefer it over generic summarization APIs when exact span retention measurement matters, when you have 1-8 source documents, and when you need source-linked output with token savings metrics.

## Known failure modes

- More than 8 documents submitted — request rejected
- More than 32 evidence spans provided — request rejected
- Token budget too small to fit any content — empty or minimal pack returned
- Evidence spans not found in source documents — 0% retention reported
- Malformed document input — parse error returned
- Token budget exceeded by minimum extractable content — compression fails

## How this service works

Compile 1-8 documents into a token-budgeted context pack, then measure exact retention of 1-32 caller-labelled evidence spans. Returns the pack, source-linked passages, input and output hashes, original and compiled token estimates, tokensSaved, source coverage, and requiredEvidenceRetentionPercent. Retention is exact span matching only: not accuracy, answer quality, verification, or hallucination prevention. Extractive and budget-bound. Request content is not stored.

## Output

Returns a compiled context pack with source-linked passages, SHA hashes of input and output, original and compressed token count estimates, tokensSaved count, source coverage metrics, and a requiredEvidenceRetentionPercent score reflecting exact span matching against the caller-labelled evidence spans provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "clientRequestId",
      "task",
      "tokenBudget",
      "documents",
      "requiredEvidence"
     ],
     "properties": {
      "task": {
       "type": "string",
       "maxLength": 1200,
       "minLength": 8
      },
      "scoring": {
       "enum": [
        "bm25",
        "keyword"
       ],
       "type": "string"
      },
      "documents": {
       "type": "array",
       "maxItems": 8,
       "minItems": 1
      },
      "budgetMode": {
       "enum": [
        "guaranteed",
        "estimated"
       ],
       "type": "string"
      },
      "provenance": {
       "enum": [
        "full",
        "compact",
        "none"
       ],
       "type": "string"
      },
      "tokenBudget": {
       "type": "integer",
       "maximum": 16000,
       "minimum": 64
      },
      "clientRequestId": {
       "type": "string",
       "maxLength": 120,
       "minLength": 8
      },
      "requiredEvidence": {
       "type": "array",
       "maxItems": 32,
       "minItems": 1
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "version",
      "offerId",
      "evaluationId",
      "clientRequestId",
      "contextPack",
      "evidence",
      "metrics",
      "inputHash",
      "outputHash",
      "warnings",
      "warningCodes",
      "retentionBoundaries",
      "sourceTextStored",
      "compiledContextStored",
      "requiredEvidenceTextStored"
     ],
     "properties": {
      "metrics": {
       "type": "object"
      },
      "offerId": {
       "type": "string",
       "const": "deep-context-evaluation"
      },
      "version": {
       "type": "string",
       "const": "0.1.0"
      },
      "evidence": {
       "type": "arra
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/maha-strategies-document-compress-evaluate-5d25f2b9/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)
