Referencia de la API

Voces

Biblioteca de voces, diseño y clonación.

GET /v1/voices

List the voices I can use

Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior

Any signed-in member. The providers' libraries plus the voices the tenant designed or cloned (`owned`, newest first, on the first page only). The `id` is the provider's voice id: use it as the `voice_id` of an ElevenLabs or Cartesia TTS config. `language` (`es`), `accent` (an `id` of `GET /v1/voices/accents`), `gender` and `q` (a name or description search) are applied by each provider's library, so they work across the whole catalog; `provider` limits it to one. `scope` is `owned` (only the tenant's own voices, which carry no language or accent), `library` (no own voices) or `all` (default). A page holds about `limit` voices (default 30, at most 100), split between the providers; `next_cursor` is opaque and goes back as `cursor` for the next page. A voice appears once per provider and id. An ElevenLabs voice with `library_owner_id` is from the shared library and must be added with `POST /v1/voices/shared` before use. Without any provider key the library is empty and `library_configured` is `false`. 401 when the token is missing, expired or invalid; 422 for an invalid parameter or cursor (`invalid_cursor`); 503 until voices are deployed.

Parámetros

NombreEnTipoRequeridoDescripción
providerquerystring | null
genderquerystring | null
accentquerystring | null
languagequerystring | null
qquerystring | null
scopequerystring
limitqueryinteger
cursorquerystring | null

Respuestas

  • 200 Successful Response · VoiceListResponse
    NombreTipoRequeridoDescripción
    itemsVoiceResponse[]sí
    items[].accentstring | nullsí
    items[].created_atstring (date-time) | nullsí
    items[].descriptionstring | nullsí
    items[].genderstring | nullsí
    items[].idstringsíProvider voice id: the TTS `voice_id` of an assistant.
    items[].kindstring | nullsí (designed, cloned)
    items[].languagestring | nullsí
    items[].library_owner_idstring | nullOnly for a voice of ElevenLabs' shared library: who shared it. Such a voice must be added to the organization's account before an assistant can use it.
    items[].namestringsí
    items[].ownedbooleansí
    items[].preview_urlstring | nullsí
    items[].providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
    library_configuredbooleansíFalse when no provider has a key for the organization: no library.
    next_cursorstring | nullPass it as `cursor` for the next page; null on the last one.
    providersProviderListingResponse[]síHow each provider's library went, so one failing key is visible.
    providers[].errorstring | nullsíOnly when `status` is `error`: the provider's status.
    providers[].providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
    providers[].statusstringsí (ok, not_configured, error)
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

POST /v1/voices

Save a designed preview as a voice

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above keeps a preview from `POST /v1/voices/design` as a voice of the tenant, with a `name` (1 to 80 characters). `description` is the one sent to design. Audited as `voice.create`. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when the body is invalid; 502 when the provider fails; 503 with code `voices_not_configured` when the provider key is not set.

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
descriptionstringsí
generated_voice_idstringsí
namestringsí

Respuestas

  • 201 Successful Response · VoiceResponse
    NombreTipoRequeridoDescripción
    accentstring | nullsí
    created_atstring (date-time) | nullsí
    descriptionstring | nullsí
    genderstring | nullsí
    idstringsíProvider voice id: the TTS `voice_id` of an assistant.
    kindstring | nullsí (designed, cloned)
    languagestring | nullsí
    library_owner_idstring | nullOnly for a voice of ElevenLabs' shared library: who shared it. Such a voice must be added to the organization's account before an assistant can use it.
    namestringsí
    ownedbooleansí
    preview_urlstring | nullsí
    providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

GET /v1/voices/accents

List the regional variants a voice can be filtered by

Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior

Any signed-in member. The accents (for Spanish: Argentinian, Peruvian, Chilean, Mexican, Castilian...) of `language` (`es`; all languages when omitted) that the providers' libraries know, each with the `id` to send as the `accent` of `GET /v1/voices`. A provider without a key, or that fails, adds none. 401 when the token is missing, expired or invalid; 503 until voices are deployed.

Parámetros

NombreEnTipoRequeridoDescripción
languagequerystring | null
providerquerystring | null

Respuestas

  • 200 Successful Response · AccentListResponse
    NombreTipoRequeridoDescripción
    itemsAccentResponse[]sí
    items[].idstringsíThe value of the `accent` filter of `GET /v1/voices`.
    items[].languagestringsíLanguage code the variant belongs to (`es`).
    items[].localestring | nullsíBCP-47 locale such as `es-AR`, if known.
    items[].namestringsí
    items[].providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

POST /v1/voices/clone

Clone a voice from audio samples

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above makes an instant voice clone. `multipart/form-data` with `files` (1 to 5 audio samples of at most 10 MB each: mp3, wav, m4a, webm, ogg or flac), `name` (1 to 80 characters), optional `description`, `consent` (must be `true`) and `consent_statement` (10 to 500 characters: who the voice belongs to and that they agree). Without consent the answer is 422 with code `consent_required` and nothing is sent to the provider. Who attested and when is stored with the voice, and the statement only as a hash; the audio is not stored here. Audited as `voice.clone`. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when a field is invalid, consent is missing (`consent_required`) or a sample is empty, too large or not audio (`invalid_sample`); 502 when the provider fails; 503 with code `voices_not_configured` when the provider key is not set.

Respuestas

  • 201 Successful Response · VoiceResponse
    NombreTipoRequeridoDescripción
    accentstring | nullsí
    created_atstring (date-time) | nullsí
    descriptionstring | nullsí
    genderstring | nullsí
    idstringsíProvider voice id: the TTS `voice_id` of an assistant.
    kindstring | nullsí (designed, cloned)
    languagestring | nullsí
    library_owner_idstring | nullOnly for a voice of ElevenLabs' shared library: who shared it. Such a voice must be added to the organization's account before an assistant can use it.
    namestringsí
    ownedbooleansí
    preview_urlstring | nullsí
    providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

POST /v1/voices/design

Generate voice previews from a description

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above describes a voice (20 to 1,000 characters) and gets generated previews (ElevenLabs voice design), each with an `id` and base64 audio. `text` (100 to 1,000 characters) is what the previews say; omitted, the provider writes it. Nothing is saved: pass a preview `id` to `POST /v1/voices` to keep it. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when the body is invalid; 502 when the provider fails; 503 with code `voices_not_configured` when the provider key is not set.

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
descriptionstringsí
textstring | null

Respuestas

  • 200 Successful Response · DesignResponse
    NombreTipoRequeridoDescripción
    previewsDesignPreviewResponse[]sí
    previews[].audio_base64stringsí
    previews[].duration_secsnumbersí
    previews[].idstringsí`generated_voice_id` to save this preview.
    previews[].media_typestringsí
    textstringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

POST /v1/voices/shared

Make a shared-library voice usable

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above adds a voice of ElevenLabs' shared library (a listed voice with `library_owner_id`) to the provider account, which an assistant's TTS needs before it can speak with it. Send its `public_owner_id` (the listing's `library_owner_id`), `voice_id` and a `name` (1 to 80 characters). The answer is the voice with the `id` to store in the TTS config; adding it twice is harmless. The voice is not listed as the tenant's own. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when the body is invalid; 502 when the provider fails (it refuses some voices, for example on plans without library access); 503 with code `voices_not_configured` when the provider key is not set.

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
namestringsí
public_owner_idstringsí
voice_idstringsí

Respuestas

  • 200 Successful Response · VoiceResponse
    NombreTipoRequeridoDescripción
    accentstring | nullsí
    created_atstring (date-time) | nullsí
    descriptionstring | nullsí
    genderstring | nullsí
    idstringsíProvider voice id: the TTS `voice_id` of an assistant.
    kindstring | nullsí (designed, cloned)
    languagestring | nullsí
    library_owner_idstring | nullOnly for a voice of ElevenLabs' shared library: who shared it. Such a voice must be added to the organization's account before an assistant can use it.
    namestringsí
    ownedbooleansí
    preview_urlstring | nullsí
    providerstringsí`elevenlabs` or `cartesia`. The set may grow: handle unknown values.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

GET /v1/voices/{provider}/{voice_id}/preview

Play a library voice's preview

Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior

Any signed-in member. The audio of a library voice's preview, fetched with the organization's own provider credential (its own, else the platform's when allowed), for providers whose previews need that credential: today `cartesia`. A voice whose listing has a `preview_url` pointing here has a preview; the browser cannot fetch the provider's file itself. Providers whose `preview_url` is public (`elevenlabs`) answer 404. The body is the audio (`audio/*`), cached privately for an hour, at most 5 MB. 401 when the token is missing, expired or invalid; 404 when the provider has no preview for the voice; 422 when `provider` or `voice_id` is malformed; 502 when the provider fails; 503 with code `voices_not_configured` when the organization has no credential for the provider.

Parámetros

NombreEnTipoRequeridoDescripción
providerpathstringsí
voice_idpathstringsí

Respuestas

  • 200 The preview audio.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse
  • 404 The provider has no preview for it. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse

DELETE /v1/voices/{voice_id}

Delete a voice of my organization

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above deletes a voice the tenant designed or cloned, at the provider and here. Library voices cannot be deleted (404). Assistants that use the voice keep its id and fail to speak until another voice is chosen. Audited as `voice.delete`. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the voice is not one of the tenant's; 502 when the provider fails; 503 with code `voices_not_configured` when the provider key is not set.

Parámetros

NombreEnTipoRequeridoDescripción
voice_idpathstringsí

Respuestas

  • 204 Successful Response
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such voice of the caller's tenant. · ErrorResponse
  • 502 `voices_provider_error`: the provider failed. · ErrorResponse
  • 503 `voices_not_configured`: the provider key is not set. Or not deployed yet. · ErrorResponse
  • default Default Response · ErrorResponse