Gender by Voice API
Detect likely speaker gender from uploaded audio or from an audio URL.
Base URL
https://api.genderrecognition.com
File endpoint
POST /v1/voice-gender-recognition/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-gender-recognition/api" \
-H "apiKey: YOUR_API_KEY" \
-F "file=@audio.wav"
URL endpoint
POST /v1/voice-gender-recognition/api/url
Headers
apiKey: YOUR_API_KEY
Content-Type: application/json
Body
{
"url": "https://example.com/audio.wav"
}
Response
File requests return the prediction, confidence as a percentage, and updated quota metadata.
{
"success": true,
"gender": "male",
"confidence": 97,
"remainingRequests": 2999
}
URL requests return the prediction and quota metadata. Slow first requests may
also include an info message.
{
"success": true,
"gender": "male",
"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. Only audio formats are allowed"
}
Invalid URL request
{
"error": "A valid http or https URL is required"
}
Missing JSON content type
{
"error": "Content-Type header is required. Please set Content-Type: application/json"
}
Unsupported JSON content type
{
"error": "Content-Type must be application/json"
}
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."
}
}
Notes
- File requests use multipart form data.
- URL requests use JSON.
- Audio uploads use the
filefield and must be 10 MB or smaller.