# Maha Strategies Context Budget Ladder

> Maha Strategies Context Budget Ladder is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.012/call, status unknown (last checked 2026-09-13).

Compiles the same set of documents at five ascending token budgets and returns five extractive context packs with a comparison table, stable hashes, and a receipt digest.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/context/budget-ladder
- Price: $0.012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/maha-strategies-context-budget-ladder-e1e397b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_atWwJMUwtbLPb03ZUihpV

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-context-budget-ladder-e1e397b9 -d '<json body>'
```

Example prompt: Take these three research PDFs I uploaded and compile them at five ascending token budgets — say 500, 1000, 2000, 4000, and 8000 tokens — using BM25 scoring with full provenance, so I can compare how much content survives at each level. Use request ID 'proj-alpha-20240601' and task description 'summarize key findings on climate adaptation strategies'.

## When to prefer this

Choose this endpoint when you need to systematically compare how document content changes across multiple token budgets in a single deterministic call, rather than calling a single-budget compiler multiple times. It is ideal for calibrating RAG pipelines, auditing compression fidelity, or presenting stakeholders with a side-by-side retention comparison. Prefer this over the single-budget endpoint when the optimal token budget is unknown and you want a structured comparison table returned atomically with stable hashes for reproducibility.

## Known failure modes

- Missing required fields (clientRequestId, task, tokenBudgets, documents) returns a 400 validation error
- More than 8 documents or more than 5 token budgets in the arrays causes a schema validation failure
- Token budgets not supplied in ascending order may produce unexpected comparison results
- Documents that are too large or malformed may cause extraction errors
- Payment failure via x402 protocol results in a 402 response and no compilation is performed
- Non-unique or too-short clientRequestId (under 8 chars) returns a validation error

## How this service works

Choose a context budget before an agent run. Compare five extractive compilation budgets with token estimates and source coverage. Price basis: five compiler runs, the comparison table and the receipt digest. Uses caller-supplied documents; no answer generation, factual verification or guaranteed token-billing savings.

## Output

Returns five extractive context packs (one per token budget), each with source-linked content. Also returns a compact comparison table across all five runs, token boundary markers, a stable input digest, a receipt digest for auditability, and economic basis metadata. Neither the source text nor the compiled contexts are stored server-side.

## 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",
      "tokenBudgets",
      "documents"
     ],
     "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"
      },
      "tokenBudgets": {
       "type": "array",
       "maxItems": 5,
       "minItems": 1
      },
      "clientRequestId": {
       "type": "string",
       "maxLength": 120,
       "minLength": 8
      }
     },
     "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",
      "clientRequestId",
      "inputDigest",
      "economicBasis",
      "runs",
      "comparison",
      "boundaries",
      "sourceTextStored",
      "compiledContextStored",
      "receiptDigest"
     ],
     "properties": {
      "runs": {
       "type": "array",
       "maxItems": 5,
       "minItems": 1
      },
      "offerId": {
       "type": "string",
       "const": "context-budget-ladder"
      },
      "version": {
       "type": "string",
       "const": "0.1"
      },
      "boundaries": {
       "type": "array"
      },
      "comparison": {
       "type": "array",
       "maxItems": 5,
       "minItems": 1
      },
      "inputDigest": {
       "type": "string"
      },
      "economicBasis": {
      
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/maha-strategies-context-budget-ladder-e1e397b9/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)
