# PBKDF2 Key Derivation API

> PBKDF2 Key Derivation API is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-14).

Derives a cryptographic key from a password using PBKDF2 with configurable iterations, salt, and hash algorithm

## Facts

- Endpoint: GET https://api.x402node.dev/crypto/pbkdf2
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-66421d99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S2cQw88Gi2ebtuj2kc00T

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 api-x402node-dev-66421d99
```

Example prompt: Derive a 256-bit encryption key from the password 'MyS3cretPass!' using PBKDF2 with SHA-256, a salt of 'randomsalt123', and 100000 iterations.

## When to prefer this

Use this endpoint when you need PBKDF2-based key derivation or password stretching in a serverless/agent context without running local crypto libraries. Prefer this over generic hash endpoints when you need iterated key derivation (not just a single hash), configurable salt, and tunable work factor for security. Good for deriving AES keys from passphrases or storing password-derived keys.

## Known failure modes

- Missing required fields (password or salt) returns 400 Bad Request
- Invalid hash algorithm name returns 400 with unsupported algorithm error
- Iteration count too low or zero returns validation error
- Key length out of supported range returns error
- Payment not provided or insufficient USDC returns 402 Payment Required
- Server-side computation timeout for extremely high iteration counts

## How this service works

PBKDF2 key derivation, password hashing, KDF, scrypt alternative, stretch password, derive encryption key, password-based key derivation, iterations, salt. Derive a cryptographic key from a password using PBKDF2 with configurable iterations, salt, and hash algorithm. Accepts payment on Base or Solana — either network works.

## Output

Returns a derived cryptographic key (typically hex-encoded) computed via PBKDF2 using the provided password, salt, iteration count, and hash algorithm — suitable for use as an encryption key or secure password hash.

## Example request

```json
{
 "salt": "randomsalt123",
 "password": "TestPassword123!",
 "keyLength": 32,
 "iterations": 100000,
 "hashAlgorithm": "sha256"
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "password"
     ],
     "properties": {
      "algo": {
       "type": "string",
       "description": "Algo (optional)"
      },
      "salt": {
       "type": "string",
       "description": "Salt (optional)"
      },
      "keylen": {
       "type": "string",
       "description": "Keylen (optional)"
      },
      "password": {
       "type": "string",
       "description": "Password (required)"
      },
      "iterations": {
       "type": "string",
       "description": "Iterations (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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