Crypto & Security 1 credit COMPUTE

Generate Password API

Generate cryptographically secure random passwords via REST API. Configure length (8–128 chars), character sets (uppercase, lowercase, digits, symbols), and minimum requirements. The API reports entropy bits so you know exactly how strong the generated password is.

Try it live →

How it works

POST your password requirements: length, whether to include uppercase letters, lowercase letters, numbers, and/or symbols. The API uses Node.js crypto.randomBytes() to select characters — not Math.random(). Returns the password and its entropy in bits.

Use cases

API Reference

POST https://slopshop.gg/v1/crypto-password-generate
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Input parameters

ParameterTypeRequiredDescription
input / data string required The input data to hash or process

Example response

{
  "data": {
    "result": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "algorithm": "password-generate"
  },
  "meta": {
    "credits_used": 1,
    "engine": "real",
    "ms": 4
  }
}

Examples

Three real-world scenarios showing how developers use Generate Password in production.

Example 1
New user initial password
Generate a strong default password for a newly created account.
curl -X POST https://slopshop.gg/v1/crypto-password-generate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"length": 16, "uppercase": true, "lowercase": true, "numbers": true, "symbols": false}'
Example 2
High-security admin password
Generate a complex password for an admin or root account.
curl -X POST https://slopshop.gg/v1/crypto-password-generate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"length": 32, "uppercase": true, "lowercase": true, "numbers": true, "symbols": true}'
Example 3
PIN for SMS verification
Generate a 6-digit numeric PIN to send via SMS.
curl -X POST https://slopshop.gg/v1/crypto-password-generate \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"length": 6, "uppercase": false, "lowercase": false, "numbers": true, "symbols": false}'

Code examples

curl

curl -X POST https://slopshop.gg/v1/crypto-password-generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "your data here"}'

Python

import requests

response = requests.post(
    "https://slopshop.gg/v1/crypto-password-generate",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"input": "your data here"}
)
result = response.json()
print(result["data"])

Node.js

const response = await fetch("https://slopshop.gg/v1/crypto-password-generate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);

CLI

# Install the Slopshop CLI
npm install -g slopshop

# Set your API key
export SLOPSHOP_KEY=your_api_key

# Call crypto-password-generate
slop crypto-password-generate '{"input": "your data here"}'

Pricing

Credits per call
1
credits
Cost per call
$0.001
at Starter tier
Tier
COMPUTE
Pure compute

Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 1 credit per call — that's $0.001. See all pricing tiers.

Related APIs in Crypto & Security

View the full API catalog · Try in playground · Documentation