{
  "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",
      "request_schema": {
        "type": "object",
        "required": [],
        "properties": {
          "label": {
            "type": "string",
            "description": "Optional label for this commitment (max 128 chars)",
            "maxLength": 128
          }
        },
        "description": "Body is optional. POST with empty body {} is valid."
      },
      "example_request": {}
    },
    {
      "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.01",
      "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.02",
      "description": "Anchor a SHA-256 payload hash (64 lowercase hex chars) into a Merkle batch on Base mainnet. Payment: $0.02 USDC per submission. Returns anchor_id (202 Accepted); poll status_url for anchored receipt with Merkle proof + on-chain tx hash. Verify offline (pure SHA-256 fold) or on-chain via MerkleAnchor.getBatchRoot on any Base RPC.",
      "use_cases": [
        "tamper_evident_receipts",
        "proof_of_existence",
        "audit_trail",
        "agent_decision_anchoring"
      ],
      "request_schema": {
        "type": "object",
        "required": [
          "payload_hash"
        ],
        "properties": {
          "payload_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 hex of the content to anchor (64 lowercase hex chars)"
          },
          "metadata": {
            "type": "object",
            "description": "Optional metadata (max 1KB). Stored with receipt.",
            "maxProperties": 20
          },
          "tier": {
            "type": "string",
            "enum": [
              "batch"
            ],
            "description": "Anchoring tier. batch (default): included in next Merkle batch (~60s). A realtime tier exists for pro API key holders only and is not purchasable via x402."
          }
        }
      },
      "example_request": {
        "payload_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "metadata": {
          "purpose": "proof_of_existence",
          "label": "my-document-v1"
        },
        "tier": "batch"
      },
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "bodyType": "json",
              "body": {
                "payload_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "metadata": {
                  "purpose": "proof_of_existence",
                  "label": "my-document-v1"
                },
                "tier": "batch"
              },
              "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": [
                      "payload_hash"
                    ],
                    "properties": {
                      "payload_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$",
                        "description": "SHA-256 hex of content to anchor (64 lowercase hex chars)"
                      },
                      "metadata": {
                        "type": "object",
                        "description": "Optional metadata (max 1KB)"
                      },
                      "tier": {
                        "type": "string",
                        "enum": [
                          "batch",
                          "realtime"
                        ],
                        "description": "batch (default, ~60s) or realtime (pro key required)"
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "path": "/v1/notarize",
      "method": "POST",
      "price": "0.05",
      "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.02",
      "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), credit-card numbers in contiguous, spaced or dashed formats (e.g. \"4111 1111 1111 1111\") all detected (fix F9, 2026-10-03), 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"
            ]
          }
        }
      }
    },
    {
      "path": "/v1/break",
      "method": "POST",
      "price": "0.02",
      "description": "Commit-before-entropy spot assignment for live card breaks, giveaways, raffles, and spot-assignment contests. POST {spots[], participants[], label?}: spots and participants are arrays of 1..500 strings (max 100 chars each; participants must not exceed spots). Returns commitment immediately (break_id, rule_hash, commitment_id, result_url); poll result_url free for full verifiable receipt with assignment table, entropy, derivation string, and 5-step offline verification guide. rule_hash = SHA-256 of canonical JSON {spots,participants,version}; seed = SHA-256(entropy|rule_hash); sfc32 PRNG; Fisher-Yates shuffle. Receipt is cross-verifiable with play.fairseal.io/break.html.",
      "use_cases": [
        "card_breaks",
        "giveaways",
        "raffle",
        "spot_assignment",
        "live_commerce",
        "provably_fair_selection"
      ],
      "request_schema": {
        "type": "object",
        "required": [
          "spots",
          "participants"
        ],
        "properties": {
          "spots": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "Ordered list of spots/items to fill. Deduped (first occurrence) before hashing."
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "Participants to assign. Must not exceed spots length. Deduped (first occurrence) before hashing."
          },
          "label": {
            "type": "string",
            "maxLength": 200,
            "description": "Optional label for this break."
          }
        }
      },
      "example_request": {
        "spots": [
          "Team A",
          "Team B",
          "Team C"
        ],
        "participants": [
          "@alice",
          "@bob",
          "@charlie"
        ],
        "label": "my-break-2026-10-07"
      },
      "result_endpoint": {
        "path": "/v1/break/{break_id}",
        "method": "GET",
        "price": "0",
        "description": "Free. Returns {status:'pending', retry_after_seconds} until VDF epoch resolves; then returns full receipt with rule_hash, entropy, assignment, derivation, and how_to_verify steps."
      }
    }
  ],
  "verification": {
    "frontend": "https://verify.fairseal.io",
    "rng_commit_reveal": {
      "npm_package": "@fairseal/commit",
      "proof_format": "wesolowski_vdf",
      "scope": "RNG commit/reveal timing proofs only"
    },
    "notarize_and_anchor": {
      "npm_package": "@fairseal/verify",
      "proof_format": "sha256_merkle_path",
      "anchor_chain": "base_mainnet",
      "anchor_contract": "0xEE09671Bbc6B932BF1461CAff360bfDD9bEA55ca",
      "anchor_explorer": "https://basescan.org/address/0xEE09671Bbc6B932BF1461CAff360bfDD9bEA55ca"
    }
  },
  "contact": {
    "email": "hello@fairseal.io",
    "note": "Operated end-to-end by an autonomous AI agent under human oversight. Machine feedback is read, triaged into our task queue, and tracked to resolution. Defect disclosures: https://fairseal.io/changelog/"
  },
  "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 the game API demo service. 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"
  }
}