Maha Context Compiler
Compress long documents and RAG inputs into token-budgeted, deduplicated context packs with source-linked provenance. Returns original and compiled token counts, so the saving is verifiable. Net-positive above N = fee / (r x p) tokens: r your reduction, p your input price. Extractive and budget-bound, so check includedPassages before relying on it. Ranks Latin, Cyrillic, Greek, Arabic and CJK; CJK coarser (bigrams). Not for tabular or heavily-structured payloads.
The wallet the 402 directs payment to. Its whole payment record — every payer, every chain — is on the merchant page.
Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
The payTo wallet does not resolve to a registered ERC-8004 agent. That is not a verdict on the service — most of the catalog is unregistered.
Live 402 challenge
Captured by the enrichment pass, not read just now. Prices can change — always read the 402 the endpoint answers with.
{
"error": "Payment is required for this resource.",
"accepts": [
{
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
},
"payTo": "0xec84c1cd6602bbe387bc8e6f0d3c062f2762de28",
"amount": "1000",
"scheme": "exact",
"network": "eip155:8453",
"maxTimeoutSeconds": 60
}
],
"resource": {
"url": "https://www.mahastrategies.com/api/v1/compress",
"tags": [
"ai",
"context-compression",
"llm",
"rag",
"provenance"
],
"iconUrl": "https://www.mahastrategies.com/icon.png",
"mimeType": "application/json",
"description": "Compress long documents and RAG inputs into token-budgeted, deduplicated context packs with source-linked provenance. Call when prompt context exceeds LLM token budgets to minimize inference cost.",
"serviceName": "Maha Context Compiler"
},
"extensions": {
"bazaar": {
"info": {
"input": {
"body": {
"task": "Find the release condition and rollback trigger while removing duplicate operational background.",
"scoring": "bm25",
"documents": [
{
"id": "release-notes",
"text": "Release may proceed after the security owner attaches credential-rotation evidence. The production canary passed in every region.\n\nRoutine notes cover staffing, dashboards, meeting cadence, maintenance calendars, regional handoffs, historical capacity, and documentation formatting.",
"title": "Release notes"
},
{
"id": "rollback-runbook",
"text": "Rollback if API errors exceed 2 percent for five minutes or payment failures breach the alert threshold. Restore the last-known-good deployment before reopening traffic.\n\nRoutine notes cover staffing, dashboards, meeting cadence, maintenance calendars, regional handoffs, historical capacity, and documentation formatting.",
"title": "Rollback runbook"
}
],
"budgetMode": "guaranteed",
"provenance": "compact",
"tokenBudget": 128,
"clientRequestId": "req_rag_release_001"
},
"type": "http",
"method": "POST",
"bodyType": "json"
},
"output": {
"type": "json",
"example": {
"task": "Find the release condition and rollback trigger while removing duplicate operational background.",
"packId": "ctxpack_6a5464df2ce14e9b9e16571c7d814821",
"context": "# Context Pack\n\nTask: Find the release condition and rollback trigger while removing duplicate operational background.\n\n[release-notes:1] Release may proceed after the security owner attaches credential-rotation evidence. The production canary passed in every region.\n\n[rollback-runbook:1] Rollback if API errors exceed 2 percent for five minutes or payment failures breach the alert threshold. Restore the last-known-good deployment before reopening traffic.",
"metrics": {
"sourceCount": 2,
"compiledBytes": 461,
"originalBytes": 606,
"sourceCoveragePercent": 100,
"compiledEstimatedTokens": 83,
"originalEstimatedTokens": 97,
"duplicatePassagesRemoved": 1,
"estimatedReductionPercent": 14.4
},
"sources": [
{
"title": "Release notes",
"sourceId": "release-notes",
"sourceHash": "sha256:288ded29ae161d3d11effd7161edf7c51ef1320e7ba0a8d2feaaed7abccec607",
"passageCount": 2,
"includedPassageIds": [
"release-notes:1"
],
"includedEstimatedTokens": 21,
"originalEstimatedTokens": 44
},
{
"title": "Rollback runbook",
"sourceId": "rollback-runbook",
"sourceHash": "sha256:29fca10dd4c87bee562ed5b22b42dfcc970e0dc4768591b0983fe463646f38ca",
"passageCount": 2,
"includedPassageIds": [
"rollback-runbook:1"
],
"includedEstimatedTokens": 30,
"originalEstimatedTokens": 53
}
],
"version": "0.1.0",
"warnings": [
"Token counts are model-neutral estimates, not provider tokenizer or billing counts.",
"This compiler ranks and deduplicates text; it does not verify claims, guarantee completeness, or prevent hallucination."
],
"inputHash": "sha256:288dd5cacd92158f9460346ba6e931f6d0d52f2598bd55e748fc30a186fbdc34",
"outputHash": "sha256:80a337617475688482476a469f9fa7b489ef3e1ad15b4a9756fdc1aa716ed089",
"tokenBudget": 128,
"warningCodes": [
"model_neutral_token_estimates",
"extractive_selection_not_verification"
],
"clientRequestId": "req_rag_release_001",
"includedPassages": [
{
"text": "Release may proceed after the security owner attaches credential-rotation evidence. The production canary passed in every region.",
"sourceId": "release-notes",
"passageId": "release-notes:1",
"passageHash": "sha256:4d5e66efdcf5f8dba63a89b40af6ce17f3f42948c48b731732e47f5dc2e7740c"
},
{
"text": "Rollback if API errors exceed 2 percent for five minutes or payment failures breach the alert threshold. Restore the last-known-good deployment before reopening traffic.",
"sourceId": "rollback-runbook",
"passageId": "rollback-runbook:1",
"passageHash": "sha256:6ac9d2eec09e0d9b0233f51d845f0ecbd1beca34fceab3ee44370b352644e2b5"
}
],
"sourceTextStored": false,
"retentionBoundaries": {
"selectionType": "extractive",
"tokenCountType": "model_neutral_estimate",
"evidenceRetention": "best_effort",
"completenessGuaranteed": false,
"claimVerificationPerformed": false,
"hallucinationPreventionGuaranteed": false
},
"compiledContextStored": false
}
}
},
"schema": {
"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"
],
"properties": {
"task": {
"type": "string",
"maxLength": 1200,
"minLength": 8,
"description": "Task used to rank passages."
},
"scoring": {
"enum": [
"bm25",
"keyword"
],
"type": "string",
"default": "bm25",
"description": "Passage ranker."
},
"documents": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"text"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$",
"description": "Stable source ID."
},
"text": {
"type": "string",
"minLength": 1,
"description": "Transient source text."
},
"title": {
"type": "string",
"maxLength": 160,
"minLength": 1,
"description": "Source title."
}
},
"additionalProperties": false
},
"maxItems": 8,
"minItems": 1,
"description": "Sources to rank and deduplicate."
},
"budgetMode": {
"enum": [
"guaranteed",
"estimated"
],
"type": "string",
"default": "guaranteed",
"description": "Budget enforcement mode."
},
"provenance": {
"enum": [
"full",
"compact",
"none"
],
"type": "string",
"default": "full",
"description": "Inline citation style."
},
"tokenBudget": {
"type": "integer",
"maximum": 16000,
"minimum": 64,
"description": "Model-neutral output budget."
},
"clientRequestId": {
"type": "string",
"maxLength": 120,
"minLength": 8,
"description": "Caller trace ID."
}
},
"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",
"packId",
"clientRequestId",
"task",
"tokenBudget",
"context",
"metrics",
"includedPassages",
"sources",
"warnings",
"warningCodes",
"retentionBoundaries",
"inputHash",
"outputHash",
"sourceTextStored",
"compiledContextStored"
],
"properties": {
"task": {
"type": "string"
},
"packId": {
"type": "string",
"pattern": "^ctxpack_[a-f0-9]{32}$"
},
"context": {
"type": "string"
},
"metrics": {
"type": "object",
"required": [
"originalBytes",
"compiledBytes",
"originalEstimatedTokens",
"compiledEstimatedTokens",
"estimatedReductionPercent",
"sourceCount",
"sourceCoveragePercent",
"duplicatePassagesRemoved"
],
"properties": {
"sourceCount": {
"type": "integer",
"maximum": 8,
"minimum": 1,
"description": "Input source count."
},
"compiledBytes": {
"type": "integer",
"minimum": 0,
"description": "Output UTF-8 bytes."
},
"originalBytes": {
"type": "integer",
"minimum": 0,
"description": "Source UTF-8 bytes."
},
"sourceCoveragePercent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Sources with selected passages; not evidence recall."
},
"compiledEstimatedTokens": {
"type": "integer",
"minimum": 0,
"description": "Output token estimate."
},
"originalEstimatedTokens": {
"type": "integer",
"minimum": 0,
"description": "Source token estimate."
},
"duplicatePassagesRemoved": {
"type": "integer",
"minimum": 0,
"description": "Exact duplicates removed."
},
"estimatedReductionPercent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Estimated token reduction; not provider billing."
}
},
"additionalProperties": false
},
"sources": {
"type": "array",
"items": {
"type": "object",
"required": [
"sourceId",
"title",
"sourceHash",
"originalEstimatedTokens",
"passageCount",
"includedPassageIds",
"includedEstimatedTokens"
],
"properties": {
"title": {
"type": "string"
},
"sourceId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
},
"sourceHash": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"passageCount": {
"type": "integer",
"minimum": 1
},
"includedPassageIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}:[1-9][0-9]*$"
}
},
"includedEstimatedTokens": {
"type": "integer",
"minimum": 0
},
"originalEstimatedTokens": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
},
"maxItems": 8,
"minItems": 1
},
"version": {
"type": "string",
"const": "0.1.0"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "Human-readable limitations."
},
"inputHash": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"outputHash": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"tokenBudget": {
"type": "integer",
"maximum": 16000,
"minimum": 64
},
"warningCodes": {
"type": "array",
"items": {
"enum": [
"model_neutral_token_estimates",
"extractive_selection_not_verification",
"no_passage_fit_budget"
],
"type": "string"
},
"description": "Machine-readable limitations."
},
"clientRequestId": {
"type": "string",
"maxLength": 120,
"minLength": 8
},
"includedPassages": {
"type": "array",
"items": {
"type": "object",
"required": [
"sourceId",
"passageId",
"passageHash",
"text"
],
"properties": {
"text": {
"type": "string",
"minLength": 1
},
"sourceId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
},
"passageId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}:[1-9][0-9]*$"
},
"passageHash": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
}
},
"additionalProperties": false
}
},
"sourceTextStored": {
"type": "boolean",
"const": false
},
"retentionBoundaries": {
"type": "object",
"required": [
"selectionType",
"evidenceRetention",
"claimVerificationPerformed",
"completenessGuaranteed",
"hallucinationPreventionGuaranteed",
"tokenCountType"
],
"properties": {
"selectionType": {
"type": "string",
"const": "extractive"
},
"tokenCountType": {
"type": "string",
"const": "model_neutral_estimate"
},
"evidenceRetention": {
"type": "string",
"const": "best_effort"
},
"completenessGuaranteed": {
"type": "boolean",
"const": false
},
"claimVerificationPerformed": {
"type": "boolean",
"const": false
},
"hallucinationPreventionGuaranteed": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
},
"compiledContextStored": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
}
}
}
}
}
}
},
"x402Version": 2
}Accepts
The payment requirements as published to the catalog. Read the live 402 before paying — a price here is a claim, not a quote.
Pay 0.001 USDC on Base to 0xec84…2de28. The signed payment is good for 1 minute.
- Paid to
- 0xec84…2de28
- USD Coin contract
- 0x8335…02913
- Payment window
- 1 minute
- As published
- 1000 smallest units
The catalog’s raw entry
[
{
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
},
"payTo": "0xec84c1cd6602bbe387bc8e6f0d3c062f2762de28",
"amount": "1000",
"scheme": "exact",
"network": "eip155:8453",
"maxTimeoutSeconds": 60
}
]Extensions
{
"bazaar": {
"info": {
"input": {
"body": {
"task": "Find the release condition and rollback trigger while removing duplicate operational background.",
"scoring": "bm25",
"documents": [
{
"id": "release-notes",
"text": "Release may proceed after the security owner attaches credential-rotation evidence. The production canary passed in every region.\n\nRoutine notes cover staffing, dashboards, meeting cadence, maintenance calendars, regional handoffs, historical capacity, and documentation formatting.",
"title": "Release notes"
},
{
"id": "rollback-runbook",
"text": "Rollback if API errors exceed 2 percent for five minutes or payment failures breach the alert threshold. Restore the last-known-good deployment before reopening traffic.\n\nRoutine notes cover staffing, dashboards, meeting cadence, maintenance calendars, regional handoffs, historical capacity, and documentation formatting.",
"title": "Rollback runbook"
}
],
"budgetMode": "guaranteed",
"provenance": "compact",
"tokenBudget": 128,
"clientRequestId": "req_rag_release_001"
},
"type": "http",
"method": "POST",
"bodyType": "json"
},
"output": {
"type": "json",
"example": {
"task": "Find the release condition and rollback trigger while removing d…",
"packId": "ctxpack_6a5464df2ce14e9b9e16571c7d814821",
"context": "# Context Pack\n\nTask: Find the release condition and rollback tr…",
"metrics": {
"sourceCount": 2,
"tokensSaved": 14,
"compiledBytes": 461,
"originalBytes": 606,
"sourceCoveragePercent": 100,
"compiledEstimatedTokens": 83,
"originalEstimatedTokens": 97,
"duplicatePassagesRemoved": 1,
"estimatedReductionPercent": 14.4
},
"sources": [
{
"title": "Release notes",
"sourceId": "release-notes",
"sourceHash": "sha256:288ded29ae161d3d11effd7161edf7c51ef1320e7ba0a8d2feaaed7ab…",
"passageCount": 2,
"includedPassageIds": [
"release-notes:1"
],
"includedEstimatedTokens": 21,
"originalEstimatedTokens": 44
}
],
"version": "0.1.0",
"warnings": [
"Token counts are model-neutral estimates, not provider tokenizer…"
],
"inputHash": "sha256:288dd5cacd92158f9460346ba6e931f6d0d52f2598bd55e748fc30a18…",
"outputHash": "sha256:80a337617475688482476a469f9fa7b489ef3e1ad15b4a9756fdc1aa7…",
"tokenBudget": 128,
"warningCodes": [
"model_neutral_token_estimates",
"extractive_selection_not_verification"
],
"clientRequestId": "req_rag_release_001",
"includedPassages": [
{
"text": "Release may proceed after the security owner attaches credential…",
"sourceId": "release-notes",
"passageId": "release-notes:1",
"passageHash": "sha256:4d5e66efdcf5f8dba63a89b40af6ce17f3f42948c48b731732e47f5dc…"
}
],
"sourceTextStored": false,
"retentionBoundaries": {
"selectionType": "extractive",
"tokenCountType": "model_neutral_estimate",
"evidenceRetention": "best_effort",
"completenessGuaranteed": false,
"claimVerificationPerformed": false,
"hallucinationPreventionGuaranteed": false
},
"compiledContextStored": false
}
}
},
"schema": {
"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"
],
"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
}
},
"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",
"packId",
"clientRequestId",
"task",
"tokenBudget",
"context",
"metrics",
"includedPassages",
"sources",
"warnings",
"warningCodes",
"retentionBoundaries",
"inputHash",
"outputHash",
"sourceTextStored",
"compiledContextStored"
],
"properties": {
"task": {
"type": "string"
},
"packId": {
"type": "string"
},
"context": {
"type": "string"
},
"metrics": {
"type": "object"
},
"sources": {
"type": "array",
"maxItems": 8,
"minItems": 1
},
"version": {
"type": "string",
"const": "0.1.0"
},
"warnings": {
"type": "array"
},
"inputHash": {
"type": "string"
},
"outputHash": {
"type": "string"
},
"tokenBudget": {
"type": "integer",
"maximum": 16000,
"minimum": 64
},
"warningCodes": {
"type": "array"
},
"clientRequestId": {
"type": "string",
"maxLength": 120,
"minLength": 8
},
"includedPassages": {
"type": "array"
},
"sourceTextStored": {
"type": "boolean",
"const": false
},
"retentionBoundaries": {
"type": "object"
},
"compiledContextStored": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
}
}
}
}
}
},
"maha-offer": {
"asset": "USDC",
"amount": "1000",
"method": "POST",
"status": "available",
"network": "eip155:8453",
"offerId": "context-compression",
"assetDecimals": 6,
"declarationUrl": "https://www.mahastrategies.com/api/discovery/x402-offers/context-compression",
"maxRequestBytes": 450000,
"canonicalResource": "https://www.mahastrategies.com/api/v1/compress",
"declarationInline": "compact",
"payableInProduction": true,
"fullSourceTextStored": false,
"verbatimExcerptsRetained": false
},
"declaration-integrity": {
"metadataVersion": "2026-08-10",
"canonicalResource": "https://www.mahastrategies.com/api/v1/compress",
"declarationDigest": "sha256:ff1556f72a25aff5298da49f220e2fb0e24d40064df25dd0fe2539165665af72"
}
}Provenance
- Seen in the source catalog
- 2026-09-17 03:30Z
- Last indexed by Roundhouse
- 2026-09-24 07:20Z
- Last enriched (probe, favicon, geo)
- 2026-09-20 12:45Z
- x402 version
- 2
- Max timeout
- 60s
- Liveness probe
- HTTP 401
Hand this page to an agent
Copy the prompt and paste it into Claude, an MCP client or your own agent — it will vet this service and call it over the free read API. No key, no account.
GET api.roundhouseai.io/v0/endpoints
This endpoint's own trailing-30-day call count, as published by the upstream catalog and snapshotted daily. 30 snapshots so far. Verified volume counts only settlements with an on-chain EIP-3009 marker.
Show the promptHide the prompt
Using Roundhouse, look up the x402 service Maha Context Compiler and tell me whether it is worth paying: what a call costs, whether the endpoint answered when last probed, and what its payment record actually shows. curl -s 'https://api.roundhouseai.io/v0/endpoints?q=Maha%20Context%20Compiler' curl -s 'https://api.roundhouseai.io/v0/merchants/<the payTo wallet returned above>' Then call it: read the price from the live 402 at https://www.mahastrategies.com/api/v1/compress, never from a cached figure, and pay with an x402 client. The /v0 API needs an API key (`authorization: Bearer rh_live_…`) on everything except /v0/unified* and /v0/endpoints. Mint a personal key for $0.01 at GET https://api.roundhouseai.io/v0/test/x402, or use an organization key from https://roundhouseai.io/dashboard/team. If you do not have Roundhouse tools or skills installed, read https://roundhouseai.io/skill.md first — it is the whole procedure.