# Agent Rest Stop – Idempotency Key Generator

> Agent Rest Stop – Idempotency Key Generator is a paid API for AI agents from agent-gas-station.agent-gas-station.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Generates and returns a stable idempotency key for a given buyer+resource pair, valid for 24 hours.

## Facts

- Endpoint: POST https://agent-gas-station.agent-gas-station.workers.dev/v1/IdempotencyKey?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-rest-stop-idempotency-key-generator-28f5db54
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Td_GsDpnqile3bybtw_F_

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 agent-rest-stop-idempotency-key-generator-28f5db54 -d '<json body>'
```

Example prompt: Give me an idempotency key for buyer 'usr_abc123' and resource 'order_789' — I need it to stay consistent for the next 24 hours so I can safely retry this payment without duplicating it.

## When to prefer this

Use this endpoint when you need a deterministic, time-bounded idempotency key for a specific buyer+resource pair — especially before executing payments, mutations, or any operation where duplicate execution would be harmful. Prefer it over generating your own UUID when you want guaranteed consistency across retries within a 24-hour window.

## Known failure modes

- Missing buyer_id or resource_id returns a 400 Bad Request
- Payment failure (insufficient USDC balance) returns 402 Payment Required
- Internal server error if key store is unavailable returns 500
- Key expiry after 24 hours means a new key will be issued on next call

## How this service works

The same key for 24 hours.

## Output

Returns a stable idempotency key string tied to the provided buyer_id and resource_id combination, guaranteed to remain the same for 24 hours, enabling safe retries and deduplication of operations.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "buyer_id": {
   "type": "string"
  },
  "resource_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-rest-stop-idempotency-key-generator-28f5db54/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-gas-station.agent-gas-station.workers.dev](https://www.zero.xyz/host/agent-gas-station.agent-gas-station.workers.dev/llms.txt)
