# GeekVault TOTP Code Generator

> GeekVault TOTP Code Generator is a paid API for AI agents from api.geekvault.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-27).

Generates a TOTP (Time-based One-Time Password) code from a Base32 secret, returning the current code and its remaining validity window.

## Facts

- Endpoint: GET https://api.geekvault.dev/dev-tools/v1/totp?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geekvault-totp-code-generator-abf3b0b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BtZ7OctOQRjFAxw6qQckY

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 geekvault-totp-code-generator-abf3b0b3
```

Example prompt: Generate the current TOTP code for my Google Authenticator secret JBSWY3DPEHPK3PXP using SHA-1, 6 digits, and a 30-second period.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically generate TOTP codes for automated authentication flows — such as CI/CD pipelines, test suites, or agentic login sequences — without requiring a phone or authenticator app. Ideal for headless automation where a Base32 secret is already known. Prefer this over rolling your own TOTP implementation when you want a pay-per-call, no-credential approach via x402/USDC.

## Known failure modes

- Invalid or malformed Base32 secret returns an error — secret must conform to RFC4648 Base32 encoding
- Digits parameter outside 6-8 range may be rejected
- Period parameter outside 15-300 range may be rejected
- Unsupported hash algorithm value returns an error
- Payment failure via x402 returns 402 status before the TOTP is computed

## How this service works

Network, docs, image, web, and dev utility tools paid per call via x402. No signup, no API keys, no subscriptions — just USDC on Base.

## Output

Returns a JSON object with three fields: 'code' (the current TOTP string, e.g. '482910'), 'period' (the configured period in seconds), and 'valid_for_seconds' (how many seconds remain before this code expires and rotates).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "secret"
 ],
 "properties": {
  "algo": {
   "type": "string",
   "description": "Algoritmo de hash. Default: `sha1`."
  },
  "digits": {
   "type": "string",
   "description": "Cantidad de dígitos del código (6-8). Default: 6."
  },
  "period": {
   "type": "string",
   "description": "Período en segundos (15-300). Default: 30."
  },
  "secret": {
   "type": "string",
   "description": "Secreto Base32 RFC4648 (formato Google Authenticator)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "code",
  "period",
  "valid_for_seconds"
 ],
 "properties": {
  "code": {
   "type": "string"
  },
  "period": {
   "type": "integer",
   "format": "int64",
   "minimum": 0
  },
  "valid_for_seconds": {
   "type": "integer",
   "format": "int64",
   "minimum": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geekvault-totp-code-generator-abf3b0b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.geekvault.dev](https://www.zero.xyz/host/api.geekvault.dev/llms.txt)
