Skip to main content
Use Gender API through Corsair: one client, typed API calls. Copy the server key from your Gender API account. The key travels as the key query parameter, which is where the simple API expects it, not as a header. Things to know before you call:
  • A failure arrives with HTTP 200. Gender API puts errno and errmsg in the body of every answer, with 0 on a good one. A live probe with a bad key answered 200 and {"errno":40,"errmsg":"invalid or missing key"}. The plugin throws whenever the code is non-zero, whatever the status was.
  • The documented codes are 10, 11, 20, 21, 30, 40 and 500. They cover an invalid country code, a country count that does not match the name count, a missing name, more than 100 names, a used-up quota, an unknown key, and their own internal failure. GenderApiAPIError exposes errno so a caller can branch on them, and GENDER_API_ERRNO names each one.
  • The quota is errno: 30, not a 429. A limit that ran out answers 200 with the code and a link to the pricing page, so it is not retried.
  • gender can be unknown. The answer is still a success: samples and accuracy tell you how weak the data is. Gender API never returns a null gender.
  • A country changes the answer. Andrea is male in Italy and female in Germany, and multi accepts one country for every name or one per name in the same order.
  • A name is normalized before lookup. name_sanitized is the form the database actually matched, which is worth reading when a result looks wrong.
  • fullName returns a null last name under strict. With strict: true Gender API returns a null last_name when it is not in the database, instead of guessing one.
What you get:
  • 6 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Look up the gender behind one first name
Write No write-style endpoint inferred; pick any operation from the API reference. See the full list on the API page.

What’s next

API reference

Every genderapi.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.