# OpenVerbs HOTP Generator

> OpenVerbs HOTP Generator is a paid API for AI agents from otp.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Generates an RFC 4226 counter-based HMAC one-time password (HOTP) from a base32 secret and counter value

## Facts

- Endpoint: POST https://otp.openverbs.com/v1/hotp
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openverbs-hotp-generator-0a250615
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L8SbyHaKTYKTkxAngMkGZ

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 openverbs-hotp-generator-0a250615 -d '<json body>'
```

Example prompt: Generate an RFC 4226 counter-based one-time password using my base32 secret JBSWY3DPEHPK3PXP and counter value 7, with 8 digits and SHA256.

## When to prefer this

Choose this endpoint when you need RFC 4226-compliant HOTP codes (counter-based, not time-based). Prefer it over TOTP when the consuming system uses a counter that you control (e.g. hardware tokens, offline OTP sequences, or deterministic test vectors). If you need time-based codes, use the sibling TOTP endpoint instead.

## Known failure modes

- Invalid or malformed base32 secret returns HTTP 400
- Counter value below 0 is rejected
- Digit count outside 6–10 range is rejected
- Unsupported algorithm value returns validation error
- Missing required fields (secret or counter) returns error

## How this service works

Generate an RFC 4226 counter-based HMAC one-time password from a base32 secret and counter. Configurable digits (6–10, default 6) and algorithm (SHA1/SHA256/SHA512, default SHA1). An invalid base32 secret is a clean 400.

## Output

Returns the computed HOTP code as a string of digits (6–10 digits depending on configuration), derived via HMAC using the specified algorithm applied to the counter and secret. Invalid base32 secrets return a 400 error.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "secret",
      "counter"
     ],
     "properties": {
      "digits": {
       "type": "integer",
       "maximum": 10,
       "minimum": 6,
       "description": "Number of code digits. Default 6."
      },
      "secret": {
       "type": "string",
       "maxLength": 1024,
       "minLength": 1,
       "description": "Base32-encoded shared secret."
      },
      "counter": {
       "type": "integer",
       "minimum": 0,
       "description": "The HOTP counter value."
      },
      "algorithm": {
       "enum": [
        "SHA1",
        "SHA256",
        "SHA512"
       ],
       "type": "string",
       "description": "HMAC algorithm. Default SHA1."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openverbs-hotp-generator-0a250615/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from otp.openverbs.com](https://www.zero.xyz/host/otp.openverbs.com/llms.txt)
