# Animica Random Commit (DRNG Commit-Reveal)

> Animica Random Commit (DRNG Commit-Reveal) is a paid API for AI agents from animica.dev, paid per call via x402, $0.001794/call, status unknown (last checked 2026-09-15).

Creates a cryptographic commit-reveal commitment using a decentralized random number generator, returning a commit ID and proof that a secret random draw has occurred without disclosing the result yet.

## Facts

- Endpoint: POST https://animica.dev/x402/random/commit
- Price: $0.001794/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-random-commit-drng-commit-reveal-921199a2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N01CPr_WnWOYOF0dEpis0

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 animica-random-commit-drng-commit-reveal-921199a2 -d '<json body>'
```

Example prompt: Create a random commit on Animica for my lottery round ID 'round-2024-001', bind it with the memo 'jackpot draw round 42', and set it to be revealable after 300 seconds.

## When to prefer this

Choose this endpoint when you need a provably fair, cryptographically attested commit-reveal randomness scheme — particularly for lotteries, games, raffles, or betting rounds where you must prove the random outcome was sealed before participants acted. Prefer this over a simple random number generator when auditability, tamper-resistance, or time-delayed reveal are required. It is especially suitable when you want to bind the commitment to a specific round or bet ID via the request_id field.

## Known failure modes

- Invalid memo length (over 256 chars) — returns 400 Bad Request
- reveal_after_seconds out of range (>604800) — returns 400 or validation error
- Payment not included or insufficient — returns 402 Payment Required
- Service unavailable on animica.dev — returns 503
- Malformed request body — returns 400 with schema error

## How this service works

Commit now, reveal to everyone later: the paid call returns a commitment sha3_256(secret||salt) and a commit id; GET /x402/random/reveal/{commit_id} is FREE, public and idempotent, and discloses the secret, the salt, the raw draw and the node's attestation so anyone — not just the buyer — can check the commitment. Reveal delay 0..604800s. For games, sealed-bid rounds and auditable draws. Trust model, stated plainly: the commitment binds the outcome from the moment you publish it, and the reveal proves the secret came from a node-signed draw — it does NOT prove the operator discarded no draws before committing, so publish the commitment to your players before the round.

## Output

Returns a JSON object containing: a unique commit_id, the cryptographic commitment hash, the algorithm used, a reveal_after Unix timestamp, a reveal_url where the secret will be disclosed after the delay, the source and health status, an attestation proving the draw occurred without disclosing it, and verification/payment metadata. The actual random result is NOT disclosed at this stage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "memo": {
   "type": "string",
   "description": "up to 256 printable ASCII chars, published verbatim at reveal (bind the commitment to your round/bet id)"
  },
  "request_id": {
   "type": "string",
   "description": "your own tag; mixed into the DRNG seed that produced the secret"
  },
  "reveal_after_seconds": {
   "type": "integer",
   "description": "seconds until the free reveal opens, 0..604800 (default 0 = revealable immediately)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-random-commit-drng-commit-reveal-921199a2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
