Age by Voice API
Estimate a speaker's age from an uploaded audio file.
Base URL
https://api.genderrecognition.com
Endpoint
POST /v1/voice-age/api
Headers
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Body
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio file to analyze. |
Example
curl -X POST "https://api.genderrecognition.com/v1/voice-age/api" \
-H "apiKey: YOUR_API_KEY" \
-F "file=@audio.wav"
Response
{
"success": true,
"estimated_age_years": 32,
"confidence": 91,
"probabilities": {
"male": 86,
"female": 9,
"child": 5
},
"remainingRequests": 2999
}
Error cases
Missing API key
{
"error": "API key is required"
}
Invalid API key
{
"error": "Invalid API key"
}
Missing file
{
"error": "No file uploaded"
}
Invalid file type
{
"error": "Invalid file type. Allowed formats: WAV, MP3, FLAC, MP4, OGG, AIFF"
}
Quota exceeded
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your free tier limit of 50 requests.",
"detailedMessage": "Insufficient remaining requests. Required: 1, Available: 0",
"details": {
"limit": 50,
"used": 50,
"reset_date": "2026-07-01T00:00:00.000Z"
},
"suggested_action": "Please upgrade to a premium plan to continue using the API."
}
}
Processing failed
{
"error": "Voice age detection failed"
}
Notes
- The backend accepts common audio formats such as WAV, MP3, FLAC, MP4, OGG, and AIFF.
- Audio uploads use the
filefield and must be 10 MB or smaller.