Bastion is a password audit API. It evaluates passwords and returns strength scores, crack time estimates, entropy, and real breach data.
The base URL for the native API is:
https://bastion.eande171.workers.dev
Free tier access
Native keys are for the free tier. They allow you to use all endpoints with a limit of 100 requests per day. If you need higher limits, use the RapidAPI listing.
Your first request
Register for a native key using your email. The email is hashed immediately before storage and is only used if you need to regenerate your key. You can also register here.
Native API keys must be passed in the Authorization header using the Bearer scheme:
Authorization: Bearer bsn_live_...
Prefix
Purpose
bsn_live_
Live API key - used for authenticated requests
bsn_regen_
Regeneration token - used to issue a new key if one is compromised
If you're accessing Bastion via RapidAPI, authentication is handled automatically by RapidAPI's proxy. You do not need to set an Authorization header.
Endpoints
Endpoint reference
POST/v1/evaluate
๐ Requires authentication
Evaluates a password and returns a full audit result including strength score, crack times, entropy, breach status, and feedback.
Query parameters
Parameter
Type
Default
Description
hibp
string
true
Set to false to skip the HaveIBeenPwned breach check. breached and breach_count will be null in the response.
Request body
{
"password": "hunter2"
}
Response
{
"score": 1,
"strength": "Weak",
"entropy_bits": 12.972441366563533,
"crack_times": {
"online_throttled": "3 days",
"online_unthrottled": "13 minutes",
"offline_slow_hash": "less than a second",
"offline_fast_hash": "less than a second"
},
"breached": true,
"breach_count": 65744,
"warning": "This is a very common password.",
"suggestions": ["Add another word or two. Uncommon words are better."]
}
Field
Description
score
0 (Very Weak) to 4 (Very Strong)
strength
Human-readable label corresponding to the score
entropy_bits
Password entropy in bits
crack_times
Estimated time to crack under four attack scenarios - throttled online, unthrottled online, slow offline hash, and fast offline hash
breached
Whether the password appears in known breaches. null if hibp=false
breach_count
Number of times seen in known breaches. null if hibp=false
warning
A specific weakness warning, or null for stronger passwords
suggestions
Improvement suggestions, or null for stronger passwords
POST/v1/keys/register
No authentication required
Registers a new API key. Each email address can only be registered once. The email is hashed immediately before storage.
reset_at is a Unix timestamp in milliseconds. hard_limit is null if no hard cap has been set.
Note: hard_limit is only applicable to paid tiers using native keys (which don't currently exist).The endpoint to alter hard_limit does exist but is not publicly documented.
Reference
Error reference
All errors return a JSON body with an appropriate HTTP status code. Handle them using res.json(). The error field is a stable machine-readable code; the message field is human-readable.
Error Code
Status
Message
MISSING_AUTH_HEADER
401
No Authorization header provided.
INVALID_AUTH_HEADER
401
Authorization header is not in the correct format.