# Polygon Transaction Complexity Analyzer

> Polygon Transaction Complexity Analyzer is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Analyzes the structural complexity of a Polygon PoS transaction by scoring its call depth, inner transactions, instructions, keys, and logs into a complexity band and score.

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/polygon_transaction_complexity/invoke
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polygon-transaction-complexity-analyzer-6c7a120e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KjBncmuEqXPtWz3EwHy5x

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 polygon-transaction-complexity-analyzer-6c7a120e -d '<json body>'
```

Example prompt: Can you analyze the structural complexity of this Polygon transaction and tell me its complexity band and score? Here's the transaction JSON: {paste transaction JSON here}.

## When to prefer this

Choose this endpoint when you need a fast, lightweight structural complexity score for a Polygon PoS transaction before execution or during audit triage, and you do not need full risk scoring, safety assessment, or finality guarantees. It is specifically calibrated for Polygon Mainnet (chain 137) and Amoy testnet (chain 80002), so prefer it over generic EVM analyzers when working within the Polygon ecosystem. It is not a substitute for security auditing or transaction simulation.

## Known failure modes

- Invalid or malformed JSON in request_json field — service returns an error or unexpected result
- Unsupported chain ID (only Polygon Mainnet 137 and Amoy testnet 80002 are accepted)
- request_json too short (minimum 2 chars) or too long (max 65536 chars) — schema validation failure
- Missing or empty request body — returns HTTP 4xx
- Payment not supplied or insufficient USDC — x402 payment required response
- Incomplete transaction data leading to zero counts and a minimal complexity score that may not reflect true on-chain complexity

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

Returns a JSON object containing a complexity band (e.g. 'low', 'medium', 'high'), a numeric complexity score, counts of calls, inner transactions, instructions, keys, and logs, an interpretation label, the analyzed network identifier, network context (accepted chain IDs, bridge model, completion policy, protocol family), warnings about complexity scope, and the service ID. Also includes a full receipt with payment metadata and a SHA-256 result hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request_json": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "warnings": [
    "Complexity is not risk, safety, or finality."
   ],
   "service_id": "polygon_transaction_complexity",
   "analysis_json": "{\"band\":\"low\",\"counts\":{\"calls\":0,\"inner\":0,\"instructions\":0,\"keys\":0,\"logs\":1},\"interpretation\":\"structural_complexity_only\",\"network\":\"polygon\",\"network_context\":{\"accepted_chain_ids\":[\"137\",\"80002\"],\"bridge_model\":\"root-child state sync plus checkpoint evidence\",\"completion_policy\":\"never inferred without supplied evidence\",\"protocol_family\":\"Polygon PoS\"},\"score\":2}",
   "evidence_scope": "caller_supplied_data",
   "analyzed_network": "polygon"
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "polygon_transaction_complexity",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "20000",
   "resultSha256": "18ab7806a6b94b02e5f7458d5d67f0070e7aa5bdd48485070bb1e54cfadd1114",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polygon-transaction-complexity-analyzer-6c7a120e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
