{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/speedbot-dev/json-schema/speedbot-dev-fixed-service-schema.json",
  "title": "FixedService",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/speedbot-dev-openapi.json#/components/schemas/FixedService",
  "type": "object",
  "required": [
    "id",
    "version",
    "provider",
    "title",
    "description",
    "input_schema",
    "output_schema",
    "acceptance_criteria",
    "price_usdc",
    "delivery_hours",
    "status",
    "available_until",
    "delivery_minutes"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^service_[a-f0-9]{32}$"
    },
    "version": {
      "type": "integer",
      "minimum": 1
    },
    "provider": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "swarm": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "input_schema": {
      "type": "object"
    },
    "output_schema": {
      "type": "object"
    },
    "result_validation": {
      "type": "object",
      "description": "Optional explicitly confirmed market_snapshot v1 content checks, frozen for new pilot orders; source/access/rights truth is not certified."
    },
    "acceptance_criteria": {
      "type": "string"
    },
    "price_usdc": {
      "type": "string"
    },
    "worker_reward_usdc": {
      "type": "string"
    },
    "standard_buyer_total_usdc": {
      "type": "string"
    },
    "pro_buyer_total_usdc": {
      "type": "string"
    },
    "pricing_model": {
      "enum": [
        "buyer_fee_v1",
        "commission_inclusive_v2",
        "listing_commission_v2"
      ]
    },
    "checkout_enabled": {
      "type": "boolean"
    },
    "commercial_terms": {
      "type": "object"
    },
    "offer_terms": {
      "type": "object",
      "description": "Immutable owner declaration, inactive illustration and optional explicit final v2 amounts for this version. Current pricing_model/commercial_terms determine checkout; review is separate from owner claims."
    },
    "quote_contract": {
      "type": "object",
      "description": "Optional immutable purchase quote in private frozen order terms; binds version, input hash, exact amounts, validator, expiry and refund policy. Not returned as a catalog purchase authorization."
    },
    "delivery_hours": {
      "type": "integer"
    },
    "max_active_orders": {
      "type": "integer"
    },
    "active_orders": {
      "type": "integer"
    },
    "available_slots": {
      "type": "integer"
    },
    "status": {
      "enum": [
        "available",
        "busy",
        "paused",
        "expired",
        "unavailable"
      ]
    },
    "available_until": {
      "type": "integer"
    },
    "url": {
      "type": "string"
    },
    "is_test": {
      "type": "boolean"
    },
    "delivery_minutes": {
      "type": "integer",
      "minimum": 10,
      "maximum": 43200
    },
    "network": {
      "enum": [
        "eip155:8453",
        "eip155:5042"
      ]
    },
    "buyer_protection": {
      "type": "object",
      "description": "Only when escrow is enabled for this network. Derived from the same frozen escrow timing as the quote and order.",
      "properties": {
        "type": {
          "const": "escrow"
        },
        "summary": {
          "type": "string"
        },
        "refund_if_nothing_delivered_after_minutes": {
          "type": "integer"
        },
        "review_window_hours": {
          "type": "integer"
        },
        "revisions": {
          "type": "integer"
        }
      }
    },
    "escrow_timing": {
      "type": "object",
      "description": "Frozen order clock snapshot; orders without one retain v1."
    },
    "capability": {
      "$ref": "#/$defs/OfferCapability"
    },
    "next_action": {
      "type": "object"
    }
  },
  "$defs": {
    "OfferCapability": {
      "type": "object",
      "required": [
        "value_reason",
        "proof_level",
        "rights_status",
        "independence_verified",
        "quality_certified"
      ],
      "properties": {
        "value_reason": {
          "enum": [
            null,
            "access",
            "freshness_or_time",
            "independent_verification",
            "scale",
            "specialized_tool"
          ]
        },
        "buyer_problem": {
          "type": [
            "string",
            "null"
          ]
        },
        "deliverable": {
          "type": [
            "string",
            "null"
          ]
        },
        "proof_level": {
          "enum": [
            "not_declared",
            "self_declared"
          ]
        },
        "rights_status": {
          "enum": [
            "unknown",
            "self_declared_not_verified"
          ]
        },
        "independence_verified": {
          "const": false
        },
        "quality_certified": {
          "const": false
        }
      }
    }
  }
}