# Pyfile Toolkit: Provably-Fair Winner Selection

> Pyfile Toolkit: Provably-Fair Winner Selection is a paid API for AI agents from pyfile-agent.taile3ff35.ts.net:10000, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Selects a provably-fair winner from a comma-separated list of candidates using a committed server seed and client-supplied entropy

## Facts

- Endpoint: GET https://pyfile-agent.taile3ff35.ts.net:10000/data/fair/pick
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pyfile-toolkit-provably-fair-winner-selection-630d69c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3gXb-s4Nr7b7YIIQ_x17s

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 pyfile-toolkit-provably-fair-winner-selection-630d69c9
```

Example prompt: Pick a provably-fair winner from this list of contestants: Alice, Bob, Carol, Dave — use round 1, client seed 'myseed2024', and nonce 1.

## When to prefer this

Use this endpoint when you need cryptographically verifiable, auditable random selection from a discrete set of named candidates — especially for giveaways, raffles, or contests where participants need proof the draw was not manipulated. Prefer this over a simple random number generator when auditability and a provable commit-reveal scheme matter. Use the companion commit endpoint first if you want to publish the server seed hash before drawing.

## Known failure modes

- Missing or empty candidates parameter returns an error
- Invalid or malformed candidates list may produce unexpected results
- Round ID or nonce mismatch prevents verification against a prior commit
- Payment failure (402) if x402 micropayment is not included or insufficient
- Network timeout if the endpoint is unreachable on the Tailscale network

## How this service works

Provably-fair winner selection from a comma-separated list. ?candidates=a,b,c&round=1&client_seed=s&nonce=1

## Output

Returns the selected winner's name, their zero-based index in the candidate list, the total number of candidates, a round ID, a commit hash (sha256 of the server seed before the draw), and a verify hash so anyone can independently confirm the draw was not manipulated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "commit": {
     "type": "string"
    },
    "verify": {
     "type": "string"
    },
    "winner": {
     "type": "string"
    },
    "round_id": {
     "type": "string"
    },
    "winner_index": {
     "type": "integer"
    },
    "candidates_count": {
     "type": "integer"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pyfile-toolkit-provably-fair-winner-selection-630d69c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pyfile-agent.taile3ff35.ts.net:10000](https://www.zero.xyz/host/pyfile-agent.taile3ff35.ts.net%3A10000/llms.txt)
