---
title: "Generate cryptographically random passwords"
method: POST
path: "/password.php"
tags: ["crypto"]
---

# Generate cryptographically random passwords

`POST /password.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/password.php`
- Auth: none declared

Generates one or more random passwords using PHP's `random_int` (CSPRNG). At least one character from each enabled class is guaranteed. `exclude_ambiguous` strips characters like `0/O/1/l/I/|`. Reports `entropy_bits` and a coarse strength label.

## Request body

- object
  - `length` integer
  - `count` integer
  - `uppercase` boolean
  - `lowercase` boolean
  - `digits` boolean
  - `symbols` boolean
  - `exclude_ambiguous` boolean

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
