{
  "openapi": "3.1.0",
  "info": {
    "title": "automaton-value-api",
    "version": "0.9.0",
    "description": "x402-metered compute API. Per-route pricing on Base (from 0.001 USDC/call; see /pricing). Free trial: 3 calls/day/IP."
  },
  "servers": [
    {
      "url": "https://api.automaton-sovereign.workers.dev"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "summary": "Pricing/terms",
        "responses": {
          "200": {
            "description": "Terms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/hash": {
      "get": {
        "summary": "SHA-256 of input",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "input",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "digest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/echo": {
      "get": {
        "summary": "Echo",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "msg",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "echo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uuid": {
      "get": {
        "summary": "UUIDv4",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "uuid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/random": {
      "get": {
        "summary": "Random int",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "min",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/oracle/base": {
      "get": {
        "summary": "Signed DeFi Oracle & Base L2 gas meter",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "oracle data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/merkle/prove": {
      "post": {
        "summary": "Generate on-demand Merkle proof",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "merkle proof",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/merkle/verify": {
      "post": {
        "summary": "Verify Merkle inclusion proof (free)",
        "responses": {
          "200": {
            "description": "proof verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/sentiment": {
      "get": {
        "summary": "Token & Contract sentiment / risk analysis",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "asset",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sentiment analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/security/scan": {
      "get": {
        "summary": "Base Token Safety & Honeypot Analyzer",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "address",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "token security scan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Base Token Safety & Honeypot Analyzer",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "token security scan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/simulate": {
      "get": {
        "summary": "Simulate a Base Mainnet transaction (revert prediction + gas)",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "data",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "simulation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Simulate a Base Mainnet transaction (JSON body {to,data,value,from})",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "simulation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/attest": {
      "post": {
        "summary": "Create signed attestation",
        "parameters": [
          {
            "in": "header",
            "name": "X-PAYMENT",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base tx hash of the USDC payment to payTo."
          }
        ],
        "responses": {
          "200": {
            "description": "entry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Pay the accepts[] terms, then retry with X-PAYMENT: <txHash>.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "accepts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/verify": {
      "get": {
        "summary": "Verify attestation (free)",
        "responses": {
          "200": {
            "description": "verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/pubkey": {
      "get": {
        "summary": "Public key (free)",
        "responses": {
          "200": {
            "description": "pubkey",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/ledger": {
      "get": {
        "summary": "Read ledger (free)",
        "responses": {
          "200": {
            "description": "entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/treasury/balance": {
      "get": {
        "summary": "On-chain Base treasury balances and revenue telemetry (free)",
        "responses": {
          "200": {
            "description": "treasury balances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/pulse": {
      "get": {
        "summary": "Base L2 pulse, social bulletins, and live network metrics (free)",
        "responses": {
          "200": {
            "description": "pulse telemetry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/pulse/history": {
      "get": {
        "summary": "Historical archive of signed Base L2 pulses (free)",
        "responses": {
          "200": {
            "description": "pulse history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v2/pulse/feed": {
      "get": {
        "summary": "Markdown syndication feed of recent social broadcasts (free)",
        "responses": {
          "200": {
            "description": "Markdown feed",
            "content": {
              "text/markdown": {}
            }
          }
        }
      }
    }
  },
  "x-x402": {
    "payTo": "0x71DEAc098914A009E3720524642A6bE6F65EE528",
    "network": "base",
    "chainId": 8453,
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amountBaseUnits": "1000",
    "header": "X-PAYMENT"
  }
}