إنتقل إلى المحتوى الرئيسي

API استنتاج الجنس من الاسم

استنتج الجنس المحتمل من الاسم الأول واسم العائلة.

عنوان URL الأساسي​

https://api.genderrecognition.com

نقطة النهاية​

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

ترويسات الطلب​

apiKey: YOUR_API_KEY
Content-Type: application/json

محتوى الطلب​

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

مثال​

curl -X POST "https://api.genderrecognition.com/v1/voice-gender-recognition/api/name" \
-H "Content-Type: application/json" \
-H "apiKey: YOUR_API_KEY" \
-d '{
"firstName": "Alex",
"lastName": "Morgan"
}'

الاستجابة​

{
"success": true,
"name": "Alex Morgan",
"gender": "male",
"confidence": 0.86,
"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 مفقودة​

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

نوع محتوى JSON غير مدعوم​

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

تم تجاوز الحصة​

{
"error": "Insufficient remaining requests"
}

فشلت المعالجة​

{
"error": "Internal server error"
}