Overview
Password Generator works by generating passwords based on the specified length and complexity. It returns the generated password in a structured format.
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/passwordgenerator?count=10&length=12&complexity=strong&type=random&includeNumbers=true&includeSymbols=true&includeUppercase=true&includeLowercase=true&excludeSimilar=true&excludeAmbiguous=true&mixedCase=true&strict=true&wordCount=4&separator=-&capitalize=true&analyze=true" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/passwordgenerator?count=10&length=12&complexity=strong&type=random&includeNumbers=true&includeSymbols=true&includeUppercase=true&includeLowercase=true&excludeSimilar=true&excludeAmbiguous=true&mixedCase=true&strict=true&wordCount=4&separator=-&capitalize=true&analyze=true', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/passwordgenerator?count=10&length=12&complexity=strong&type=random&includeNumbers=true&includeSymbols=true&includeUppercase=true&includeLowercase=true&excludeSimilar=true&excludeAmbiguous=true&mixedCase=true&strict=true&wordCount=4&separator=-&capitalize=true&analyze=true",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/passwordgenerator?count=10&length=12&complexity=strong&type=random&includeNumbers=true&includeSymbols=true&includeUppercase=true&includeLowercase=true&excludeSimilar=true&excludeAmbiguous=true&mixedCase=true&strict=true&wordCount=4&separator=-&capitalize=true&analyze=true", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
countRequired | integer | The number of passwords to generate default 1 · range 1–100 |
lengthRequired | integer | The length of the password to generate default 12 · range 4–128 |
complexityRequired | string | The complexity of the password. Only applies when type is randomsimplemediumstrongmaximumdefault medium |
typeOptional | string | The kind of password to generate. random uses the complexity preset, pronounceable builds readable syllables, passphrase joins dictionary words, and custom honours the include/exclude switches belowrandompronounceablepassphrasecustomdefault random |
includeNumbersOptional | boolean | Include digits. Applies to custom and pronounceable, and to random at simple complexity |
includeSymbolsOptional | boolean | Include punctuation symbols. Applies to custom, and to random at medium complexity |
includeUppercaseOptional | boolean | Include uppercase letters. Applies to custom, and to random at simple complexity |
includeLowercaseOptional | boolean | Include lowercase letters in a custom password. Set false to build from the other character sets only default true |
excludeSimilarOptional | boolean | Exclude characters that are easy to confuse when read aloud or typed (i, l, 1, L, o, 0, O) |
excludeAmbiguousOptional | boolean | Exclude brackets, slashes, quotes and other characters that need escaping in shells and config files |
mixedCaseOptional | boolean | Randomly capitalise letters in a pronounceable password |
strictOptional | boolean | Guarantee at least one character from every enabled set rather than leaving it to chance |
wordCountOptional | integer | How many words a passphrase contains. Only applies when type is passphrase default 4 · range 2–12 |
separatorOptional | string | The character placed between passphrase words. Only applies when type is passphrase default - |
capitalizeOptional | boolean | Capitalise each word of a passphrase. Only applies when type is passphrase |
analyzeOptionalPremium | boolean | Return a strength analysis alongside each password |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"passwords": [
{
"password": "aOwqDh0ZK*P;!M|%oiFYJ!IK%TMXQO",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "Wo:)*V2nMakoVI78[fKu|QDI.E45p|",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "%XqlsK2qN.9>*&jk6gYIG.[aE,hiRc",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "WQNY0{R~(G99uc&i62Mve).n<|xt=F",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "2$m-&z9!5$c3QlxQP{h#@0x~'M/h]T",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "y]e_H)/z2yzbr{4C&hHOb[Q:#/$Hml",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "+iZ,<<+_MR:jJ,JbXTN*3Z,xLo'=@E",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "x=e6H^U;ajD+)h5Z8$7Wy)^Ob8ERw'",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "+p!SGSnR*JNl}/[#oVQy~ZxtoZU}F+",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
},
{
"password": "%h:23-bMb0;?QWL)chKm8{>%)mN:EO",
"length": 30,
"metadata": {
"type": "random",
"complexity": "strong"
},
"analysis": null
}
],
"count": 10
}
}Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
passwords | array[10] | Array of generated password objects with details | |
password | string | "aOwqDh0ZK*P;!M|%oiFYJ!IK%TMXQO" | The generated password string |
length | number | 30 | Length of the generated password |
metadata | object | {...} | Metadata about the password generation |
type | string | "random" | Type of password generation method used |
complexityPremium | string | "strong" | Complexity level of the password |
analysisPremium | object | null | Strength analysis for the password. Returned only when analyze is true, and holds score, strength, feedback and entropy |
count | number | 10 | Total count of passwords generated |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- Security Applications
- Use the Password Generator API to generate secure passwords for security applications. Use the data to protect accounts, systems, and data
- User Authentication
- Authenticate users by using the Password Generator API to generate passwords. Use the data to create strong passwords for user accounts and profiles
- Data Encryption
- Encrypt data by using the Password Generator API to generate passwords. Use the data to create encryption keys and secure sensitive information
- Account Management
- Manage accounts by using the Password Generator API to generate passwords. Use the data to create unique passwords for user accounts and improve account security
Other ways to use Password Generator
Set up Password Generator on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Data Generation: