OpenCaptcha is an open source, free, public API that generates CAPTCHA images from text.
OpenCaptcha provides:
- A free, public API at api.opencaptcha.io.
- Documentation at opencaptcha.io.
- Self-hosting support (see the Installation section).
curl -X 'POST' \
'https://api.opencaptcha.io/captcha' \
-H 'Content-Type: application/json' \
-d '{ "text": "captcha" }'
curl -X 'POST' \
'https://api.opencaptcha.io/captcha' \
-H 'Content-Type: application/json' \
-d '{ "text": "普通" }'
- Docker
- Windows Operating System
- Switch Docker to use Windows containers (see Docker docs).
- From the root folder of the project, run the following commands:
docker build -t opencaptcha -f ./src/Captcha.WebApi/Dockerfile . docker run -it -p 5280:8080 opencaptcha
- The API can be accessed at http://localhost:5280.
- Visual Studio 2022
- With ASP.NET and web development installed from the Visual Studio Installer
- .NET 8 SDK
- Windows Operating System
- Open the solution in Visual Studio 2022.
- Build and launch the Captcha.WebApi project.
- The API can be accessed at https://localhost:5280.
- Open the solution in Visual Studio 2022.
- Run the tests in Test Explorer.
A significant portion of this project, especially the CAPTCHA generation code, is based on work originally published on February 9, 2004, by BrainJar.
Pull requests are accepted.