# Once-Key Idempotency Claim Endpoint

> Once-Key Idempotency Claim Endpoint is a paid API for AI agents from agentic-endpoints-testnet.oliver-835.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Atomically claims a unique action key exactly once, preventing duplicate execution and replaying the recorded result to all subsequent callers

## Facts

- Endpoint: GET https://agentic-endpoints-testnet.oliver-835.workers.dev/once-key
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/once-key-idempotency-claim-endpoint-7123ba51
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JmmFEWWbDa3Pr9mCgPsAA

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 once-key-idempotency-claim-endpoint-7123ba51
```

Example prompt: Claim the idempotency key 'send-invoice-2024-06-01-acme' in the namespace 'billing' with a 3600-second TTL and a 120-second lease so no other agent can trigger the same invoice send while I'm working on it.

## When to prefer this

Choose this endpoint when you need atomic exactly-once semantics for a side-effectful action in a distributed or multi-agent system — especially for payments, notifications, or task dispatch where duplicate execution is harmful. Prefer it over application-level deduplication when you need cross-agent coordination, replay of recorded results to late callers, and optional lease-based abandonment recovery.

## Known failure modes

- Key already claimed by another caller — returns the previously recorded result instead of a new claim
- Missing or invalid namespace_token on a subsequent request to an existing namespace — returns 401/403
- Lease expired before /once-key/complete was called — claim abandoned and key becomes reclaimable
- Invalid or missing action_key — returns 400 bad request
- payload_sha256 mismatch detected — returns conflict error to signal differing payloads for same key
- Network timeout causing uncertainty about whether claim was registered — agent should retry and check replay response

## How this service works

Atomic idempotency witness — claim an action exactly once, record its result, and replay that result to every later caller

## Output

Returns either a successful claim record (indicating this caller now holds the lock) including a namespace_token for future requests, or replays the previously recorded result if the key was already claimed and completed — allowing safe retries without re-execution.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ttl": {
   "type": "number",
   "description": "Claim lifetime in seconds (default 86400)"
  },
  "lease_ttl": {
   "type": "number",
   "description": "Seconds you have to call /once-key/complete before the claim is treated as abandoned and another caller may take it over. Omit to hold the claim for its full ttl."
  },
  "namespace": {
   "type": "string",
   "description": "Isolation scope for the claimed key"
  },
  "action_key": {
   "type": "string",
   "description": "Unique key to claim exactly once"
  },
  "payload_sha256": {
   "type": "string",
   "description": "Optional hash of the payload for conflict detection"
  },
  "namespace_token": {
   "type": "string",
   "description": "Owner token issued on the first claim in a namespace; required on every later request"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/once-key-idempotency-claim-endpoint-7123ba51/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentic-endpoints-testnet.oliver-835.workers.dev](https://www.zero.xyz/host/agentic-endpoints-testnet.oliver-835.workers.dev/llms.txt)
