Skip to content

Open source, free, public API that generates CAPTCHA images from text. Try it out at api.opencaptcha.io.

License

Notifications You must be signed in to change notification settings

ashtonav/opencaptcha

Repository files navigation

OpenCaptcha

banner

codecov .NET license

OpenCaptcha is an open source, free, public API that generates CAPTCHA images from text.

OpenCaptcha provides:

Usage

Example 1: Generated CAPTCHA images are randomly distorted.

banner

Try it out

curl -X 'POST' \
  'https://api.opencaptcha.io/captcha' \
  -H 'Content-Type: application/json' \
  -d '{ "text": "captcha" }'

Example 2: Generated CAPTCHA images can contain text in many languages.

banner

Try it out

curl -X 'POST' \
  'https://api.opencaptcha.io/captcha' \
  -H 'Content-Type: application/json' \
  -d '{ "text": "普通" }'

Installation

Option 1: Using Docker (recommended for self-hosting)

Requirements

  • Docker
  • Windows Operating System

How to Run

  1. Switch Docker to use Windows containers (see Docker docs).
  2. 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
  3. The API can be accessed at http://localhost:5280.

Option 2: Using Visual Studio (recommended for development purposes)

Requirements

  • Visual Studio 2022
    • With ASP.NET and web development installed from the Visual Studio Installer
  • .NET 8 SDK
  • Windows Operating System

How to Run

  1. Open the solution in Visual Studio 2022.
  2. Build and launch the Captcha.WebApi project.
  3. The API can be accessed at https://localhost:5280.

How to Test

  1. Open the solution in Visual Studio 2022.
  2. Run the tests in Test Explorer.

Acknowledgments

A significant portion of this project, especially the CAPTCHA generation code, is based on work originally published on February 9, 2004, by BrainJar.

Contributing

Pull requests are accepted.

License

MIT

About

Open source, free, public API that generates CAPTCHA images from text. Try it out at api.opencaptcha.io.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published