> ## Documentation Index
> Fetch the complete documentation index at: https://aircaps.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an enrollment

> 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.



## OpenAPI

````yaml POST /v1/speakers/{id}/enrollments
openapi: 3.1.0
info:
  title: AirCaps AI API
  version: 1.0.0
  description: >-
    Speech-to-text: A5S Async v1 (REST; English, Spanish, French, German,
    Portuguese, Hindi, Japanese, Korean and Chinese) and A5S Small V2 Streaming
    (WebSocket; English). Speaker diarization: AirCaps Diarization-v1 (REST).
    Speaker identification: AirCaps Speaker ID-v1 (REST, synchronous).
servers:
  - url: https://api.aircaps.com
security:
  - bearerAuth: []
tags:
  - name: Transcripts
  - name: Diarizations
  - name: Speakers
  - name: Files
  - name: Account
paths:
  /v1/speakers/{id}/enrollments:
    post:
      tags:
        - Speakers
      summary: Add an enrollment
      description: >-
        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.
      operationId: addEnrollment
      parameters:
        - name: id
          in: path
          required: true
          description: Speaker ID.
          schema:
            type: string
            example: spk_01k73a9x8w7v6u5t4s3r2q1p0n
        - name: model
          in: query
          required: false
          description: >-
            Optional: `aircaps-speaker-id-v1`. Any other value returns `400
            unsupported_model`.
          schema:
            type: string
            enum:
              - aircaps-speaker-id-v1
      requestBody:
        required: true
        description: >-
          The clip's raw audio bytes (any common audio or video format; channels
          are mixed down and audio is resampled to 16 kHz). Not multipart form
          data. The whole clip is used as given: crop it to one person's speech
          first.
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
          audio/*:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: Enrolled.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SpeakerEnrollment'
                  - type: object
                    properties:
                      speaker:
                        $ref: '#/components/schemas/EnrolledSpeaker'
              example:
                id: enr_01k73b5f1h2j3k4m5n6p7q8r9s
                object: speaker_enrollment
                speaker_id: spk_01k73a9x8w7v6u5t4s3r2q1p0n
                audio_duration: 15.42
                consistency: 0.712
                created_at: '2026-10-08T18:04:52.015Z'
                speaker:
                  id: spk_01k73a9x8w7v6u5t4s3r2q1p0n
                  object: speaker
                  name: Ana García
                  metadata:
                    employee_id: E-1042
                  model: aircaps-speaker-id-v1
                  num_enrollments: 2
                  enrolled_duration: 27.9
                  enrollments:
                    - id: enr_01k73b2c4d5e6f7g8h9j0k1m2n
                      object: speaker_enrollment
                      speaker_id: spk_01k73a9x8w7v6u5t4s3r2q1p0n
                      audio_duration: 12.48
                      consistency: 0.712
                      created_at: '2026-10-08T18:03:11.402Z'
                    - id: enr_01k73b5f1h2j3k4m5n6p7q8r9s
                      object: speaker_enrollment
                      speaker_id: spk_01k73a9x8w7v6u5t4s3r2q1p0n
                      audio_duration: 15.42
                      consistency: 0.712
                      created_at: '2026-10-08T18:04:52.015Z'
                  created_at: '2026-10-08T18:02:40.118Z'
                  updated_at: '2026-10-08T18:04:52.015Z'
        '400':
          description: >-
            The clip or request is not usable. Codes: `invalid_request`,
            `invalid_audio`, `audio_too_short`, `audio_too_long`,
            `unsupported_model`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: invalid_request_error
                  code: audio_too_short
                  message: the clip is 0.62 s long; it must be at least 1 s
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '401':
          description: 'Missing or invalid API key. Codes: `unauthorized`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: authentication_error
                  code: unauthorized
                  message: invalid API key
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '403':
          description: >-
            The account may not do this. Codes: `account_suspended`,
            `account_disabled`, `usage_limit_reached`, `model_access_denied`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: permission_error
                  code: model_access_denied
                  message: >-
                    This account does not have access to AirCaps Speaker ID-v1.
                    To get access, talk to sales at https://aircaps.ai/contact.
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '404':
          description: 'Not found. Codes: `speaker_not_found`, `enrollment_not_found`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: invalid_request_error
                  code: speaker_not_found
                  message: speaker 'spk_01k73a9x8w7v6u5t4s3r2q1p0n' not found
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '409':
          description: >-
            The speaker has the maximum number of enrollments. Codes:
            `enrollment_limit_reached`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: invalid_request_error
                  code: enrollment_limit_reached
                  message: a speaker can have at most 20 enrollments; delete one first
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '413':
          description: 'Larger than 100 MB. Codes: `file_too_large`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: invalid_request_error
                  code: file_too_large
                  message: clips are limited to 100 MB
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '429':
          description: >-
            More requests in the last minute than the account allows. Codes:
            `rate_limited`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: rate_limit_error
                  code: rate_limited
                  message: more than 600 requests in the last minute
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '500':
          description: >-
            Server error. Safe to retry (use the same Idempotency-Key). Codes:
            `internal_error`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: internal error
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
        '503':
          description: >-
            Temporarily unavailable. Retry after the Retry-After interval.
            Codes: `service_unavailable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: api_error
                  code: service_unavailable
                  message: temporarily unavailable; please retry
                  param: null
                  request_id: req_01k6z3m4q8w7e5r2t1y0u9i8o7
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl
            "https://api.aircaps.com/v1/speakers/spk_01k73a9x8w7v6u5t4s3r2q1p0n/enrollments"
            \
              -H "Authorization: Bearer $AIRCAPS_API_KEY" \
              -H "Content-Type: audio/wav" \
              --data-binary @ana_intro.wav
        - lang: python
          label: Python
          source: |-
            import os, requests

            with open("ana_intro.wav", "rb") as f:
                r = requests.post("https://api.aircaps.com/v1/speakers/spk_01k73a9x8w7v6u5t4s3r2q1p0n/enrollments",
                                  headers={"Authorization": f"Bearer {os.environ['AIRCAPS_API_KEY']}", "Content-Type": "audio/wav"},
                                  data=f)
            print(r.json()["consistency"])
components:
  schemas:
    SpeakerEnrollment:
      type: object
      required:
        - id
        - object
        - speaker_id
        - audio_duration
        - consistency
        - created_at
      properties:
        id:
          type: string
          description: Enrollment ID.
          example: enr_01k73b2c4d5e6f7g8h9j0k1m2n
        object:
          type: string
          enum:
            - speaker_enrollment
        speaker_id:
          type: string
          example: spk_01k73a9x8w7v6u5t4s3r2q1p0n
        audio_duration:
          type: number
          description: Seconds of audio in the enrollment clip.
          example: 12.48
        consistency:
          type:
            - number
            - 'null'
          description: >-
            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.
          example: 0.712
        created_at:
          type: string
          format: date-time
    EnrolledSpeaker:
      type: object
      required:
        - id
        - object
        - name
        - metadata
        - model
        - num_enrollments
        - enrolled_duration
        - enrollments
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Speaker ID.
          example: spk_01k73a9x8w7v6u5t4s3r2q1p0n
        object:
          type: string
          enum:
            - speaker
        name:
          type:
            - string
            - 'null'
          description: Your label for the speaker.
          example: Ana García
        metadata:
          type:
            - object
            - 'null'
          description: Your `metadata`.
          example:
            employee_id: E-1042
        model:
          type: string
          enum:
            - aircaps-speaker-id-v1
        num_enrollments:
          type: integer
          example: 2
        enrolled_duration:
          type: number
          description: Seconds of enrollment audio in total.
          example: 27.9
        enrollments:
          type: array
          items:
            $ref: '#/components/schemas/SpeakerEnrollment'
          description: Oldest first. Only embeddings are stored, never the audio.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          description: Last change to the name, metadata or enrollments.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
              description: Machine-readable code; see [Errors](/errors).
            message:
              type: string
            param:
              type:
                - string
                - 'null'
              description: The request field at fault, if any.
            request_id:
              type:
                - string
                - 'null'
              description: >-
                Also in the `x-request-id` header. Include it when contacting
                support. `null` on 502/504 from the edge.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `Authorization: Bearer aircaps_sk_...`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.