مین مواد پر جائیں

نام سے نسلی پس منظر کی 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 key موجود نہیں​

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

غلط API key​

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