---
title: "Add an enrollment"
method: POST
path: "/v1/speakers/{id}/enrollments"
tags: ["Speakers"]
---

# Add an enrollment

`POST /v1/speakers/{id}/enrollments`

## Request

- Base URL: `https://api.aircaps.com`
- URL: `https://api.aircaps.com/v1/speakers/{id}/enrollments`
- Auth: HTTP bearer

Add one clip of this speaker. The model turns it into a speaker embedding, which is stored; the audio is not. A speaker's profile combines all of its enrollments, so several clips from different recordings make it sturdier. Synchronous: the response is the new enrollment and the updated speaker.

## Path parameters

- `id` string, required

## Query parameters

- `model` 'aircaps-speaker-id-v1'

## Request body `application/octet-stream`

- string, binary

## Response `201`

Enrolled.

- object
  - `id` string, required: Enrollment ID.
  - `object` 'speaker_enrollment', required
  - `speaker_id` string, required
  - `audio_duration` number, required: Seconds of audio in the enrollment clip.
  - `consistency` number, nullable, required: How well this enrollment matches the speaker's other enrollments (-1 to 1). `null` when it is the only one. A value much lower than the speaker's other enrollments suggests a clip of someone else or a poor recording.
  - `created_at` string, date-time, required
  - `speaker` EnrolledSpeaker
    - `id` string, required: Speaker ID.
    - `object` 'speaker', required
    - `name` string, nullable, required: Your label for the speaker.
    - `metadata` object, nullable, required: Your `metadata`.
    - `model` 'aircaps-speaker-id-v1', required
    - `num_enrollments` integer, required
    - `enrolled_duration` number, required: Seconds of enrollment audio in total.
    - `enrollments` SpeakerEnrollment[], required: Oldest first. Only embeddings are stored, never the audio.
      - `id` string, required: Enrollment ID.
      - `object` 'speaker_enrollment', required
      - `speaker_id` string, required
      - `audio_duration` number, required: Seconds of audio in the enrollment clip.
      - `consistency` number, nullable, required: How well this enrollment matches the speaker's other enrollments (-1 to 1). `null` when it is the only one. A value much lower than the speaker's other enrollments suggests a clip of someone else or a poor recording.
      - `created_at` string, date-time, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required: Last change to the name, metadata or enrollments.

## Other responses

- `400`: The clip or request is not usable. Codes: `invalid_request`, `invalid_audio`, `audio_too_short`, `audio_too_long`, `unsupported_model`.
- `401`: Missing or invalid API key. Codes: `unauthorized`.
- `403`: The account may not do this. Codes: `account_suspended`, `account_disabled`, `usage_limit_reached`, `model_access_denied`.
- `404`: Not found. Codes: `speaker_not_found`, `enrollment_not_found`.
- `409`: The speaker has the maximum number of enrollments. Codes: `enrollment_limit_reached`.
- `413`: Larger than 100 MB. Codes: `file_too_large`.
- `429`: More requests in the last minute than the account allows. Codes: `rate_limited`.
- `500`: Server error. Safe to retry (use the same Idempotency-Key). Codes: `internal_error`.
- `503`: Temporarily unavailable. Retry after the Retry-After interval. Codes: `service_unavailable`.

---

[API](https://skmtc.dev/aircaps/apis/aircaps-api.md) - [All operations](https://skmtc.dev/aircaps/apis/aircaps-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aircaps/apis/aircaps-api/revisions/442d566f9827?raw)
