API de estimativa de origem étnica pelo nome
Estime indicadores de origem étnica com base no nome e sobrenome.
URL base
https://api.genderrecognition.com
Endpoint
POST /v1/voice-gender-recognition/api/ethnicity
Cabeçalhos
apiKey: YOUR_API_KEY
Content-Type: application/json
Corpo
{
"firstName": "Alex",
"lastName": "Morgan"
}
Exemplo
curl -X POST "https://api.genderrecognition.com/v1/voice-gender-recognition/api/ethnicity" \
-H "Content-Type: application/json" \
-H "apiKey: YOUR_API_KEY" \
-d '{
"firstName": "Alex",
"lastName": "Morgan"
}'
Resposta
{
"success": true,
"name": "Alex Morgan",
"ethnicity": "English",
"confidence": 0.74,
"remainingRequests": 2999
}
Casos de erro
Chave de API ausente
{
"error": "API key is required"
}
Chave de API inválida
{
"error": "Invalid API key"
}
Nome ausente
{
"error": "First name is required"
}
Sobrenome ausente
{
"error": "Last name is required"
}
Nome muito longo
{
"error": "First name must not exceed 50 characters"
}
Cabeçalho de tipo de conteúdo JSON ausente
{
"error": "Content-Type header is required. Please set Content-Type: application/json"
}
Tipo de conteúdo JSON não compatível
{
"error": "Content-Type must be application/json"
}
Cota excedida
{
"error": "Insufficient remaining requests"
}
Falha no processamento
{
"error": "Internal server error"
}