Client for sites and Easy to use because it is completely promise based.

npm install rucaptcha-client

Usage example
import Rucaptcha from 'rucaptcha-client';
async () => {
  const rucaptcha = new Rucaptcha ('YOUR_APIKEY');
  // If you want to use 2captcha as endpoint
  // By default, will be used
  rucaptcha.baseUrl = '';
  // If the API key was specified incorrectly, it will throw RucaptchaError with the code
  // ERROR_KEY_DOES_NOT_EXIST. It is useful to call this method immediately after
  // initialize to make sure the API key is correct.
  const balance = await rucaptcha.getBalance ();
  const imageUrl =
  const answer = await rucaptcha.solve (imageUrl);
  console.log (answer.text); // -> cyku if employees have solved the captcha correctly

balance: number - the result of the last getBalance or null.
baseUrl: string = '' - the base URL to which you want to make a request. If you want to change it to, after creating the captcha object, change the baseUrl property. See example above

constructor (apikey: string) - the key can be found here:
async getBalance: Promise <number> - Returns the balance of the current user.
async solve (url: string): Promise <{text: string}> - solves a captcha with an image that can be downloaded at the specified url.