I think that the gender will likely not be sensitive in the context of your experiment, but whether your experiment would be GDPR-compliant would depend on the details.
gender is considered as "Personal data" which is ‘sensitive’
Yes, the gender of a particular person is that person's personal data, since (a) the person is identifiable and (b) the information about their gender relates to this person. This satisfies the definition of personal data in Art 4 GDPR.
No, it will likely not be sensitive data. GDPR defines special categories of data in Art 9 which require additional protection. This includes information regarding the sex life or health of the data subjects. In most cases, the gender of a person does not reveal such information. However, this depends on the purposes for which the data is processed. E.g. information regarding gender could be sensitive information when processed in the context of trans persons.
data that is publicly available
Whether data is publicly available makes no difference for GDPR compliance. Public personal data is still personal data, and you will need a legal basis etc. for processing it.
The only impact I know for using publicly accessible data is in respect to your information obligations under Art 14(2)(f): “the controller shall provide the data subject with the following information […]: from which source the personal data originate, and if applicable, whether it came from publicly accessible sources”.
the extraction of gender information requires a process for extracting authors name and using external API services (i.e Gender API).
You are not required to use an external API. You could use local techniques to estimate the gender.
Note that names are not necessarily clearly gendered, and that this depends a lot on the cultural context of the name. E.g. “Alex” or “Kim” are common examples of unisex given names in a western context, whereas the latter is also a common Korean surname.
Would such experiment compliant with EU definitions and GDPR?
Yes, an experiment that would involve estimating the gender of publicly available names could be GDPR-compliant. The usual GDPR concerns for handling personal data (such as names) apply.
If you use an external service for this experiment, you will need to consider GDPR compliance for using a service. Either the service acts as your data processor, which requires that you perform due diligence and sign an agreement with them, but then you have no special conditions. Or the service acts as their own data controller, in which case you will need a legal basis for sharing the personal data with this service. However, given that the personal data in question was made public by the data subjects themselves, this could strengthen an argument that you have a legitimate interest for sharing the data. A legitimate interest always requires a balancing test between that interest and the data subject's rights and expectations.