This gem facilitates interaction with API.

gem 'rucaptcha_api'

Fast usage

Explained usage
require 'rucaptcha_api'
rucaptcha_key = '5d01e7jk4d9c64a784b25d38840d1407' - for example. get your own 'captcha KEY' from page after you registered.
api = rucaptcha_key
path_to_captcha = File.expand_path 'var/captchas/1.png' - absolute path to image of your captcha (only accepts jpg,jpeg,gif,png)
captcha_id = api.send_captcha_for_solving path_to_captcha, params: {phrase: 1} - you send captcha for solving, and you get its id as a resonse so that you can later look up its solution when it's ready. params here are optional, and you can find possible params in API docs

Methods to get statistics
api.balance #=> 95.03 - Find out the account balance. The balance is indicated in Russian rubles.

api.captcha_cost captcha_id - Request for the status and cost of recognizing this captcha. The price is indicated in rubles.

api.stats_for date: '2013-11-27' # => string with xml - get statistics of account usage in XML for the specified date.

RucaptchaApi.rucaptcha_stats # => {waiting: ..., ...} - waiting: the number of employees waiting for a captcha. load: the percentage of workers loaded. minbid: current bid for captcha recognition. In rubles. averageRecognitionTime: average time (in seconds) for which captchas are currently being solved