Ruby Client

Elegant Ruby client for Gender-API.com designed for Rails, Sinatra, and Ruby applications. Our AI-powered API delivers 99.5% accurate gender detection with beautiful, idiomatic Ruby syntax. Process names in under 100ms with 10x-90x better performance than generic AI models. The gem provides simple methods for single and batch lookups, perfect for user registration, email personalization, and CRM integration. Unlike ChatGPT or other LLMs, our specialized database contains 37% more names with country-specific accuracy across 150+ countries. Supports smart normalization and handles international character sets. Start free with 100 monthly API calls. GDPR compliant and trusted globally.

Nejprve nainstalujte naši knihovnu pomocí composeru:

Zde naleznete kompletní dokumentaci klienta:

https://github.com/markus-perl/gender-api-client

Nejprve nainstalujte naši knihovnu pomocí npm:

Zde naleznete kompletní dokumentaci klienta:

https://github.com/markus-perl/gender-api-client-npm

Nejprve nainstalujte naši knihovnu pomocí npm:

Zde naleznete kompletní dokumentaci klienta:

https://github.com/markus-perl/gender-api-client-npm

Nejprve si nainstaluj naši knihovnu pomocí pip:

Zde naleznete kompletní dokumentaci klienta:

https://github.com/markus-perl/gender-api-client-python
https://pypi.org/project/gender-api-client/

require 'net/http'
require 'json'
require 'uri'

# Determine the gender of a first name using API V2
# ---------------------------------------------------
api_key = 'YOUR_API_KEY' # Get your key at https://gender-api.com/en/account/auth-tokens
uri = URI('https://gender-api.com/v2/gender/by-first-name')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = "Bearer #{api_key}"
request.body = JSON.dump({ first_name: 'Theresa' })

begin
  response = http.request(request)
  
  # Parse the JSON response
  result = JSON.parse(response.read_body)

  puts "Gender: #{result['gender']}"
  puts "Probability: #{result['probability']}"
rescue StandardError => e
  puts "Error: #{e.message}"
end

Professional Gender Detection for Your Applications

Gender-API.com delivers enterprise-grade gender detection with 99.5% accuracy across 150+ countries. Our specialized API outperforms generic AI solutions with 10x-90x faster response times and 9-34% better accuracy.

Why Choose Gender-API Over Generic AI?

  • Purpose-Built : Specialized for gender detection, not a general-purpose AI
  • Blesková rychlost : Sub-100ms response times vs. seconds for generic AI
  • More Accurate : 99.5% accuracy with cultural and regional intelligence
  • Larger Database : 9+ million names, 37% more than typical AI training data
  • Reliable : 99.9% uptime SLA with predictable performance

Key Features

  • Easy integration with just a few lines of code
  • Batch processing for high-volume applications
  • Country-specific accuracy for regional name variations
  • Smart normalization handling typos and variants
  • GDPR compliant and enterprise-ready

Start Free Today

Get 100 free API calls per month with no credit card required. Scale as you grow with flexible pricing for every use case.

Chat