# Swift Bot Labs Toolbox – Random Value Generator

> Swift Bot Labs Toolbox – Random Value Generator is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Generates cryptographically random bytes, passwords, or PINs with configurable length, count, encoding, and symbol set, returning entropy bits alongside the values

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/random?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-random-value-generator-789c2a8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DS_VS7nnPSERT37sf00Ny

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 swift-bot-labs-toolbox-random-value-generator-789c2a8e
```

Example prompt: Generate 3 strong random passwords, each 20 characters long with symbols included, using the Swift Bot Labs Toolbox random endpoint — pay per call in USDC.

## When to prefer this

Choose this endpoint when you need pay-per-call random value generation without account setup — ideal for agents that need secure passwords, PINs, or raw random bytes on demand with configurable encoding (hex, base64, base58) and no recurring subscription. Prefer over local generation when auditability or a trusted external entropy source matters.

## Known failure modes

- Invalid 'kind' value (not bytes/password/pin) returns validation error
- Invalid 'encoding' value (not hex/base64/base64url/base58) returns validation error
- Non-numeric or out-of-range 'count' or 'length' may return error
- Payment failure via x402 protocol returns 402 status before generation occurs

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok=true, the tool name ('random'), and a result object containing the kind (bytes/password/pin), an array of generated values, and an entropyBits number indicating the strength of randomness.

## 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",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "kind": {
       "enum": [
        "bytes",
        "password",
        "pin"
       ],
       "type": "string"
      },
      "count": {
       "type": "string"
      },
      "length": {
       "type": "string",
       "description": "bytes for kind=bytes, characters otherwise"
      },
      "symbols": {
       "type": "string"
      },
      "encoding": {
       "enum": [
        "hex",
        "base64",
        "base64url",
        "base58"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "random",
  "result": {
   "kind": "password",
   "values": [
    "q7#Vt!pZ2m@Lx9$wR4kE"
   ],
   "entropyBits": 130.1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-random-value-generator-789c2a8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
