{"uid":"cap_gYHxV3FbYHRy7hCJcWZAP","slug":"maha-context-compiler-3408d069","name":"Maha Context Compiler","description":"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.","url":"https://www.mahastrategies.com/api/v1/context/legacy/context-compression?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"request":{"type":"object"},"dataClass":{"enum":["public","synthetic"],"type":"string"},"nonpersonalMetadata":{"type":"boolean","const":true}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.035001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.035001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.035001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.035001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BDUfmACioobV0UsGFWIo0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.035001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"RAG pipeline context packing","prompt":"I've got 20 retrieved public document chunks for my RAG pipeline and I need them ranked by BM25 score with hashes attached so I can pick the top ones that fit within my context window — run them through the context compiler with public dataClass."},{"title":"Synthetic data relevance ranking","prompt":"I generated a batch of synthetic training passages and need to rank them by keyword relevance, get token count estimates for each, and attach source IDs before I pass them downstream — please compress and score them with dataClass synthetic and nonpersonalMetadata true."},{"title":"Pre-inference context budget check","prompt":"Before I send these 30 public news excerpts to the model, can you rank them by BM25 score and give me token estimates so I know which ones to drop to stay within my context budget? Use public dataClass and confirm no personal data is included."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:39.376Z","isFirstParty":false,"canonicalSlug":"maha-context-compiler-c04920fa"}