allmodels.ioDocs
API ReferenceElevenLabs SDK

Update Speech Engine

Replaces the configurable fields of a Speech Engine.

PATCH/el/v1/speech-engine/{speech_engine_id}

Replaces the configurable fields of a Speech Engine.

Authorization

xi-api-key<token>

Tenant key (ElevenLabs SDK convention).

In: header

Path Parameters

speech_engine_id*string

Query Parameters

stt[model]?string

AllModels streaming STT model. The router selects an eligible provider automatically.

stt[provider]?string

Optional STT provider pin. Omit to use automatic provider routing.

stt[provider_options][name]?string

Provider-specific STT setting with no standard Speech Engine field. Replace name with the option name; the JavaScript SDK accepts stt: { provider_options: { ... } }.

stt[input][name]?string

Portable STT setting with no standard Speech Engine field, such as turn_detection. Replace name with the setting name; the JavaScript SDK accepts stt: { input: { ... } }.

tts[model]?string

AllModels streaming TTS model. The router selects an eligible provider automatically.

tts[provider]?string

Optional TTS provider pin. Omit to use automatic provider routing.

tts[provider_options][name]?string

Provider-specific TTS setting with no standard Speech Engine field. Replace name with the option name; the JavaScript SDK accepts tts: { provider_options: { ... } }.

tts[input][name]?string

Portable TTS setting with no standard Speech Engine field. Supported names are text_buffer_mode, text_buffer_min_characters, text_buffer_target_characters, and text_buffer_max_characters.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

ElevenLabs-compatible Speech Engine configuration. Use standard ASR and TTS fields first. Use the stt and tts query extensions only to select non-ElevenLabs models or pass settings that have no standard Speech Engine field.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

Client
Language
import { writeFile } from "node:fs/promises";const response = await fetch("https://api.allmodels.io/el/v1/speech-engine/$SPEECH_ENGINE_ID", {  method: "PATCH",  headers: { ...{ Authorization: `Bearer ${process.env.ALLMODELS_API_KEY}` }, "Content-Type": "application/json" },  body: JSON.stringify({  "name": "Updated voice agent"})});if (!response.ok) throw new Error(`AllModels request failed: ${response.status}`);console.log(await response.json());
{  "speech_engine_id": "string",  "name": "string",  "speech_engine": {    "ws_url": "string",    "request_headers": {      "property1": "string",      "property2": "string"    }  },  "allmodels": {    "stt": {      "model_id": "string",      "provider": "string",      "provider_options": {        "property1": null,        "property2": null      },      "input": {        "property1": null,        "property2": null      }    },    "tts": {      "model_id": "string",      "provider": "string",      "provider_options": {        "property1": null,        "property2": null      },      "input": {        "property1": null,        "property2": null      }    }  },  "property1": null,  "property2": null}

{  "error": "missing_api_key"}

{  "detail": {    "message": "string",    "status": "string",    "property1": null,    "property2": null  }}
{  "detail": {    "message": "string",    "status": "string",    "property1": null,    "property2": null  }}
{  "detail": {    "message": "string",    "status": "string",    "property1": null,    "property2": null  }}
{  "detail": {    "message": "string",    "status": "string",    "property1": null,    "property2": null  }}