A blazingly fast, Rust-powered RESTful API for generating secure text-based CAPTCHA images. Protect your applications with customizable, accessible captcha solutions.
Built with Rust for maximum performance and minimal latency
Advanced algorithms to prevent automated attacks
Simple RESTful API with comprehensive documentation
curl -X GET https://captchapi.giulioo.workers.dev/captcha
Everything you need to implement secure, accessible captcha solutions
Adjust character count, complexity, and distortion levels
Support for JSON, XML, SVG and PNG output formats
Built-in rate limiting to prevent API abuse
Detailed metrics and logging for monitoring
99.9% uptime with automatic failover
Comprehensive docs with code examples
Test our API with real-time captcha generation
Complete reference for integrating our captcha API
Types of parameters
Table describing all available types of parameters
Name | Syntax | Example | Description |
---|---|---|---|
range |
?param=min ,max |
?width=10 ,30 |
A comma-separated pair of numeric values (min, max) |
list |
?param=val1 ,val2 ,val3 ,... |
?fsize=10 ,20 ,30 ,40 ,... |
List of numeric values separated by commas |
/captcha
Generate a new captcha image
Name | Type | Required | Allowed Values | Default | Description |
---|---|---|---|---|---|
/captcha.[format] |
string | No | json (json+svg ),xml ( ,json+png ,xml+png ,svg ,png |
json |
Specifies the response format. |
Name | Type | Required | Allowed Values | Default | Description |
---|---|---|---|---|---|
height |
float | No | 50 -> 1024 |
50 |
Specifies the height of the captcha image in pixels. The aspect ratio is preserved. |
width |
float | No | 250 -> 1024 |
250 |
Specifies the width of the captcha image in pixels. The aspect ratio is preserved. |
scale |
float | No | 0.1 -> 10.0 |
1.0 |
Specifies the scale of the captcha image. |
nletters |
integer, range, list | No | 1 -> 10 |
4,6 |
Specifies the number of characters to generate in the captcha. |
nlines |
integer, range, list | No | 0 -> 1000 |
3,5 |
Specifies the number of noise lines. |
ncircles |
integer, range, list | No | 0 -> 1000 |
5,10 |
Specifies the number of noise circles. |
npaths |
integer, range, list | No | 0 -> 1000 |
5,10 |
Specifies the number of noise paths. |
blur |
float, range, list | No | 0.0 -> 1.0 |
0.0,0.5 |
Specifies the amount of blur applied to each letter. |
opacity |
float, range, list | No | 0.0 -> 1.0 |
0.3,1.0 |
Specifies the amount of opacity applied to each letter. |
fsize |
float, range, list | No | 5.0 -> 50.0 |
18.0,30.0 |
Specifies the font size of applied to each letter. |
rotation |
float, range, list | No | -360.0 -> 360.0 |
-15.0,15.0 |
Specifies the rotation applied to each letter. |
lscalex |
float, range, list | No | 0.1 -> 10.0 |
0.8,1.2 |
Specifies the horizontal scale factor applied to each letter. |
lscaley |
float, range, list | No | 0.1 -> 10.0 |
0.8,1.2 |
Specifies the vertical scale factor applied to each letter. |
lwidth |
float, range, list | No | 0.1 -> 10.0 |
1.0,3.0 |
Specifies the width of noise lines. |
lopacity |
float, range, list | No | 0.1 -> 1.0 |
0.1,0.6 |
Specifies the opacity of noise lines. |
cradius |
float, range, list | No | 0.1 -> 100 |
1.0,3.0 |
Specifies the radius of noise circles. |
copacity |
float, range, list | No | 0.1 -> 1.0 |
0.1,0.8 |
Specifies the opacity of noise circles. |
pstroke |
float, range, list | No | 0.1 -> 10.0 |
1.0,3.0 |
Specifies the stroke of noise paths. |
plenght |
float, range, list | No | 0.1 -> 100.0 |
10.0,60.0 |
Specifies the length of noise paths. |
popacity |
float, range, list | No | 0.1 -> 1.0 |
0.1,0.6 |
Specifies the opacity of noise paths. |
font |
string, list | No | Roboto ,Nunito ,Syne ,Playfair Display |
Roboto |
Specifies the font family of the text. |
Name | Type | Example | Description |
---|---|---|---|
image |
data:image/svg+xml;base64 | "data:image/svg+xml;base64,..." | An SVG image encoded in base64 and returned as a data URI |
text |
string | "L0dzeB" | The string of characters rendered in the CAPTCHA image |
Name | Type | Example | Description |
---|---|---|---|
image |
data:image/svg+xml;base64 | "data:image/svg+xml;base64,..." | An SVG image encoded in base64 and returned as a data URI |
text |
string | "L0dzeB" | The string of characters rendered in the CAPTCHA image |
Name | Type | Example | Description |
---|---|---|---|
image |
data:image/png;base64 | "data:image/png;base64,..." | A PNG image encoded in base64 and returned as a data URI |
text |
string | "L0dzeB" | The string of characters rendered in the CAPTCHA image |
Name | Type | Example | Description |
---|---|---|---|
image |
data:image/png;base64 | "data:image/png;base64,..." | A PNG image encoded in base64 and returned as a data URI |
text |
string | "L0dzeB" | The string of characters rendered in the CAPTCHA image |
Name | Type | Example | Description |
---|---|---|---|
SVG image |
image/svg+xml | The captcha rendered as an SVG image |
Name | Type | Example | Description |
---|---|---|---|
PNG image |
image/png | The captcha rendered as a PNG image |
# Generate captcha
curl -X GET https://captchapi.giulioo.workers.dev/captcha