API Documentation
Integrate Passly into your applications with our REST API
Base URL
Every request starts from this URL. No key, no sign-up.
120
Requests / 10 min
No key
Public API
v1
API version
…
Response time
Production
https://passly.fr/api/v1Endpoints
Three entry points. Expand one to see its parameters, an example and its response.
Generates one or more secure passwords matching the given criteria.
Parameters
lengthinteger4-128, default: 16Optional
countinteger1-50, default: 1Optional
formatstringrandom, pronounceable, passphraseOptional
lowercasebooleanInclude lowercase letters (default: true)Optional
uppercasebooleanInclude uppercase letters (default: true)Optional
digitsbooleanInclude digits (default: true)Optional
specialbooleanInclude special characters (default: false)Optional
exclude_similarbooleanExclude ambiguous characters (default: false)Optional
exclude_customstringExtra characters to exclude (≤ 256)Optional
capitalizebooleanPronounceable: capitalise each syllable (default: true)Optional
include_numbersbooleanPronounceable: append digits (default: true)Optional
wordsintegerPassphrases: 3-10Optional
separatorstringPassphrases: word separator (≤ 8)Optional
Request example
curl -X POST https://passly.fr/api/v1/generate \
-H "Content-Type: application/json" \
-d '{
"length": 20,
"count": 3,
"special": true,
"exclude_similar": true
}'Response
200 OK
{
"success": true,
"data": {
"passwords": [
"K9#mP2$xQr5@nW8&zF3v",
"T4*bN7^gH6%jL3!qR9@m",
"X5&cV8#nB2$kM4@pZ7*w"
],
"entropy_bits": 131.09,
"strength": "very_strong",
"metadata": {
"format": "random",
"length": 20,
"charset_size": 88,
"possible_combinations": 1.7690923e+38,
"possible_combinations_log10": 38.248
},
"crack_time": {
"seconds": 8.8454615e+25,
"formatted": "billions of years",
"unit": "billion_years",
"value": null,
"assumptions": "1e+12 guesses/second"
},
"generated_at": "2026-01-15T10:30:45.000Z",
"locale": "fr",
"api_version": "v1"
}
}Rate limiting
A per-IP quota protects the service. The headers tell you where you stand.
Limit per IP
120 requests every 10 minutes
Response headers
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Error 429
Returned when the limit is reached. The Retry-After header indicates how long to wait.
Error codes
Every error returns JSON with a constant shape and an actionable code.
400Bad Request
Invalid or missing parameters
{
"error": true,
"message": "Length must be between 4 and 128 characters",
"code": "invalid_length"
}429Too Many Requests
Rate limit exceeded
{
"error": true,
"message": "Rate limit reached. Please wait 234 seconds",
"retry_after": 234,
"reset_at": "2026-01-15T10:35:00.000Z"
}500Internal Server Error
Internal server error
{
"error": true,
"message": "An error occurred. Please try again."
}503Service Unavailable
Service under maintenance
{
"error": true,
"message": "The site is currently under maintenance. Please try again in a few minutes."
}Codes returned in the code field
invalid_lengthinvalid_countinvalid_formatinvalid_wordsno_charsetempty_wordlist
Integration examples
The same call, in the language of your choice. Copy, paste, adapt.
// PasslyClient.js
class PasslyClient {
constructor(baseURL = 'https://passly.fr/api/v1') {
this.baseURL = baseURL;
}
async generatePassword(options = {}) {
const response = await fetch(`${this.baseURL}/generate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
length: options.length || 16,
count: options.count || 1,
lowercase: options.lowercase !== false,
uppercase: options.uppercase !== false,
digits: options.digits !== false,
special: options.special || false,
exclude_similar: options.excludeSimilar || false,
format: options.format || 'random'
})
});
if (!response.ok) {
throw new Error(`API Error: ${response.status}`);
}
return response.json();
}
async checkHealth() {
const response = await fetch(`${this.baseURL}/health`);
return response.json();
}
}
// Utilisation
const passly = new PasslyClient();
const result = await passly.generatePassword({
length: 24,
special: true,
excludeSimilar: true
});
console.log('Mot de passe:', result.data.passwords[0]);
console.log('Force:', result.data.strength);
console.log('Entropie:', result.data.entropy_bits, 'bits');