Secure • Fast • Reliable

Text Captcha API

A blazingly fast, Rust-powered RESTful API for generating secure text-based CAPTCHA images. Protect your applications with customizable, accessible captcha solutions.

Lightning Fast

Built with Rust for maximum performance and minimal latency

Highly Secure

Advanced algorithms to prevent automated attacks

Easy Integration

Simple RESTful API with comprehensive documentation

curl -X GET https://captchapi.giulioo.workers.dev/captcha

Powerful Features

Everything you need to implement secure, accessible captcha solutions

Customizable Difficulty

Adjust character count, complexity, and distortion levels

Flexible Configurable

Multiple Formats

Support for JSON, XML, SVG and PNG output formats

JSON XML SVG PNG

Rate Limiting

Built-in rate limiting to prevent API abuse

Security Protection

Analytics Ready

Detailed metrics and logging for monitoring

Metrics Logging

High Availability

99.9% uptime with automatic failover

Reliable Scalable

Developer Friendly

Comprehensive docs with code examples

Documentation Examples

Try It Live

Test our API with real-time captcha generation

Configuration

1 6
0 30
0 250
0 250
0 1
0 1
5.0 50.0
-360.0 360.0
0.1 3.0
0.1 3.0
0.1 10.0
0.1 1.0
0.1 10.0
0.1 1.0
0.1 10.0
0.1 100.0
0.1 1.0

Generated Captcha

ABC123

API Documentation

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
GET /captcha

Generate a new captcha image

Path Parameters:

Name Type Required Allowed Values Default Description
/captcha.[format] string No json(json+svg),xml (xml+svg),json+png,xml+png,svg,png json Specifies the response format.

Query Parameters:

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.

Response

JSON (JSON + SVG)
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

XML (XML + SVG)
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

JSON + PNG
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

XML + PNG
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

SVG
Name Type Example Description
SVG image image/svg+xml The captcha rendered as an SVG image

PNG
Name Type Example Description
PNG image image/png The captcha rendered as a PNG image

cURL Example

# Generate captcha
curl -X GET https://captchapi.giulioo.workers.dev/captcha