{
  "name": "FairSeal Trust Infrastructure",
  "description": "Cryptographic receipts for every game outcome and AI decision. Verifiable randomness, VEO output verification, and PII detection - all payable via x402 micropayments in USDC on Base.",
  "version": "2.0.0",
  "network": "eip155:8453",
  "currency": "USDC",
  "endpoints": [
    {
      "path": "/v1/rng/commit",
      "method": "POST",
      "price": "0",
      "description": "Commit to a future VDF epoch before its output is computable. Returns signed commitment receipt.",
      "use_cases": [
        "provably_fair_selection",
        "leader_election",
        "nft_allocation",
        "unbiased_sampling",
        "fair_ordering"
      ],
      "hero": true,
      "note": "free during beta; will be 0.01"
    },
    {
      "path": "/v1/rng/reveal/{commitment_id}",
      "method": "GET",
      "price": "0",
      "description": "Retrieve the committed epoch output after VDF computation. Permissionless — anyone can verify.",
      "use_cases": [
        "commitment_resolution",
        "proof_retrieval"
      ]
    },
    {
      "path": "/v1/rng/latest",
      "method": "GET",
      "price": "0.005",
      "description": "Demo/sandbox: retrieve a pre-computed verifiable random number. For production use commit/reveal.",
      "use_cases": [
        "testing",
        "demo",
        "low_stakes_sampling"
      ]
    },
    {
      "path": "/v2/anchor",
      "method": "POST",
      "price": "0.01",
      "description": "Anchor a 32-byte SHA-256 payload hash into a Merkle batch on Base mainnet. Returns anchor_id (202); poll status_url for an anchored receipt containing the Merkle proof and on-chain tx hash. Receipts verify offline (pure sha256 fold) and on-chain (MerkleAnchor.getBatchRoot on any Base RPC). Pricing note: anchors are batch-settled; the effective per-anchor cost may be lower than the listed price when multiple hashes settle in one Merkle batch.",
      "use_cases": [
        "tamper_evident_receipts",
        "proof_of_existence",
        "audit_trail",
        "agent_decision_anchoring"
      ]
    },
    {
      "path": "/v1/notarize",
      "method": "POST",
      "price": "0.02",
      "description": "Notarize an AI agent decision or audit record. POST {schema, payload_hash (SHA-256 hex, 64 chars), metadata}. Schemas: agent_decision (agent_id, decided_at, input_hash, decision_hash), audit_evidence, probe_record. Returns receipt_id with pending_anchor immediately; Merkle proof and on-chain anchor tx follow when the batch anchors. Difference from /v2/anchor: anchor records a bare hash; notarize validates and records a structured decision with metadata. On 400 the response includes a machine-readable example_request hint.",
      "use_cases": [
        "agent_decision_notarization",
        "audit_trail",
        "incident_forensics",
        "compliance_evidence"
      ],
      "request_schema": {
        "type": "object",
        "required": [
          "schema",
          "payload_hash",
          "metadata"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "enum": [
              "agent_decision",
              "audit_evidence",
              "probe_record"
            ],
            "description": "Notarization schema type"
          },
          "payload_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 hex of the full payload (64 lowercase hex chars)"
          },
          "metadata": {
            "type": "object",
            "description": "Schema-specific metadata. agent_decision requires {agent_id, decided_at, input_hash, decision_hash}. See GET /v1/notarize/schemas for full spec."
          }
        }
      },
      "example_request": {
        "schema": "agent_decision",
        "payload_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "metadata": {
          "agent_id": "my-agent-v1",
          "decided_at": "2026-09-12T10:00:00Z",
          "input_hash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3",
          "decision_hash": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05a3d7"
        }
      },
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "bodyType": "json",
              "body": {
                "schema": "agent_decision",
                "payload_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "metadata": {
                  "agent_id": "my-agent-v1",
                  "decided_at": "2026-09-12T10:00:00Z",
                  "input_hash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3",
                  "decision_hash": "b94f6f125c79e3a5ffaa826f584c10d52ada669e6762051b826b55776d05a3d7"
                }
              },
              "method": "POST"
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json",
                      "form-data",
                      "text"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "required": [
                      "schema",
                      "payload_hash",
                      "metadata"
                    ],
                    "properties": {
                      "schema": {
                        "type": "string",
                        "enum": [
                          "agent_decision",
                          "audit_evidence",
                          "probe_record"
                        ]
                      },
                      "payload_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$",
                        "description": "SHA-256 hex of full payload (64 lowercase hex chars)"
                      },
                      "metadata": {
                        "type": "object",
                        "description": "Schema-specific metadata. agent_decision requires {agent_id, decided_at, input_hash, decision_hash}"
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "path": "/v1/veo/verify",
      "method": "POST",
      "price": "0.002",
      "description": "VEO-2 object verification: schema validation, hash integrity, optional signature check. Returns signed verdict.",
      "use_cases": [
        "ai_output_validation",
        "multi_agent_trust",
        "compliance_verification",
        "safety_checkpoint"
      ],
      "request_schema": {
        "type": "object",
        "required": [
          "standard",
          "version",
          "object_id",
          "object_class",
          "provider",
          "confidence"
        ],
        "properties": {
          "standard": {
            "type": "string",
            "const": "VEO"
          },
          "version": {
            "type": "string",
            "const": "2.0"
          },
          "object_id": {
            "type": "string",
            "description": "Unique identifier for this VEO object"
          },
          "object_class": {
            "type": "string",
            "enum": [
              "VEO-2A",
              "VEO-2B",
              "VEO-2C",
              "VEO-2D"
            ]
          },
          "issued_at": {
            "type": "string",
            "description": "ISO-8601 timestamp"
          },
          "provider": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "confidence": {
            "type": "object",
            "required": [
              "score"
            ],
            "properties": {
              "score": {
                "type": "number",
                "description": "0.0-1.0 float or 0-1000 integer"
              }
            }
          },
          "execution": {
            "type": "object",
            "description": "Runtime execution context. At least one of execution/entropy is required."
          },
          "entropy": {
            "type": "string",
            "description": "Entropy source. At least one of execution/entropy is required."
          },
          "metadata": {
            "type": "object"
          },
          "proof": {
            "type": "object",
            "description": "Optional: {provider_signature} enables signature check"
          }
        }
      },
      "example_request": {
        "standard": "VEO",
        "version": "2.0",
        "object_id": "veo-abc123",
        "object_class": "VEO-2A",
        "issued_at": "2026-09-12T10:00:00Z",
        "provider": {
          "name": "my-agent",
          "version": "1.0"
        },
        "confidence": {
          "score": 0.9
        },
        "execution": {
          "model": "gpt-4o",
          "prompt_hash": "sha256:deadbeef"
        }
      },
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "bodyType": "json",
              "body": {
                "standard": "VEO",
                "version": "2.0",
                "object_id": "veo-abc123",
                "object_class": "VEO-2A",
                "issued_at": "2026-09-12T10:00:00Z",
                "provider": {
                  "name": "my-agent",
                  "version": "1.0"
                },
                "confidence": {
                  "score": 0.9
                },
                "execution": {
                  "model": "gpt-4o",
                  "prompt_hash": "sha256:deadbeef"
                }
              },
              "method": "POST"
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json",
                      "form-data",
                      "text"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "required": [
                      "standard",
                      "version",
                      "object_id",
                      "object_class",
                      "provider",
                      "confidence"
                    ],
                    "properties": {
                      "standard": {
                        "type": "string",
                        "const": "VEO"
                      },
                      "version": {
                        "type": "string",
                        "const": "2.0"
                      },
                      "object_id": {
                        "type": "string"
                      },
                      "object_class": {
                        "type": "string",
                        "enum": [
                          "VEO-2A",
                          "VEO-2B",
                          "VEO-2C",
                          "VEO-2D"
                        ]
                      },
                      "issued_at": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "object",
                        "required": [
                          "name"
                        ]
                      },
                      "confidence": {
                        "type": "object",
                        "required": [
                          "score"
                        ]
                      },
                      "execution": {
                        "type": "object",
                        "description": "At least one of execution/entropy required"
                      },
                      "entropy": {
                        "type": "string",
                        "description": "At least one of execution/entropy required"
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "path": "/v1/pii/detect",
      "method": "POST",
      "price": "0.001",
      "description": "PII pattern detection (regex-based; no cryptographic receipt): emails, US/Canada (NANP) phones only (non-NANP international numbers not detected), dash-formatted numeric national IDs (partial coverage; alphanumeric formats such as Taiwan A123456789 and Korean 6+7-digit formats are not matched), loose passport patterns, 64-hex strings (flags Ethereum-style private keys AND any 64-char hex including SHA-256 hashes -- review before acting), unformatted credit-card numbers only (space- or dash-separated card numbers such as \"4111 1111 1111 1111\" are not detected), US SSNs, IPv4. Returns findings + sanitized text. hasPII:false does not certify the text is PII-free. No Merkle proof or on-chain anchor is issued -- do not use @fairseal/verify on PII responses. Expect false positives and missed matches.",
      "use_cases": [
        "data_sanitization",
        "privacy_compliance",
        "agent_output_scrubbing",
        "rag_data_cleaning"
      ],
      "request_schema": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 50000,
            "description": "Text to scan for PII (max 50,000 chars)"
          }
        }
      },
      "example_request": {
        "text": "Contact alice@example.com or call 555-867-5309. SSN: 123-45-6789."
      },
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "bodyType": "json",
              "body": {
                "text": "Contact alice@example.com or call 555-867-5309. SSN: 123-45-6789."
              },
              "method": "POST"
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json",
                      "form-data",
                      "text"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "required": [
                      "text"
                    ],
                    "properties": {
                      "text": {
                        "type": "string",
                        "maxLength": 50000,
                        "description": "Text to scan for PII (max 50,000 chars)"
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    }
  ],
  "verification": {
    "frontend": "https://verify.fairseal.io",
    "npm_package": "@fairseal/commit",
    "proof_format": "wesolowski_vdf",
    "anchor_chain": "base_mainnet",
    "anchor_contract": "0xEE09671Bbc6B932BF1461CAff360bfDD9bEA55ca",
    "anchor_explorer": "https://basescan.org/address/0xEE09671Bbc6B932BF1461CAff360bfDD9bEA55ca"
  },
  "contact": {
    "docs": "https://api.fairseal.io/docs",
    "github": "https://github.com/fairseal-io/fairseal",
    "email": "hello@fairseal.io",
    "feedback": "Integration issues or receipt/verdict questions: hello@fairseal.io"
  },
  "provider": "https://fairseal.io",
  "service_notices": [
    {
      "date": "2026-09-09",
      "id": "vdf-correction-202609",
      "summary": "Before 2026-09-01, /v1/rng/latest responses labeled the VDF as wesolowski-2048 while the engine was an iterated SHA-256 chain (also sequential). Corrected 2026-09-01: genuine Wesolowski RSA-2048 now live. Affected buyers: contact hello@fairseal.io.",
      "details": "https://fairseal.io/notices/vdf-correction-202609.html"
    }
  ],
  "service_health": {
    "note": "Metrics below cover openrng-platform game API (localhost:3000). x402 payment path (this host) is not included in these figures.",
    "current_streak": {
      "pass_rate": "100%",
      "rounds": 2760,
      "since": "2026-08-18T04:45:00Z",
      "cadence_minutes": 15,
      "checks_per_round": 15,
      "not_included": [
        "x402 payment settlement",
        "Base mainnet",
        "external network"
      ]
    },
    "full_period": {
      "start": "2026-07-08T14:28:00Z",
      "end_snapshot": "2026-09-15T20:30:00Z",
      "pass_rate": "95.94%",
      "pass": 97322,
      "total": 101439,
      "failure_breakdown": {
        "E1_auth_security_gap": {
          "count": 2514,
          "fixed": "2026-08-18"
        },
        "A1_vdf_not_integrated": {
          "count": 1581,
          "fixed": "2026-09-01",
          "disclosed": "2026-09-09"
        },
        "B_monitor_timing": {
          "count": 22,
          "note": "monitor design gap, not service failure"
        }
      }
    },
    "human_readable": "https://fairseal.io/trust-history.html"
  }
}
