# Maha Policy Version Comparison

> Maha Policy Version Comparison is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.017/call, status unknown (last checked 2026-09-14).

Compares two versions of a structured policy by clause ID, text, and scope to report additions, removals, and changes between them.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/policy-version-comparison
- Price: $0.017/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/maha-policy-version-comparison-3f223f2c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OrHAcoStv3z8t9aUV13vq

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-policy-version-comparison-3f223f2c -d '<json body>'
```

Example prompt: Before we publish the updated privacy policy, compare version '2024-Q1' (sequence 4) against the new '2024-Q2' (sequence 5) for policy ID 'privacy-policy-main' — I'll provide up to 40 clauses from each version labeled by stable clause ID and scope, using public data class, so you can report exactly which clauses were added, removed, or changed.

## When to prefer this

Use this endpoint when you need a deterministic, structured diff of two policy versions by clause-level stable IDs before release or handoff — it is not a legal interpretation or compliance checker, just a precise clause-level change detector. Prefer it over generic text-diff tools when clauses have stable IDs and you need structured addition/removal/change categorization with an audit receipt.

## Known failure modes

- Missing required fields (policyId, beforeVersion, afterVersion, sequences, or clause arrays) returns a validation error
- Clause arrays exceeding 40 items per version are rejected
- Invalid dataClass enum value (not 'public' or 'synthetic') returns an error
- Mismatched or inverted sequence numbers may cause unexpected ordering results
- Malformed clause objects with missing stable IDs may produce incomplete diff results
- Payment failure or insufficient USDC balance prevents execution

## How this service works

Review a structured policy revision before release. Compare up to 40 caller-supplied clauses per version by stable ID, text and scope; report additions, removals and changes. Checks declared chronology, not legal effect, applicability or compliance.

## Output

Returns a structured comparison report identifying which clauses were added, removed, or modified between the two specified policy versions, based on stable clause IDs, text content, and scope declarations. Also includes an offer ID, version label, input and receipt digests for audit traceability, and the amount charged.

## 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": [
      "dataClass",
      "policyId",
      "beforeVersion",
      "afterVersion",
      "beforeSequence",
      "afterSequence",
      "before",
      "after"
     ],
     "properties": {
      "after": {
       "type": "array",
       "maxItems": 40,
       "minItems": 0
      },
      "before": {
       "type": "array",
       "maxItems": 40,
       "minItems": 0
      },
      "policyId": {
       "type": "string",
       "maxLength": 80
      },
      "dataClass": {
       "enum": [
        "public",
        "synthetic"
       ],
       "type": "string"
      },
      "afterVersion": {
       "type": "string",
       "maxLength": 80
      },
      "afterSequence": {
       "type": "integer",
       "maximum": 1000000,
       "minimum": 0
      },
      "beforeVersion": {
       "type": "string",
       "maxLength": 80
      },
      "beforeSequence": {
       "type": "integer",
       "maximum": 1000000,
       "minimum": 0
      }
     },
     "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",
      "amountBaseUnits",
      "inputDigest",
      "result",
      "boundaries",
      "receiptDigest"
     ],
     "properties": {
      "result": {
       "type": "object"
      },
      "offerId": {
       "enum": [
        "policy-version-comparison"
       ],
       "type": "string"
      },
      "version": {
       "enum": [
        "maha-microproducts/0.1"
       ],
       "type": "string"
      },
      "boundaries": {
       "type": "array",
       "maxItems": 128,
       "minItems": 0
      },
      "inputDigest": {
       "type": "string",
       "maxLength": 71
      },
      "receiptDigest": {
       "type": "string",
       "maxLength"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/maha-policy-version-comparison-3f223f2c/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)
