मुख्य कंटेंट तक स्किप करें

नाम से जातीयता अनुमान API

पहले नाम और उपनाम के आधार पर जातीयता संबंधी संकेतों का अनुमान लगाएँ।

बेस URL​

https://api.genderrecognition.com

एंडपॉइंट​

POST /v1/voice-gender-recognition/api/ethnicity

हेडर​

apiKey: YOUR_API_KEY
Content-Type: application/json

अनुरोध बॉडी​

{
"firstName": "Alex",
"lastName": "Morgan"
}

उदाहरण​

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"
}'

प्रतिक्रिया​

{
"success": true,
"name": "Alex Morgan",
"ethnicity": "English",
"confidence": 0.74,
"remainingRequests": 2999
}

त्रुटि स्थितियाँ​

API कुंजी मौजूद नहीं है​

{
"error": "API key is required"
}

अमान्य API कुंजी​

{
"error": "Invalid API key"
}

पहला नाम मौजूद नहीं है​

{
"error": "First name is required"
}

उपनाम मौजूद नहीं है​

{
"error": "Last name is required"
}

नाम बहुत लंबा है​

{
"error": "First name must not exceed 50 characters"
}

JSON Content-Type हेडर मौजूद नहीं है​

{
"error": "Content-Type header is required. Please set Content-Type: application/json"
}

JSON Content-Type समर्थित नहीं है​

{
"error": "Content-Type must be application/json"
}

कोटा समाप्त हो गया​

{
"error": "Insufficient remaining requests"
}

प्रोसेसिंग विफल हुई​

{
"error": "Internal server error"
}