All workflows

Result Consensus Gate

Compare multiple provider outputs, measure exact agreement and expose field-level consensus before an autonomous workflow trusts a result.

2 credits per call · $0.02 USDC with x402

Sample input

{
  "min_agreement": 0.66,
  "outputs": [
    {
      "provider_id": "a",
      "value": {
        "price": 25,
        "currency": "USD"
      }
    },
    {
      "provider_id": "b",
      "value": {
        "price": 25,
        "currency": "USD"
      }
    },
    {
      "provider_id": "c",
      "value": {
        "price": 27,
        "currency": "USD"
      }
    }
  ]
}

Worked sample output

{
  "ok": true,
  "mode": "result_consensus_gate",
  "decision": "accept",
  "provider_count": 3,
  "min_agreement": 0.66,
  "whole_result_agreement": 0.666667,
  "consensus_value": {
    "price": 25,
    "currency": "USD"
  },
  "consensus_providers": [
    "a",
    "b"
  ],
  "distinct_result_count": 2,
  "field_consensus": [
    {
      "field": "currency",
      "agreement_ratio": 1,
      "consensus_value": "USD",
      "providers": [
        "a",
        "b",
        "c"
      ],
      "missing_count": 0
    },
    {
      "field": "price",
      "agreement_ratio": 0.666667,
      "consensus_value": 25,
      "providers": [
        "a",
        "b"
      ],
      "missing_count": 1
    }
  ],
  "limitations": [
    "Agreement is exact deterministic equality, not truth verification. Correlated providers can agree and still be wrong."
  ]
}

Worked example using published sample data only. Own-data execution is paid.

Connect in curl

Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.

curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/result-consensus-gate' \
  -H "Authorization: Bearer $BOUNTY_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: workflow-request-001' \
  -H 'X-Max-Credits: 2' \
  --data '{"min_agreement":0.66,"outputs":[{"provider_id":"a","value":{"price":25,"currency":"USD"}},{"provider_id":"b","value":{"price":25,"currency":"USD"}},{"provider_id":"c","value":{"price":27,"currency":"USD"}}]}'

Connect in n8n

Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.

Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/result-consensus-gate. Send JSON and these headers; store the Bearer token as a private credential.

{
  "method": "POST",
  "headers": {
    "Authorization": "Bearer YOUR_PRIVATE_API_KEY",
    "Content-Type": "application/json",
    "Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
    "X-Max-Credits": "2"
  },
  "body": {
    "min_agreement": 0.66,
    "outputs": [
      {
        "provider_id": "a",
        "value": {
          "price": 25,
          "currency": "USD"
        }
      },
      {
        "provider_id": "b",
        "value": {
          "price": 25,
          "currency": "USD"
        }
      },
      {
        "provider_id": "c",
        "value": {
          "price": 27,
          "currency": "USD"
        }
      }
    ]
  }
}

Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe