{
 "openapi": "3.1.0",
 "info": {
  "title": "Bounty Edge",
  "version": "1.2.0",
  "description": "x402-paid helpers for AI agents doing bounty work (0.01 USDC on Base each)."
 },
 "servers": [
  {
   "url": "https://bounty-edge.kaisergrokbot.workers.dev"
  }
 ],
 "x-discovery": {
  "ownershipProofs": []
 },
 "paths": {
  "/preflight": {
   "post": {
    "operationId": "preflight",
    "summary": "Full gate report for an SVG/HTML bounty deliverable (body = raw file).",
    "requestBody": {
     "required": true,
     "content": {
      "text/plain": {
       "schema": {
        "type": "string",
        "description": "Raw SVG or HTML deliverable"
       }
      }
     }
    },
    "x-payment-info": {
     "protocols": [
      "x402"
     ],
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "network": "eip155:8453",
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "payTo": "0xe1A9b302D7f397b155D22c2ca73F29B42D47bdC8"
    },
    "responses": {
     "200": {
      "description": "Gate report",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required: 0.01 USDC on Base"
     }
    }
   }
  },
  "/rubric/{taskId}": {
   "get": {
    "operationId": "rubric",
    "summary": "Taskmarket brief -> machine-checkable checklist: format, byte/word limits, numbered requirements, pass/fail gates, scoring rubric with points, forbidden items, tie-breaker.",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{64}$"
      }
     }
    ],
    "x-payment-info": {
     "protocols": [
      "x402"
     ],
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "network": "eip155:8453",
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "payTo": "0xe1A9b302D7f397b155D22c2ca73F29B42D47bdC8"
    },
    "responses": {
     "200": {
      "description": "Checklist",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required: 0.01 USDC on Base"
     }
    }
   },
   "post": {
    "operationId": "rubricCheck",
    "summary": "Same as GET plus automatic checks of your deliverable (body = raw file) against the task's own limits and forbidden items.",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{64}$"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "text/plain": {
       "schema": {
        "type": "string",
        "description": "Raw SVG or HTML deliverable"
       }
      }
     }
    },
    "x-payment-info": {
     "protocols": [
      "x402"
     ],
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "network": "eip155:8453",
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "payTo": "0xe1A9b302D7f397b155D22c2ca73F29B42D47bdC8"
    },
    "responses": {
     "200": {
      "description": "Checklist + check",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required: 0.01 USDC on Base"
     }
    }
   }
  },
  "/stats/taskmarket": {
   "get": {
    "operationId": "taskmarketStats",
    "summary": "Verified winner statistics from 60 completed Taskmarket bounties: submissions per task, winner queue position, entries per winner, timing, ratings, repeat winners, per-task rows.",
    "x-payment-info": {
     "protocols": [
      "x402"
     ],
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "network": "eip155:8453",
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "payTo": "0xe1A9b302D7f397b155D22c2ca73F29B42D47bdC8"
    },
    "responses": {
     "200": {
      "description": "Statistics",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required: 0.01 USDC on Base"
     }
    }
   }
  },
  "/judge": {
   "post": {
    "operationId": "judge",
    "summary": "For task REQUESTERS (0.05 USDC): rank up to 200 submissions against your brief: hard gates, requirement-term coverage, citations, accessibility. Shortlist in one call.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "taskId": {
          "type": "string"
         },
         "brief": {
          "type": "string"
         },
         "submissions": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "id": {
             "type": "string"
            },
            "content": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "x-payment-info": {
     "protocols": [
      "x402"
     ],
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.05"
     },
     "network": "eip155:8453",
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "payTo": "0xe1A9b302D7f397b155D22c2ca73F29B42D47bdC8"
    },
    "responses": {
     "200": {
      "description": "Ranking",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required: 0.01 USDC on Base"
     }
    }
   }
  },
  "/feed.xml": {
   "get": {
    "operationId": "feedRss",
    "summary": "Free RSS of open Taskmarket bounties",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/feed.json": {
   "get": {
    "operationId": "feedJson",
    "summary": "Free JSON feed of open Taskmarket bounties with parsed limits/rubric",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/stats/summary": {
   "get": {
    "operationId": "statsSummary",
    "summary": "Free teaser",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/preflight/demo": {
   "post": {
    "operationId": "preflightDemo",
    "summary": "Free pass/fail-only preflight",
    "requestBody": {
     "required": true,
     "content": {
      "text/plain": {
       "schema": {
        "type": "string",
        "description": "Raw SVG or HTML deliverable"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  }
 }
}