← Back to API Ninjas
GET/v1/passwordgenerator

Generate a random password

Generates one random password of the requested length, optionally excluding numbers or special characters. Defaults to 16 characters when no length is given.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/passwordgenerator" }); console.log(output);

Query parameters

length
number

Length of password in characters. If not set, a default value of 16 is used. (Default: 16)

exclude_numbers
boolean

Whether to exclude numbers from the password. Must be either true or false. If not set, a default value of false will be used. (Default: False)

exclude_special_chars
boolean

Whether to exclude special characters(!@#$%^&*()) from the password. Must be either true or false. If not set, a default value of false will be used. (Default: False)

    Orthogonal - Giving AI agents the tools they need.