> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finowl.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Predict from a name

> Predicts gender from a first name or a full name with Finowl intelligence. Latin and
non-Latin scripts are supported.

Costs **1 credit**.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/gender/name
openapi: 3.1.0
info:
  title: Finowl API
  version: '1.0'
  description: >
    Check emails and passwords against known data breaches, and predict gender
    from

    names, emails and usernames. Every endpoint is a JSON `POST` authenticated
    with a

    bearer API key.
servers:
  - url: https://api.finowl.co
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Breaches
    description: Check whether an email or password appears in known data breaches.
  - name: Gender
    description: >-
      Predict gender from a name, email or username, one at a time or in
      batches.
paths:
  /v1/gender/name:
    post:
      tags:
        - Gender
      summary: Predict from a name
      description: >
        Predicts gender from a first name or a full name with Finowl
        intelligence. Latin and

        non-Latin scripts are supported.


        Costs **1 credit**.
      operationId: predictGenderFromName
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      minLength: 1
                      maxLength: 1024
                      description: A first name or full name.
                      example: James Smith
                - $ref: '#/components/schemas/PredictionOptions'
      responses:
        '200':
          $ref: '#/components/responses/Prediction'
        '400':
          $ref: '#/components/responses/InvalidInput'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/ProviderFailed'
        '503':
          $ref: '#/components/responses/Unavailable'
        '504':
          $ref: '#/components/responses/Unconfirmed'
components:
  schemas:
    PredictionOptions:
      type: object
      properties:
        country:
          type: string
          pattern: ^[A-Za-z]{2}$
          description: >-
            Optional ISO 3166-1 alpha-2 country hint, such as `US` or `TR`.
            Improves accuracy for names whose gender varies by country.
          example: US
        forceToGenderize:
          type: boolean
          default: false
          description: >-
            Try to predict even when the input does not look like a name. Cannot
            be combined with `ai_mode` `off` or `always`.
        options:
          type: object
          additionalProperties: false
          properties:
            ai_mode:
              type: string
              enum:
                - 'off'
                - fallback
                - always
              description: >
                - `fallback` (default for single lookups): use the dataset first
                and AI only when the dataset has no answer.

                - `off`: dataset only.

                - `always`: always use AI.
    PredictionResult:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Prediction'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
          properties:
            code:
              type: string
              description: >-
                A stable, machine-readable error code. See the Errors page for
                the full list.
              example: invalid_input
    Prediction:
      type: object
      description: >
        A gender estimate. `result_status` and `gender` are always present.
        Other fields, such as

        `confidence` and `country`, are included when available, and new fields
        may be added.
      additionalProperties: true
      required:
        - result_status
        - gender
      properties:
        result_status:
          type: string
          enum:
            - identified
            - unknown
          description: >-
            `identified` when a prediction was made, `unknown` when the input
            did not carry enough signal.
        gender:
          type:
            - string
            - 'null'
          enum:
            - male
            - female
            - null
          description: The predicted gender, or `null` when `result_status` is `unknown`.
        confidence:
          type: number
          description: How confident the estimate is. Higher is more certain.
        country:
          type:
            - string
            - 'null'
          description: >-
            The country context used for the prediction. This is not the
            person's location.
  responses:
    Prediction:
      description: >-
        The prediction completed. An `unknown` result is still a successful
        response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PredictionResult'
          examples:
            identified:
              summary: Identified
              value:
                data:
                  result_status: identified
                  gender: male
                  confidence: 0.99
                  country: US
            unknown:
              summary: Unknown
              value:
                data:
                  result_status: unknown
                  gender: null
                  country: null
    InvalidInput:
      description: The request body is not valid. Fix the request before trying again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_input
    Unauthorized:
      description: The API key is missing, malformed or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
    TooManyRequests:
      description: >
        `rate_limited` (too many requests this minute), `quota_exceeded` (not
        enough credits) or

        `provider_rate_limited` (Finowl intelligence is busy). Check the
        `Retry-After` header.
      headers:
        Retry-After:
          description: Seconds to wait before trying again.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
    ProviderFailed:
      description: >-
        Finowl intelligence could not complete the lookup. The request was
        charged.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: provider_unavailable
    Unavailable:
      description: Finowl intelligence is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: provider_unavailable
    Unconfirmed:
      description: >-
        Finowl intelligence did not answer in time. The lookup may or may not
        have run, and the request was charged.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: provider_response_unconfirmed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Finowl API key, for example `finowl_3f9a...`. Create keys in the
        dashboard under **API Keys**.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.