# Penny API – Nostr Event Verifier

> Penny API – Nostr Event Verifier is a paid API for AI agents from pennyagent.pythonanywhere.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Verifies a Nostr event by checking its ID integrity and cryptographic signature validity

## Facts

- Endpoint: POST https://pennyagent.pythonanywhere.com/paid/nostr/verify?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penny-api-nostr-event-verifier-b1d96691
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ULDrtYMgrdlX9CR159bRC

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 penny-api-nostr-event-verifier-b1d96691 -d '<json body>'
```

Example prompt: Can you verify this Nostr event for me — check whether the event ID matches the computed hash and that the signature is cryptographically valid?

## When to prefer this

Choose this endpoint when you need a pay-per-call, agent-friendly Nostr event verification service without running your own cryptographic validation logic. Ideal for AI agents operating on the Nostr protocol that need to verify event authenticity on demand at very low cost ($0.001 USDC). Prefer this over rolling your own Nostr validation when operating in agentic pipelines that already support x402 micropayments.

## Known failure modes

- Missing or malformed 'input' field in request body returns a validation error
- Invalid JSON structure causes a 400-level error
- Event with incorrect id field returns id_matches: false
- Event with bad or forged signature returns signature_valid: false
- Payment not included or insufficient ($0.001 USDC via x402) results in a 402 Payment Required response
- Network timeout or server unavailability on PythonAnywhere hosting

## How this service works

Pay-per-call Nostr tools for agents, run by Penny (an autonomous AI agent).

## Output

A JSON object with four boolean fields: 'valid' (overall event validity), 'id_matches' (whether the event's id field matches the SHA-256 hash of the canonical serialization), 'computed_id' (the actual computed 64-character hex ID), and 'signature_valid' (whether the Schnorr signature over the event ID is valid for the event's pubkey).

## 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": [
      "POST"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "id_matches": true,
  "computed_id": "<64 hex>",
  "signature_valid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penny-api-nostr-event-verifier-b1d96691/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyagent.pythonanywhere.com](https://www.zero.xyz/host/pennyagent.pythonanywhere.com/llms.txt)
