{"slug":"www-mahastrategies-com-api-v1-compress-e3a007","title":"Compress long documents and RAG inputs into token-budgeted, deduplicated context","host":"www.mahastrategies.com","method":"POST","resource":"https://www.mahastrategies.com/api/v1/compress","category":"market","description":"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-boun","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":1839,"reported_calls_30d":9,"reported_payers_30d":7,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"budgetMode":"guaranteed","clientRequestId":"req_rag_release_001","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"}],"provenance":"compact","scoring":"bm25","task":"Find the release condition and rollback trigger while removing duplicate operational background.","tokenBudget":128},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"budgetMode":{"enum":["guaranteed","estimated"],"type":"string"},"clientRequestId":{"maxLength":120,"minLength":8,"type":"string"},"documents":{"maxItems":8,"minItems":1,"type":"array"},"provenance":{"enum":["full","compact","none"],"type":"string"},"scoring":{"enum":["bm25","keyword"],"type":"string"},"task":{"maxLength":1200,"minLength":8,"type":"string"},"tokenBudget":{"maximum":16000,"minimum":64,"type":"integer"}},"required":["clientRequestId","task","tokenBudget","documents"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"properties":{"clientRequestId":{"maxLength":120,"minLength":8,"type":"string"},"compiledContextStored":{"const":false,"type":"boolean"},"context":{"type":"string"},"includedPassages":{"type":"array"},"inputHash":{"type":"string"},"metrics":{"type":"object"},"outputHash":{"type":"string"},"packId":{"type":"string"},"retentionBoundaries":{"type":"object"},"sourceTextStored":{"const":false,"type":"boolean"},"sources":{"maxItems":8,"minItems":1,"type":"array"},"task":{"type":"string"},"tokenBudget":{"maximum":16000,"minimum":64,"type":"integer"},"version":{"const":"0.1.0","type":"string"},"warningCodes":{"type":"array"},"warnings":{"type":"array"}},"required":["version","packId","clientRequestId","task","tokenBudget","context","metrics","includedPassages","sources","warnings","warningCodes","retentionBoundaries","inputHash","outputHash","sourceTextStored","compiledContextStored"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1839,"error":null}],"description_full":"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.","last_updated":"2026-09-17T03:30:18.804Z","schemes":["exact"]}