Zero Data RetentionQuantum-Ready Entropy256-bit MinimumClient-Side OnlyPost-Quantum ReadyZero KnowledgeNIST SP 800-63BFIPS 140-3 AlignedNo Account NeededDoD CompliantZero Data RetentionQuantum-Ready Entropy256-bit MinimumClient-Side OnlyPost-Quantum ReadyZero KnowledgeNIST SP 800-63BFIPS 140-3 AlignedNo Account NeededDoD Compliant
REST API · v1

PassGeni API
Documentation.

Generate cryptographically secure, compliance-ready passwords programmatically. One endpoint. JSON in, passwords out. No setup beyond an API key.

Base URL
https://passgeni.ai/api/v1
Auth
API key in body
Format
JSON
Free tier
50 calls/day

Overview

The PassGeni API lets you generate secure passwords at scale — in your backend, during user onboarding, for credential rotation, or any programmatic use case. One endpoint. No SDK required.

The free tier gives you 50 calls per day with no API key. The Team plan ($29/month) gives you 5,000 calls/day, all compliance presets, and bulk generation up to 500 passwords per request.

Authentication

Pass your API key in the request body as apiKey. No Authorization header required. Free tier requests work without any key.

Example — authenticated request
curl -X POST https://passgeni.ai/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey":     "pg_live_your_key_here",
    "profession": "developer",
    "length":     20,
    "count":      5
  }'

⚠️ Never expose your API key in client-side code or public repositories. Use environment variables. API keys can be rotated from your dashboard at any time.

Rate Limits

TierCalls / dayMax count per requestCompliance presets
Free (no key)50 / day10
Team5,000 / day500All

Rate limit headers are returned on every response:

Rate limit headers
X-RateLimit-Limit:     5000
X-RateLimit-Remaining: 4997
X-RateLimit-Reset:     1704067200000

POST /v1/generate

POSThttps://passgeni.ai/api/v1/generate

Generates one or more secure passwords. All parameters are optional — sensible defaults apply. Returns a JSON object containing the generated passwords plus audit metadata.

Request Parameters

ParameterTypeDefaultDescription
apiKeystringnullYour Team API key. Omit for free tier (50 calls/day).
professionstring"general"Influences password seed. Options: "developer", "doctor", "finance", "designer", "legal", "educator", or any custom string.
lengthnumber18Password length. Range: 8–32. Compliance presets may enforce a higher minimum.
countnumber1Number of passwords to generate. Free: max 10. Team: max 500.
compliancestringnullCompliance preset. Options: "hipaa", "pci", "soc2", "iso", "nist", "dod". Team plan only.
modestring"password"Generation mode. "password" or "passphrase".
quantumbooleanfalseEnable post-quantum mode. Sets minimum length 20, expands symbol set.

Response Schema

200 OK — success response
{
  "passwords":  ["nX9#kT2@mP5!qR8$vZ3", "Bz7!deploy#K3@stack"],
  "count":      2,
  "entropy":    131,
  "length":     20,
  "compliance": null,
  "mode":       "password",
  "quantum":    false,
  "tier":       "team",
  "generated":  "2025-01-15T14:23:11.442Z",
  "audit": {
    "entropySource":  "Node.js crypto.randomInt() — FIPS 140-3 aligned",
    "characterPool":  "lower+upper+numbers+symbols",
    "clientSide":     false,
    "serverContact":  true,
    "note":           "API generation is server-side. For zero-knowledge generation, use the web tool at passgeni.ai"
  }
}

Error Codes

StatusErrorCause
400Bad requestMalformed JSON or invalid parameter types
405Method not allowedOnly POST is accepted
429Rate limit exceededToo many requests. Check X-RateLimit-Reset
500Generation failedInternal error — try again or contact support
429 rate limit response
{
  "error":   "Rate limit exceeded",
  "limit":   50,
  "resetAt": "2025-01-15T15:00:00.000Z",
  "upgrade": "Upgrade to Team for 5,000 calls/day — passgeni.ai/api"
}

Code Examples

cURL

cURL — basic
# Free tier — no API key needed
curl -X POST https://passgeni.ai/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{"profession": "developer", "length": 18, "count": 3}'
cURL — Team with compliance preset
curl -X POST https://passgeni.ai/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey":     "pg_live_your_key_here",
    "profession": "doctor",
    "length":     18,
    "compliance": "hipaa",
    "count":      10
  }'

JavaScript / Node.js

Node.js — async/await
const response = await fetch("https://passgeni.ai/api/v1/generate", {
  method:  "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    apiKey:     process.env.PASSGENI_API_KEY,
    profession: "developer",
    length:     20,
    count:      5,
    compliance: "soc2",
  }),
});

const { passwords, entropy, tier } = await response.json();
// passwords: ["Bz7!deploy#K3@stack", ...]
// entropy:   131
// tier:      "team"

Python

Python — requests
import requests, os

response = requests.post(
    "https://passgeni.ai/api/v1/generate",
    json={
        "apiKey":     os.environ["PASSGENI_API_KEY"],
        "profession": "developer",
        "length":     20,
        "count":      5,
        "compliance": "soc2",
    }
)

data      = response.json()
passwords = data["passwords"]
print(f"Generated {len(passwords)} passwords, entropy: {data['entropy']} bits")

PHP

PHP — cURL
$response = file_get_contents("https://passgeni.ai/api/v1/generate", false,
  stream_context_create([
    "http" => [
      "method"  => "POST",
      "header"  => "Content-Type: application/json",
      "content" => json_encode([
        "apiKey"     => getenv("PASSGENI_API_KEY"),
        "profession" => "developer",
        "length"     => 20,
        "count"      => 5,
      ]),
    ],
  ])
);

$data = json_decode($response, true);
$passwords = $data["passwords"]; // array of password strings

Live Tester

Try the API directly from this page. The free tier works without an API key.

LIVE API TESTER

Pricing & Limits

Free
$0
50 API calls / day
Max 10 per request
No API key needed
Password mode only
No compliance presets
14-day free trial
Team
$29/mo
5,000 API calls / day
Max 500 per request
All compliance presets
Password + passphrase
Post-quantum mode
5 team seats
CSV export

Questions? Email hello@passgeni.ai. We reply within 24 hours.