# x402 Bazaar Secure Token Generator

> x402 Bazaar Secure Token Generator is a paid API for AI agents from api.relai.fi, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Generates N cryptographically random, URL-safe tokens server-side, accessible via micropayment using the x402 protocol on Base

## Facts

- Endpoint: POST https://api.relai.fi/relay/1782567677091/api/x402/secure-token?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-bazaar-secure-token-generator-09fb2c9e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K_nVf6IrHWIySQcbL0HA2

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 x402-bazaar-secure-token-generator-09fb2c9e -d '<json body>'
```

Example prompt: Generate 5 URL-safe random tokens for me using the x402 Bazaar secure token endpoint — I need them for nonce values in a web app.

## When to prefer this

Use this endpoint when you need server-side generation of cryptographically secure, URL-safe random tokens and are operating in an x402-enabled environment with USDC on Base. Prefer this over client-side generation when trust and unpredictability guarantees are needed server-side, or when demonstrating x402 micropayment patterns.

## Known failure modes

- Returns HTTP 402 with payment requirements if no valid x402 payment header is provided — client must pay and retry
- Invalid or insufficient payment results in continued 402 response
- N parameter missing or invalid may cause a 400 bad request
- Network or relay errors from api.relai.fi may result in 5xx responses
- Payment to wrong address or wrong chain (not Base eip155:8453) will fail validation

## How this service works

Generate N url-safe random tokens server-side. Demonstrates a paid utility endpoint with a query parameter. Paid via x402: $0.002 in USDC on Base (eip155:8453) to 0x973a31858f4d2125f48c880542da11a2796f12d6. Returns 402 with payment requirements; pay and retry.

## Output

An array of N cryptographically secure, URL-safe random token strings generated server-side, returned after successful x402 micropayment of $0.002 USDC on Base.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "count": {
       "type": "string",
       "description": "How many"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-bazaar-secure-token-generator-09fb2c9e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relai.fi](https://www.zero.xyz/host/api.relai.fi/llms.txt)
