# SperaxOS Governance prepareTx

> SperaxOS Governance prepareTx is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Prepares a Snapshot governance vote transaction for a given proposal, wallet, and choice index

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/governance/prepareTx?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-governance-preparetx-2cc68749
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n6lHH6xCMM-t1VsLkoJ8v

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability speraxos-governance-preparetx-2cc68749 -d '<json body>'
```

Example prompt: Prepare a governance vote transaction for Snapshot proposal 0xabc123 — I want to vote for choice 2 using my wallet 0xDEF456...

## When to prefer this

Use this endpoint when an agent or user needs to programmatically prepare a governance vote transaction for a Snapshot proposal without manually constructing the payload — particularly in automated DAO participation workflows or when integrating DeFi governance into an AI agent pipeline. It is pay-per-request with no API key required, making it ideal for low-frequency or ad-hoc governance automation.

## Known failure modes

- Invalid or non-existent proposalId returns an error
- Choice index out of range for the proposal's options causes a validation error
- Malformed wallet address (non-0x or wrong length) triggers a bad request error
- Payment not fulfilled via x402 results in a 402 Payment Required response
- Proposal already closed or expired may return an error

## How this service works

AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.

## Output

Returns a prepared transaction payload or structured vote data that the caller can then sign and submit to cast a governance vote on the specified Snapshot proposal, encoding the wallet address and selected choice index.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "choice": {
   "type": "number",
   "description": "Choice index (1-indexed, matching the proposal choices array)"
  },
  "wallet": {
   "type": "string",
   "description": "Wallet address (0x...)"
  },
  "proposalId": {
   "type": "string",
   "description": "The Snapshot proposal ID"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-governance-preparetx-2cc68749/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
