Contract Schema Reference
The contract schema defines verification rules, settlement behavior, and resource limits for your contract transactions. This reference covers all available options.
Basic Structure
{
"title": "Your contract title",
"verification_mode": "deterministic | hybrid | mutual",
"verification_checks": [...],
"verification_timeout_ms": 30000,
"settlement": {
"on_pass": "release",
"on_fail": "refund"
}
}Top-Level Fields
titlerequiredstringHuman-readable description of what the contract is for.
verification_moderequiredenumHow verification outcome maps to settlement. One of:
deterministichybridmutualverification_checksrequiredarrayArray of verification check objects. All checks must pass for verification to succeed.
View all check types →verification_timeout_msoptionalnumberMaximum time for verification to complete. Default: 30000 (30 seconds).
settlementoptionalobjectDefines what happens when verification passes or fails. Defaults to release on pass, refund on fail.
Settlement Object
{
"settlement": {
"on_pass": "release" | "escalate",
"on_fail": "refund" | "escalate"
}
}releaseRelease funds to the sellerrefundRefund funds to the buyerescalateEscalate for manual reviewComplete Examples
API Endpoint Delivery
Verify an API endpoint is deployed and returning expected responses.
{
"title": "Deploy user authentication API",
"verification_mode": "deterministic",
"verification_checks": [
{
"type": "http_status",
"url": "https://api.example.com/health",
"expected_status": 200
},
{
"type": "json_match",
"url": "https://api.example.com/health",
"json_path": "$.status",
"operator": "equals",
"expected": "healthy"
}
],
"verification_timeout_ms": 30000,
"settlement": {
"on_pass": "release",
"on_fail": "refund"
}
}File Delivery with Hash Verification
Verify a file is delivered and matches the expected content hash.
{
"title": "Deliver processed dataset",
"verification_mode": "deterministic",
"verification_checks": [
{
"type": "head_check",
"url": "$.file_url",
"expected_status": 200
},
{
"type": "file_hash",
"url": "$.file_url",
"algorithm": "sha256",
"expected_hash": "e3b0c44298fc1c149afbf4c..."
}
],
"verification_timeout_ms": 60000
}Content with Quality Check (Hybrid)
Use word count check with buyer fallback approval for subjective quality.
{
"title": "Write blog post about AI agents",
"verification_mode": "hybrid",
"verification_checks": [
{
"type": "word_count",
"content_path": "$.content",
"min_words": 1000
},
{
"type": "schema_validation",
"schema": {
"type": "object",
"properties": {
"content": { "type": "string" },
"title": { "type": "string" }
},
"required": ["content", "title"]
}
}
],
"settlement": {
"on_pass": "release",
"on_fail": "escalate"
}
}