This API provides endpoints for generating CAPTCHA images with configurable parameters and verifying user input against stored CAPTCHA values.
http://localhost:5000
/captchaGenerates a CAPTCHA image. If no input data is provided, default CAPTCHA settings are applied. If JSON data is present, the CAPTCHA is generated using the supplied configuration.
{
"length": 6,
"size": [200, 70],
"color": "black",
"lines": 50,
"dots": 300,
"distort": "wave"
}
| Parameter | Type | Description |
|---|---|---|
| length | integer | Number of characters in the CAPTCHA |
| size | array | Image size as [width, height] |
| color | string or array | Text color or multicolor option |
| lines | integer | Number of noise lines |
| dots | integer | Number of noise dots |
| distort | string | none, wave, shear, blur |
The following examples illustrate CAPTCHA images generated using different distortion modes.
distort = "none"
distort = "wave"
distort = "shear"
distort = "blur"
/verify/verify?uid=abc123&guess=K7P9Q
True <captcha> – CAPTCHA matched successfullyFalse <captcha> – CAPTCHA mismatchExpired or invalid CAPTCHA