---
title: "Classify speaker gender"
method: POST
path: "/gender-detection/classify"
tags: ["Gender Detection"]
---

# Classify speaker gender

`POST /gender-detection/classify`

Classify the gender of the speaker in an audio file. Accepts either an audio URL (S3 or HTTP) or base64-encoded audio data. Supports WAV, MP3, FLAC, OGG, and other common audio formats.

## Headers

- `x-api-key` string, required

## Request body

- ModelGenderClassificationRequest — Request for gender classification from audio
  - `audio_url` string — URL to an audio file (S3 or HTTP). Provide either audio_url or audio_base64.
  - `audio_base64` string — Base64-encoded audio data. Provide either audio_url or audio_base64.

## Response `200`

Successful classification

- ModelGenderClassificationResponse — Gender classification result
  - `predicted_gender` 'female' | 'male', required — Predicted gender of the speaker
  - `confidence` number, required — Confidence score (0.0 to 1.0)
  - `prediction` object — Full prediction scores for both genders
    - `female` number — Probability of female speaker
    - `male` number — Probability of male speaker
  - `duration_seconds` number — Duration of the audio in seconds
  - `processing_time_ms` number — Processing time in milliseconds

## Other responses

- `400` — Bad request — must provide either audio_url or audio_base64
- `401` — Unauthorized — invalid or missing API key
- `500` — Internal server error

---

[API](https://skmtc.dev/deepdub-ai/apis/deepdub-api.md) · [All operations](https://skmtc.dev/deepdub-ai/apis/deepdub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deepdub-ai/deepdub-api/revisions/903a930c3849/schema)
