API DOCUMENTATION V2

GenderAPI.io V2: Errors, limits and retries

Handle GenderAPI.io V2 Problem Details, rate limits and billing uncertainty. Check each error before retrying an independently billed request.

Errors and HTTP status codes

Application errors use application/problem+json (RFC 9457). Branch on the stable code and action, not the human-readable detail. Validation errors include JSON Pointer locations in errors. Include request_id when contacting support. Proxy or transport failures can return a different body, so check Content-Type before parsing JSON.

The following synthetic 422 example shows invalid email syntax before billing. The public error catalog lists every code, status, explanation and suggested action.

HTTP statusTypical meaningNext step
400 / 413 / 415Malformed JSON, oversized body or unsupported media type.Correct the request.
401 / 403Access rejected, account restriction or insufficient credits.Inspect code; correct access or replenish credits / wait for trial reset.
422Invalid input or incompatible options.Correct the fields identified in errors.
404 / 405Unknown route or unsupported HTTP method.Check the endpoint path and the Allow response header.
429Rate or concurrency limit.Wait for Retry-After before sending another request.
500Unexpected server failure.Contact support with request_id; check billing before retrying.
502 / 503 / 504Provider, dependency, billing or timeout failure.Inspect code, action and billing_status before retrying.
Illustrative JSON response
{
  "type": "urn:genderapi:problem:validation_error",
  "title": "validation error",
  "status": 422,
  "detail": "A valid email address is required.",
  "instance": "urn:uuid:11111111-1111-4111-8111-111111111111",
  "code": "validation_error",
  "request_id": "11111111-1111-4111-8111-111111111111",
  "documentation": "https://api.genderapi.io/api/v2/errors",
  "action": "correct_request",
  "errors": [
    {
      "pointer": "/value",
      "message": "Invalid email address."
    }
  ],
  "meta": {
    "request_id": "11111111-1111-4111-8111-111111111111",
    "duration_ms": 12,
    "access": {
      "mode": "ip_trial",
      "reason": "api_key_missing"
    },
    "usage": {
      "charged_credits": 0,
      "remaining_credits": null,
      "billing_status": "not_charged",
      "resets_at": "2026-09-26T12:00:00.000Z",
      "limit": 10,
      "period_seconds": 86400
    }
  }
}

Error response fields

FieldTypeNullableExampleDescription
typestringNo"urn:genderapi:problem:validation_error"URI identifying the problem type.
titlestringNo"validation error"Short human-readable error title.
statusintegerNo422HTTP status code.
detailstringNo"The request does not match the schema."Explanation of this specific failure.
instancestringNo"urn:uuid:550e8400-e29b-41d4-a716-446655440000"Identifier for the failed request.
codestringNo"validation_error"Stable machine-readable error code.
request_idstringNo"550e8400-e29b-41d4-a716-446655440000"Unique identifier for this HTTP attempt; also sent in X-Request-ID.
documentationstringNo"https://api.genderapi.io/api/v2/errors"Link to the error catalog when supplied.
actionstringNo"correct_request"Suggested recovery action; present when defined in the error catalog.
errorsarray<object>No[{"pointer":"/value","message":"must NOT have fewer than 1 characters"}]Validation issues, present when available. Each item contains pointer and message.
errors[].pointerstringNo"/value"JSON Pointer identifying the invalid input.
errors[].messagestringNo"must NOT have fewer than 1 characters"Explanation of the validation issue.

Access, billing and request metadata

FieldTypeNullableExampleDescription
meta.request_idstringNo"550e8400-e29b-41d4-a716-446655440000"Unique identifier for this HTTP attempt; also sent in X-Request-ID.
meta.duration_msintegerNo42Request processing time in milliseconds.
meta.access.modestringNo"api_key"api_key, ip_trial or unauthenticated. Verify api_key when using a paid account.
meta.access.reasonstringYesnullTrial fallback reason: api_key_missing, api_key_invalid or api_key_not_found; null otherwise.
meta.usage.charged_creditsintegerYes1Net credits charged. Zero before charging or after a full confirmed refund; null when billing is unconfirmed.
meta.usage.remaining_creditsintegerYes99Balance when the operation completes. May be negative; null when unavailable or billing is unconfirmed.
meta.usage.billing_statusstringNo"confirmed"not_charged, confirmed or unconfirmed. Check this before retrying a failed prediction.
meta.usage.resets_atstringYes"2026-09-27T12:00:00.000Z"IP trial reset time in UTC (ISO 8601); null for API-key accounts or when unknown.
meta.usage.limitintegerYes10IP trial allowance; null for API-key accounts.
meta.usage.period_secondsintegerYes86400IP trial window in seconds; null for API-key accounts.

Retries and billing

Every prediction request is a new operation, including an identical request sent again. Normal credit rules apply to each request. There is no duplicate-request protection, so avoid automatic retries after a connection loss or an unknown outcome.

For a 429 response, wait for Retry-After before sending another request. For prediction failures, inspect code, action and meta.usage.billing_status first. For billing_reconciliation_required or unconfirmed billing, contact support with request_id before retrying.

A partially successful batch may return HTTP 200. Check each item and resubmit only failed items after billing is confirmed; successful items would be billed again if resubmitted.

X-Request-ID and meta.request_id identify the current HTTP attempt. Read /usage for the current balance. HEAD does not start a billable prediction. Prediction and account responses are not cacheable.

Clients should tolerate additive response fields and preserve null values when information is unavailable.

Request limits

Handle HTTP 429 and Retry-After rather than assuming requests will always be accepted at these ceilings. Service capacity is shared. The values shown are the current service defaults. Rate-limit responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). Retry-After is a delay in seconds. These headers describe request limits, not remaining credits. Even the free /usage read counts toward rate limits.

LimitValue
JSON request body64 KiB maximum
Prediction value1–254 characters
Batch50 items with an API key; 10 with the IP trial
Account rate120 requests per minute
IP rate600 requests per minute
Concurrent operations2 per account; 16 across the service