{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/waves/v1/tts":{"post":{"operationId":"synthesize-speech","summary":"Synthesize speech","description":"Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.\n\nPick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.\n\n**Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). The Pro pool also supports 27 additional languages (9 Indian, 8 Asian & Middle Eastern, 10 European) — pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language; see the [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the full 12-language catalog applies (see voice catalog).\n\n## When to use this\n\n- **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).\n- **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).\n- **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).\n\n## Key features\n\n- 44 kHz natural, expressive synthesis\n- Model selectable per request via `model` body parameter\n- Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices\n- 12 documented languages on `lightning_v3.1`. On `lightning_v3.1_pro`: `language: en` → UK + American accented English; `language: hi` → Indian accented English + Hindi; omit `language` → defaults to `en + hi`; plus 27 additional languages via dedicated Pro voices (pass the ISO 639-1 code, e.g. `ta`, `de`, `ja`).\n- Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`\n- Sample rates: 8 kHz – 44.1 kHz\n- Speed: 0.5× – 2×\n- Per-call pronunciation dictionaries via `pronunciation_dicts`\n\n## Examples\n\n**cURL — Lightning v3.1 (default)**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: audio/wav\" \\\n  -d '{\n    \"text\": \"Hello from Waves TTS.\",\n    \"voice_id\": \"magnus\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"wav\"\n  }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro (omit `language` → defaults to `en + hi`)**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: audio/wav\" \\\n  -d '{\n    \"text\": \"Hello from the Lightning v3.1 Pro pool.\",\n    \"voice_id\": \"meher\",\n    \"model\": \"lightning_v3.1_pro\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"wav\"\n  }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro with explicit `language: en` (UK + American accented English)**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: audio/wav\" \\\n  -d '{\n    \"text\": \"Good morning, this is a Pro voice speaking.\",\n    \"voice_id\": \"meher\",\n    \"model\": \"lightning_v3.1_pro\",\n    \"language\": \"en\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"wav\"\n  }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro with explicit `language: hi` (Indian accented English + Hindi)**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: audio/wav\" \\\n  -d '{\n    \"text\": \"Namaste, this is an Indian-accented Pro voice.\",\n    \"voice_id\": \"meher\",\n    \"model\": \"lightning_v3.1_pro\",\n    \"language\": \"hi\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"wav\"\n  }' --output speech.wav\n```\n\n## Common gotchas\n\n- **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.\n- **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).\n- **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1TtsPostParametersAccept"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsRequest"}}}}}},"/waves/v1/tts/live":{"post":{"operationId":"synthesize-speech-sse","summary":"Stream speech (SSE)","description":"Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\nPick the model with the `model` body parameter, same as the sync route.\n\n<Note>\n  **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/waves/api-reference/api-reference/text-to-speech/tts).\n</Note>\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"<base64-pcm>\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"done\": true}\\n\\n` frame marks end of stream.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/tts/live\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n    \"voice_id\": \"magnus\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"pcm\"\n  }'\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsRequest"}}}}}},"/waves/v1/lightning-v3.1/get_speech":{"post":{"operationId":"synthesize-lightning-v-31-speech","summary":"Lightning v3.1 (endpoint will be deprecated)","description":"<Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>\n\nSynthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.\n\n## When to use this\n\n- **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).\n- **Use the SSE streaming endpoint** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).\n- **Use the WebSocket endpoint** when text arrives incrementally (LLM token streams, live captioning).\n\n## Key features\n\n- 44 kHz natural, expressive synthesis\n- Cloned voice IDs (`voice_*`) work — same param as catalog voices\n- 12 documented languages — see the model card for the full list\n- Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`\n- Sample rates: 8 kHz – 44.1 kHz\n- Speed: 0.5× – 2×\n- Per-call pronunciation dictionaries via `pronunciation_dicts`\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: audio/wav\" \\\n  -d '{\n    \"text\": \"Hello from Lightning v3.1.\",\n    \"voice_id\": \"magnus\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"wav\"\n  }' --output speech.wav\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(api_key=\"YOUR_API_KEY\")\n\nwith open(\"speech.wav\", \"wb\") as f:\n    for chunk in client.waves.synthesize_lightning_v3_1(\n        text=\"Hello from Lightning v3.1.\",\n        voice_id=\"magnus\",\n        sample_rate=24000,\n        output_format=\"wav\",\n        # Optional: cloned voice support\n        # voice_id=\"voice_FlPKRWI7DX\",\n        # Optional: pin pronunciations for specific words\n        # pronunciation_dicts=[\"<your dict id>\"],\n    ):\n        f.write(chunk)\n```\n\n**JavaScript / TypeScript** (using `fetch`)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n    Accept: \"audio/wav\",\n  },\n  body: JSON.stringify({\n    text: \"Hello from Lightning v3.1.\",\n    voice_id: \"magnus\",\n    sample_rate: 24000,\n    output_format: \"wav\",\n  }),\n});\nconst audio = Buffer.from(await res.arrayBuffer());\nrequire(\"node:fs\").writeFileSync(\"speech.wav\", audio);\n```\n\n## Common gotchas\n\n- **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.\n- **Cloned voices** (`voice_*` from `add_voice`) work on this endpoint and support `pronunciation_dicts`.\n- **`pronunciation_dicts` validates IDs at request time.** Passing an unknown ID returns `Invalid input data` — create the dict first via the pronunciation-dicts endpoint and save the returned `id`.\n- **Pronunciation matching is case-sensitive.** Add both `Synopsis` and `synopsis` if your text uses both casings.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` or `axios` as shown above.\n","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1LightningV31GetSpeechPostParametersAccept"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v3.1/stream":{"post":{"operationId":"stream-lightning-v-31-speech","summary":"Lightning v3.1 SSE (endpoint will be deprecated)","description":"<Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>\n\nSynthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/get_speech`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use the WebSocket endpoint** when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/get_speech`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"<base64-pcm>\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"done\": true}\\n\\n` frame marks end of stream.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n    \"voice_id\": \"magnus\",\n    \"sample_rate\": 24000,\n    \"output_format\": \"pcm\"\n  }'\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nimport base64\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(api_key=\"YOUR_API_KEY\")\n\nwith open(\"stream.pcm\", \"wb\") as f:\n    for chunk in client.waves.synthesize_sse_lightning_v3_1(\n        text=\"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n        voice_id=\"magnus\",\n        sample_rate=24000,\n        output_format=\"pcm\",\n    ):\n        # Each chunk is `{\"audio\": \"<base64-encoded PCM>\"}`.\n        # Decode and pipe to your audio pipeline.\n        if chunk.get(\"audio\"):\n            f.write(base64.b64decode(chunk[\"audio\"]))\n```\n\n**JavaScript / TypeScript** (using `fetch` + a reader)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    text: \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n    voice_id: \"magnus\",\n    sample_rate: 24000,\n    output_format: \"pcm\",\n  }),\n});\n\nconst reader = res.body!.getReader();\nconst decoder = new TextDecoder();\nlet buf = \"\";\nlet finished = false;\nwhile (!finished) {\n  const { value, done } = await reader.read();\n  if (done) break;\n  buf += decoder.decode(value);\n  const events = buf.split(\"\\n\\n\");\n  buf = events.pop() ?? \"\";\n  for (const ev of events) {\n    // SSE frames are \"event: audio\\ndata: {json}\" or just \"data: {json}\".\n    // We only care about the data line — pull it out and parse.\n    const dataLine = ev.split(\"\\n\").find((l) => l.startsWith(\"data:\"));\n    if (!dataLine) continue;\n    const payload = JSON.parse(dataLine.slice(5).trim());\n    if (payload.done) { finished = true; break; }\n    if (payload.audio) {\n      const pcm = Buffer.from(payload.audio, \"base64\");\n      // … hand pcm to your audio pipeline\n    }\n  }\n}\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n- **First-chunk latency** depends on model warm-up + network distance. Use `output_format=pcm` and a streaming-friendly client to minimize what you can control.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` as shown above.\n","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v2/get_speech":{"post":{"operationId":"synthesize-lightningv-2-speech","summary":"Lightning v2 (Deprecated)","description":"Get speech for given text using the Waves API","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/lightning-v2/stream":{"post":{"operationId":"stream-lightningv-2-speech","summary":"Lightning v2 SSE (Deprecated)","description":"The Lightning v2 SSE API provides real-time text-to-speech streaming capabilities with high-quality voice synthesis. This API uses Server-Sent Events (SSE) to deliver audio chunks as they're generated, enabling low-latency audio playback without waiting for the entire audio file to process.\nFor an end-to-end example of how to use the Lightning v2 SSE API, check out [Text to Speech (SSE) Example](https://github.com/smallest-inc/waves-examples/blob/main/lightning_v2/http_streaming/http_streaming_api.py)\n\n## When to Use\n\n- **Interactive Applications**: Perfect for chatbots, virtual assistants, and other applications requiring immediate voice responses\n- **Long-Form Content**: Efficiently stream audio for articles, stories, or other long-form content without buffering delays\n- **Voice User Interfaces**: Create natural-sounding voice interfaces with minimal perceived latency\n- **Accessibility Solutions**: Provide real-time audio versions of written content for users with visual impairments\n\n## How It Works\n\n1. **Make a POST Request**: Send your text and voice settings to the API endpoint\n2. **Receive Audio Chunks**: The API processes your text and streams audio back as base64-encoded chunks with 1024 byte size\n3. **Process the Stream**: Handle the SSE events to decode and play audio chunks sequentially\n4. **End of Stream**: The API sends a completion event when all audio has been delivered\n","tags":["textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/{model}/get_voices":{"get":{"operationId":"get-waves-voices","summary":"Get Voices","description":"List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice \"is Pro\" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `\"model\": \"lightning_v3.1\"` (default) or `\"model\": \"lightning_v3.1_pro\"` on the unified `/waves/v1/tts` route to pick the pool.\n","tags":["voices"],"parameters":[{"name":"model","in":"path","description":"The catalog to query. Currently only `lightning-v3.1` is supported — the response returns the union of standard Lightning v3.1 voices and Lightning v3.1 Pro voices. The API does not include a per-voice Pro flag; consult the model cards for the canonical per-pool catalogs.\n","required":true,"schema":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetParametersModel"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voices_getWavesVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestInternalServerError"}}}}}}},"/waves/v1/voice-cloning":{"post":{"operationId":"create-voice-clone","summary":"Create a Voice Clone","description":"Create an instant voice clone in a single call. Defaults to `lightning-v3.1`.\n","tags":["voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created. Includes pre-generated sample clips of the new voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_createVoiceClone_Response_200"}}}},"400":{"description":"Validation error. Common causes: no file provided, invalid MIME type,\nfile too large, clone limit exceeded, invalid language, or\n`model=lightning-v2` (deprecated).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized — missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error. The `error_code` field may be populated for known failure modes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Human-readable name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to clone from. Supported MIME types:\n`audio/mpeg`, `audio/mpeg-3`, `audio/wav`, `audio/wave`,\n`audio/webm`, `video/webm`, `audio/mp4`, `video/mp4`.\nMaximum size: 5 MB.\n"},"description":{"type":"string","description":"Optional longer description for the voice clone."},"accent":{"type":"string","description":"Optional accent tag (e.g. \"general\", \"indian\")."},"tags":{"type":"string","description":"Optional comma-separated list of tags. Server splits on\ncommas and trims whitespace (`\"en, tone-test\"` → `[\"en\", \"tone-test\"]`).\n"},"language":{"type":"string","description":"Primary language the clone will be used for. Optional, but\n**strongly recommended** — set it to the language of your\nreference audio. The TTS request's `language` should also\nmatch this code; setting it now avoids silent language\nmismatches at inference time.\n\nMust be one of the languages supported by `lightning-v3.1`\n(e.g. `en`, `hi`, `multi`). The server validates and rejects\nunsupported codes with a 400.\n"},"model":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel","default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n"}},"required":["displayName","file"]}}}}},"get":{"operationId":"list-voice-clones","summary":"List Voice Clones","description":"Retrieve all voice clones in your organization.\n","tags":["voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of voice clones.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_listVoiceClones_Response_200"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Server error.","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/waves/v1/lightning-large":{"delete":{"operationId":"delete-voice-clone","summary":"Delete a Voice Clone (Deprecated)","description":"Delete a voice clone by `voiceId`. Despite the `/lightning-large/`\npath, this endpoint deletes any voice clone on the organization,\nincluding clones created via `POST /waves/v1/voice-cloning`.\n","tags":["voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_deleteVoiceClone_Response_200"}}}},"400":{"description":"Bad request (Invalid voice ID or validation error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"voiceId":{"type":"string","description":"The unique identifier of the voice clone to delete."}},"required":["voiceId"]}}}}}},"/waves/v1/lightning-large/add_voice":{"post":{"operationId":"add-voice-to-model","summary":"Add your Voice (Deprecated)","description":"**Deprecated** — use `POST /waves/v1/voice-cloning` instead. The new\nendpoint defaults to `lightning-v3.1`, supports optional metadata,\nand returns pre-generated sample clips. This endpoint only clones\nonto `lightning-large` and the resulting voices do not work on\n`lightning-v3.1` (returns an empty WAV). Kept live for backward\ncompatibility; new integrations should migrate.\n","tags":["voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_addVoiceToModel_Response_200"}}}},"400":{"description":"Bad request or limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to create voice clone from."}},"required":["displayName","file"]}}}}}},"/waves/v1/lightning-large/get_cloned_voices":{"get":{"operationId":"get-cloned-voices","summary":"Get your cloned Voices (Deprecated)","description":"**Deprecated** — use `GET /waves/v1/voice-cloning` instead. The new\nlist endpoint returns the same data plus a `modelIds` array per\nclone. Kept live for backward compatibility.\n","tags":["voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_getClonedVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestInternalServerError"}}}}}}},"/waves/v1/pronunciation-dicts":{"get":{"operationId":"get-pronunciation-dicts","summary":"List","description":"Retrieve all pronunciation dictionaries for the authenticated user","tags":["pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of pronunciation dictionaries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationDict"}}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"create-pronunciation-dict","summary":"Create","description":"Create a new pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully created pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationDict"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePronunciationDictRequest"}}}}},"put":{"operationId":"update-pronunciation-dict","summary":"Update","description":"Update an existing pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictRequest"}}}}},"delete":{"operationId":"delete-pronunciation-dict","summary":"Delete","description":"Delete an existing pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictRequest"}}}}}},"/waves/v1/stt/":{"post":{"operationId":"transcribe","summary":"Transcribe (Pre-recorded)","description":"Transcribe an audio file. The model is chosen via `?model=`:\n\n- `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.\n- `?model=pulse`: multilingual transcription (17 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.\n\n## When to use this\n\nUse this endpoint when you have a complete audio file (call recording, voicemail, podcast episode) and want the transcript back in one response. For live transcription as audio arrives, use the realtime WebSocket endpoint (`WS /waves/v1/stt/live`) instead.\n\nPulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.\n\n## Input methods\n\n- **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.\n- **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{\"url\": \"...\"}` in the body.\n\n## Examples\n\n**cURL**: Pulse Pro, sync\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en&word_timestamps=true\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/octet-stream\" \\\n  --data-binary \"@./call.wav\"\n```\n\n**cURL**: Pulse Pro, async via webhook\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en&webhook_url=https://your.app/cb\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/octet-stream\" \\\n  --data-binary \"@./call.wav\"\n```\nReturns `200 { \"status\": \"processing\", \"request_id\": \"...\" }` immediately. The webhook receives the full transcription when ready.\n\n**cURL**: Pulse, audio-by-URL\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse&language=en\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://your-bucket.s3.amazonaws.com/call.wav\"}'\n```\n\n**Python**\n```python\nimport requests\n\nwith open(\"./call.wav\", \"rb\") as f:\n    audio = f.read()\n\nr = requests.post(\n    \"https://api.smallest.ai/waves/v1/stt/\",\n    params={\"model\": \"pulse-pro\", \"language\": \"en\", \"word_timestamps\": \"true\"},\n    headers={\"Authorization\": f\"Bearer {API_KEY}\", \"Content-Type\": \"application/octet-stream\"},\n    data=audio,\n)\nr.raise_for_status()\nprint(r.json()[\"transcription\"])\n```\n\n**JavaScript / TypeScript**\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst audio = readFileSync(\"./call.wav\");\nconst params = new URLSearchParams({ model: \"pulse-pro\", language: \"en\", word_timestamps: \"true\" });\n\nconst res = await fetch(`https://api.smallest.ai/waves/v1/stt/?${params}`, {\n  method: \"POST\",\n  headers: { Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`, \"Content-Type\": \"application/octet-stream\" },\n  body: audio,\n});\nconsole.log((await res.json()).transcription);\n```\n\n## Common gotchas\n\n- **`model` is required.** Missing or invalid values return `400` with an enum-validation error.\n- **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.\n- **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.\n- **Async (webhook) mode is Pulse Pro only.** Pulse runs sync only on this endpoint.\n- **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected.\n","tags":["speechToText"],"parameters":[{"name":"model","in":"query","description":"Selects which ASR model handles the request. Required; missing or invalid values return `400`.\n\n- `pulse-pro`: English only, leaderboard-ranked accuracy, raw bytes only; supports async via `webhook_url`.\n- `pulse`: multilingual (39 languages), raw bytes OR URL.\n","required":true,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersModel"}},{"name":"language","in":"query","description":"Language of the audio file. This endpoint is **Pre-Recorded (HTTP)** — for streaming, switch to `WSS /waves/v1/stt/live` (different supported language set).\n\n**26 single-language codes:** `en`, `hi`, `de`, `es`, `ru`, `it`, `fr`, `nl`, `pt`, `uk`, `pl`, `cs`, `sk`, `lv`, `et`, `ro`, `fi`, `sv`, `bg`, `hu`, `da`, `lt`, `mt`, `zh`, `ja`, `ko`.\n\n**Regional auto-detect aggregators** for unknown audio:\n- `multi-eu` — auto-detects across all 21 European codes plus `en`.\n- `multi-asian` — auto-detects across `zh`, `ko`, `ja`, `en`.\n\n- **Pulse Pro**: pass `en`.\n- **Pulse**: pass any of the single-language codes above, or use the `multi-eu` / `multi-asian` aggregator for unknown audio. See the [Pulse model card](/waves/model-cards/speech-to-text/pulse) for the full table with language names.\n","required":true,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersLanguage"}},{"name":"word_timestamps","in":"query","description":"Include per-word timestamps in the response. On Pulse Pro this costs roughly one-third of throughput.","required":false,"schema":{"type":"boolean","default":false}},{"name":"diarize","in":"query","description":"Multi-speaker identification; adds per-word and per-utterance speaker labels.","required":false,"schema":{"type":"boolean","default":false}},{"name":"webhook_url","in":"query","description":"Pulse Pro only. If set, the response is `200` with `{\"status\": \"processing\", \"request_id\": \"...\"}` immediately, and the full transcription is delivered to this URL when ready. Use for long files where you do not want to hold an HTTP connection open.\n","required":false,"schema":{"type":"string","format":"uri"}},{"name":"webhook_method","in":"query","description":"HTTP method to use when calling the webhook. Pulse Pro only.","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersWebhookMethod","default":"POST"}},{"name":"webhook_extra","in":"query","description":"Arbitrary metadata returned to the webhook in addition to the transcription payload. Pulse Pro only.","required":false,"schema":{"type":"string"}},{"name":"redact_pii","in":"query","description":"Redact personally identifiable information from the transcript.\nNames → `[FIRSTNAME_*]` / `[LASTNAME_*]`, phone numbers →\n`[PHONENUMBER_*]`, addresses → `[ADDRESS_*]`, etc. The redaction\ntokens use sequential indices so multiple occurrences of the same\nentity get distinct labels (`[FIRSTNAME_1]`, `[FIRSTNAME_2]`).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersRedactPii","default":"false"}},{"name":"redact_pci","in":"query","description":"Redact payment card information (credit-card numbers, CVV, account\nnumbers, etc.). Replaces matches with `[ACCOUNTNUMBER_*]` tokens.\nUse alongside `redact_pii=true` for full PCI-compliant transcript\nhandling.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersRedactPci","default":"false"}},{"name":"emotion_detection","in":"query","description":"When `true`, the response adds an `emotions` object mapping detected\nemotion labels to confidence scores. Useful for voice-of-customer\nanalytics on call recordings.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersEmotionDetection","default":"false"}},{"name":"gender_detection","in":"query","description":"When `true`, the response adds a `gender` field with the detected\nspeaker gender label. Pulse pre-recorded only.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersGenderDetection","default":"false"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transcription succeeded. The response body has two shapes:\n\n- **Sync**: full `TranscriptionResponse` with `transcription`, `words`, `metadata`, etc. Returned when `webhook_url` is not set (all `?model=pulse` requests, and `?model=pulse-pro` requests without a webhook).\n- **Async**: `{ \"status\": \"processing\", \"request_id\": \"...\" }`. Returned when `?model=pulse-pro` is paired with `webhook_url`. The full `TranscriptionResponse` then arrives on the webhook when ready.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Speech to Text_transcribe_Response_200"}}}},"400":{"description":"Missing or invalid `model` query parameter, invalid params, or unsupported feature combination (e.g. `?model=pulse-pro` on the WS endpoint, audio-by-URL with `?model=pulse-pro`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"API key missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Plan does not include access to the requested model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload exceeds 250 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"RPM cap exceeded (Standard plan default 25/min per model).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Worker temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/waves/v1/chat/completions":{"post":{"operationId":"electron-chat-completions","summary":"Chat Completions (Electron)","description":"Generate a chat completion with Electron. OpenAI-compatible\nrequest/response shape — point any OpenAI SDK at\n`https://api.smallest.ai/waves/v1` and it just works.\n\nSet `stream: true` to receive tokens via Server-Sent Events. With\n`stream_options: { include_usage: true }`, the final SSE chunk\ncarries the `usage` block so token accounting is exact even on\nclient disconnects.\n\nTool calling follows OpenAI's `tools` array convention. When you\nprovide a voice-agent-style system prompt, Electron emits a short\nfiller phrase in the assistant message `content` field alongside\n`tool_calls` — see the [Tool Calling guide](/waves/documentation/llm-electron/tool-function-calling)\nfor the voice-agent pattern.\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/chat/completions\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"electron\",\n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n    ]\n  }'\n```\n\n**Python** (`pip install openai`)\n```python\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.smallest.ai/waves/v1\",\n    api_key=os.environ[\"SMALLEST_API_KEY\"],\n)\n\nresponse = client.chat.completions.create(\n    model=\"electron\",\n    messages=[\n        {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n    ],\n)\n\nprint(response.choices[0].message.content)\n```\n\n**JavaScript / TypeScript** (`npm install openai`)\n```typescript\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.smallest.ai/waves/v1\",\n  apiKey: process.env.SMALLEST_API_KEY,\n});\n\nconst response = await client.chat.completions.create({\n  model: \"electron\",\n  messages: [\n    { role: \"user\", content: \"Write one sentence about why the sky is blue.\" },\n  ],\n});\n\nconsole.log(response.choices[0].message.content);\n```\n\n**Streaming with usage** (Python)\n```python\nstream = client.chat.completions.create(\n    model=\"electron\",\n    messages=[{\"role\": \"user\", \"content\": \"Tell me a one-sentence fun fact.\"}],\n    stream=True,\n    stream_options={\"include_usage\": True},\n)\nfor chunk in stream:\n    if chunk.choices and chunk.choices[0].delta.content:\n        print(chunk.choices[0].delta.content, end=\"\", flush=True)\n    if chunk.usage:\n        print(f\"\\n\\nTokens: {chunk.usage.total_tokens}\")\n```\n\n## Common gotchas\n\n- **Base URL is `/waves/v1`**, not `/v1`. The OpenAI SDK appends `/chat/completions` for you.\n- **`stream_options.include_usage: true`** is required for exact token accounting on streaming calls — the final SSE chunk carries the `usage` block.\n- **`n > 1` and `prompt_logprobs` are rejected.** Use multiple requests if you need parallel completions.\n- **Auth header is `Authorization: Bearer $SMALLEST_API_KEY`** — get the key from the [Smallest AI Console](https://app.smallest.ai/dashboard/api-keys).\n","tags":["llm"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Non-streaming: standard OpenAI `chat.completion` object.\n\nStreaming (`stream: true`): `text/event-stream` SSE — each\nevent is a `chat.completion.chunk` delta, terminated by\n`data: [DONE]`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}}}},"400":{"description":"Bad request — schema validation, unsupported parameter\n(`n > 1`, `prompt_logprobs`), context length exceeded, or\ninvalid field value forwarded by the model.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key valid but no access to Electron on this plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit (RPM) or concurrency cap hit. See\n[Concurrency and Limits](/waves/api-reference/api-references/concurrency-and-limits).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream model unavailable. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Endpoint temporarily disabled, or upstream model overloaded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}}}}},"servers":[{"url":"https://api.smallest.ai","description":"waves"}],"components":{"schemas":{"WavesV1TtsPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1TtsPostParametersAccept"},"TtsRequestModel":{"type":"string","enum":["lightning_v3.1","lightning_v3.1_pro"],"default":"lightning_v3.1","description":"TTS model to route the request to. Controls which model pool serves\nthis synthesis.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio\n  quality and naturalness, with a curated voice catalog. See the\n  [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)\n  for supported voice IDs.\n\nSame concurrency and latency profile across both. Other request\nparameters behave identically.\n","title":"TtsRequestModel"},"TtsRequestSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"The sample rate for the generated audio.","title":"TtsRequestSampleRate"},"TtsRequestLanguage":{"type":"string","enum":["en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es","de","fr","it","pt","ru","el","fi","no","pl","ar","zh","id","ja","ko","ms","tr","vi"],"description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\nEach voice has its own `tags.language` set in the voice catalog —\nquery `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language\nthe voice was trained on; passing other codes is accepted by the\nAPI but produces English-pronounced output.\n\n**On `lightning_v3.1`**, the full 12-language catalog applies.\n\n**On `lightning_v3.1_pro`**:\n- Pass `en` → UK + American accented English.\n- Pass `hi` → Indian accented English + Hindi (code-switching).\n- Pass the ISO 639-1 code of any other Pro language (e.g. `ta`, `de`, `ja`) with a matching Pro voice — 27 additional languages (9 Indian, 8 Asian & Middle Eastern, 10 European) have dedicated Pro voices.\n- Omit `language` → defaults to `en + hi` (mixed Indian + Western English coverage).\n","title":"TtsRequestLanguage"},"TtsRequestOutputFormat":{"type":"string","enum":["mp3","pcm","wav","ulaw","alaw"],"default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n","title":"TtsRequestOutputFormat"},"TtsRequest":{"type":"object","properties":{"text":{"type":"string","default":"Hello from Waves TTS.","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"magnus","description":"The voice identifier to use for speech generation. See the model card for available voices per model."},"model":{"$ref":"#/components/schemas/TtsRequestModel","default":"lightning_v3.1","description":"TTS model to route the request to. Controls which model pool serves\nthis synthesis.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio\n  quality and naturalness, with a curated voice catalog. See the\n  [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)\n  for supported voice IDs.\n\nSame concurrency and latency profile across both. Other request\nparameters behave identically.\n"},"sample_rate":{"$ref":"#/components/schemas/TtsRequestSampleRate","default":44100,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"language":{"$ref":"#/components/schemas/TtsRequestLanguage","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\nEach voice has its own `tags.language` set in the voice catalog —\nquery `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language\nthe voice was trained on; passing other codes is accepted by the\nAPI but produces English-pronounced output.\n\n**On `lightning_v3.1`**, the full 12-language catalog applies.\n\n**On `lightning_v3.1_pro`**:\n- Pass `en` → UK + American accented English.\n- Pass `hi` → Indian accented English + Hindi (code-switching).\n- Pass the ISO 639-1 code of any other Pro language (e.g. `ta`, `de`, `ja`) with a matching Pro voice — 27 additional languages (9 Indian, 8 Asian & Middle Eastern, 10 European) have dedicated Pro voices.\n- Omit `language` → defaults to `en + hi` (mixed Indian + Western English coverage).\n"},"output_format":{"$ref":"#/components/schemas/TtsRequestOutputFormat","default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n"},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`."},"word_timestamps":{"type":"boolean","default":false,"description":"**WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: \"word_timestamp\"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/waves/documentation/text-to-speech-lightning/word-timestamps).\n"},"session_id":{"type":"string","description":"Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`."},"request_id":{"type":"string","description":"Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`."}},"required":["text","voice_id"],"title":"TtsRequest"},"TtsError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"TtsError"},"WavesV1LightningV31GetSpeechPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1LightningV31GetSpeechPostParametersAccept"},"LightningV31RequestModel":{"type":"string","enum":["lightning_v3.1","lightning_v3.1_pro"],"default":"lightning_v3.1","description":"TTS model to route the request to.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1 pool.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated\n  voice catalog. See the\n  [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).\n\nNew integrations should use the unified\n`/waves/v1/tts` route instead of this endpoint, but the `model`\nfield is supported here for backwards-compatible Pro opt-in.\n","title":"LightningV31RequestModel"},"LightningV31RequestSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"The sample rate for the generated audio.","title":"LightningV31RequestSampleRate"},"LightningV31RequestLanguage":{"type":"string","enum":["en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es"],"default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n  `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n  `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n","title":"LightningV31RequestLanguage"},"LightningV31RequestOutputFormat":{"type":"string","enum":["mp3","pcm","wav","ulaw","alaw"],"default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n","title":"LightningV31RequestOutputFormat"},"LightningV31Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"daniel","description":"The voice identifier to use for speech generation."},"model":{"$ref":"#/components/schemas/LightningV31RequestModel","default":"lightning_v3.1","description":"TTS model to route the request to.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1 pool.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated\n  voice catalog. See the\n  [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).\n\nNew integrations should use the unified\n`/waves/v1/tts` route instead of this endpoint, but the `model`\nfield is supported here for backwards-compatible Pro opt-in.\n"},"sample_rate":{"$ref":"#/components/schemas/LightningV31RequestSampleRate","default":44100,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"language":{"$ref":"#/components/schemas/LightningV31RequestLanguage","default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n  `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n  `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n"},"output_format":{"$ref":"#/components/schemas/LightningV31RequestOutputFormat","default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n"},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."},"session_id":{"type":"string","description":"Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`."},"request_id":{"type":"string","description":"Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`."}},"required":["text","voice_id"],"title":"LightningV31Request"},"SynthesizeLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestBadRequestError"},"SynthesizeLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestUnauthorizedError"},"SynthesizeLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestInternalServerError"},"StreamLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestBadRequestError"},"StreamLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestUnauthorizedError"},"StreamLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestInternalServerError"},"Lightningv2RequestLanguage":{"type":"string","enum":["en","hi","ta","kn","mr","bn","gu","ar","he","fr","de","pl","ru","it","nl","es","sv","ml","te"],"default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi.","title":"Lightningv2RequestLanguage"},"Lightningv2RequestOutputFormat":{"type":"string","enum":["pcm","mp3","wav","ulaw","alaw"],"default":"pcm","description":"The format of the output audio.","title":"Lightningv2RequestOutputFormat"},"Lightningv2Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"malcom","description":"The voice identifier to use for speech generation."},"sample_rate":{"type":"integer","default":24000,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"consistency":{"type":"number","format":"double","default":0.5,"description":"This parameter controls word repetition and skipping. Decrease it to prevent skipped words, and increase it to prevent repetition."},"similarity":{"type":"number","format":"double","default":0,"description":"This parameter controls the similarity between the generated speech and the reference audio. Increase it to make the speech more similar to the reference audio."},"enhancement":{"type":"number","format":"double","default":1,"description":"Enhances speech quality at the cost of increased latency."},"language":{"$ref":"#/components/schemas/Lightningv2RequestLanguage","default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi."},"output_format":{"$ref":"#/components/schemas/Lightningv2RequestOutputFormat","default":"pcm","description":"The format of the output audio."},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."}},"required":["text","voice_id"],"title":"Lightningv2Request"},"SynthesizeLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestBadRequestError"},"SynthesizeLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestUnauthorizedError"},"SynthesizeLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestInternalServerError"},"StreamLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestBadRequestError"},"StreamLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestUnauthorizedError"},"StreamLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestInternalServerError"},"WavesV1ModelGetVoicesGetParametersModel":{"type":"string","enum":["lightning-v3.1"],"default":"lightning-v3.1","title":"WavesV1ModelGetVoicesGetParametersModel"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags":{"type":"object","properties":{"language":{"type":"array","items":{"type":"string"},"description":"Languages the voice was trained on (e.g., `[\"english\"]`, `[\"english\", \"hindi\"]`)."},"accent":{"type":"string","description":"Accent of the voice (e.g., `american`, `british`, `indian`)."},"gender":{"type":"string","description":"Gender of the voice (`male` or `female`)."},"age":{"type":"string","description":"Age range of the voice (e.g., `young`, `middle-aged`, `senior`)."},"emotions":{"type":"array","items":{"type":"string"},"description":"Emotional ranges the voice supports."},"usecases":{"type":"array","items":{"type":"string"},"description":"Recommended use cases for the voice (e.g., `conversational`, `narration`)."}},"description":"Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case.","title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"displayName":{"type":"string","description":"Display name for the voice."},"tags":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags","description":"Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case."}},"required":["voiceId","displayName"],"title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voices_getWavesVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voices_getWavesVoices_Response_200"},"GetWavesVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestBadRequestError"},"GetWavesVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestUnauthorizedError"},"GetWavesVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestInternalServerError"},"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel":{"type":"string","enum":["lightning-v3.1"],"default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n","title":"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems":{"type":"object","properties":{"text":{"type":"string","description":"Text that was synthesized."},"audioUrl":{"type":"string","description":"Signed URL to the generated sample audio."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique voice ID. Pass this as `voice_id` in TTS requests."},"displayName":{"type":"string"},"model":{"type":"string","description":"Internal model document for the cloned voice."},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"language":{"type":"string"},"audioFileNames":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string"},"samples":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"description":"Pre-generated sample audio clips in the cloned voice."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_createVoiceClone_Response_200":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_createVoiceClone_Response_200"},"CreateVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error message."}},"title":"CreateVoiceCloneRequestBadRequestError"},"CreateVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string"}},"title":"CreateVoiceCloneRequestUnauthorizedError"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode":{"type":"string","enum":["voice_clone_timeout","voice_clone_error"],"description":"Present when a known failure mode occurred.","title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode"},"CreateVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string"},"error_code":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode","description":"Present when a known failure mode occurred."}},"title":"CreateVoiceCloneRequestInternalServerError"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType":{"type":"string","enum":["instant","professional"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string"},"voiceId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"accent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"cloningType":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"modelIds":{"type":"array","items":{"type":"string"},"description":"Models this clone is compatible with. `lightning-v3.1`\nis the current default. Older entries may list\n`lightning-large`.\n"},"createdAt":{"type":"string","format":"date-time"}},"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"},"Voice Cloning_listVoiceClones_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Voice Cloning_listVoiceClones_Response_200"},"Voice Cloning_deleteVoiceClone_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Status if the voice clone was deleted successfully."},"voiceId":{"type":"string","description":"Voice ID of the deleted voice clone."}},"required":["voiceId"],"title":"Voice Cloning_deleteVoiceClone_Response_200"},"DeleteVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestBadRequestError"},"DeleteVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestUnauthorizedError"},"DeleteVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestInternalServerError"},"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice creation."}},"required":["voiceId","model","status"],"title":"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_addVoiceToModel_Response_200":{"type":"object","properties":{"message":{"type":"string","description":"Message if the voice clone was created successfully."},"data":{"$ref":"#/components/schemas/WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_addVoiceToModel_Response_200"},"AddVoiceToModelRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestBadRequestError"},"AddVoiceToModelRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestUnauthorizedError"},"AddVoiceToModelRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestInternalServerError"},"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice."},"accent":{"type":"string","description":"Accent of the voice."},"tags":{"type":"array","items":{"type":"string"},"description":"List of tags associated with the voice."},"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice generation."},"createdAt":{"type":"string","format":"date-time","description":"Date and time the voice was created."}},"required":["displayName","voiceId"],"title":"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voice Cloning_getClonedVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voice Cloning_getClonedVoices_Response_200"},"GetClonedVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestBadRequestError"},"GetClonedVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestUnauthorizedError"},"GetClonedVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestInternalServerError"},"PronunciationItem":{"type":"object","properties":{"word":{"type":"string","description":"The word to be pronounced"},"pronunciation":{"type":"string","description":"The phonetic pronunciation of the word"}},"required":["word","pronunciation"],"title":"PronunciationItem"},"PronunciationDict":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the dictionary was created"}},"required":["id","items","createdAt"],"title":"PronunciationDict"},"ErrorResponseErrorsItems":{"type":"object","properties":{},"title":"ErrorResponseErrorsItems"},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorResponseErrorsItems"}}},"required":["status","message"],"title":"ErrorResponse"},"CreatePronunciationDictRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs to create"}},"required":["items"],"title":"CreatePronunciationDictRequest"},"UpdatePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to update"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictRequest"},"UpdatePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the updated pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictResponse"},"DeletePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to delete"}},"required":["id"],"title":"DeletePronunciationDictRequest"},"DeletePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the deleted pronunciation dictionary"},"deleted":{"type":"boolean","description":"Confirmation that the dictionary was deleted"}},"required":["id","deleted"],"title":"DeletePronunciationDictResponse"},"WavesV1SttPostParametersModel":{"type":"string","enum":["pulse-pro","pulse"],"title":"WavesV1SttPostParametersModel"},"WavesV1SttPostParametersLanguage":{"type":"string","enum":["en","hi","de","es","ru","it","fr","nl","pt","uk","pl","cs","sk","lv","et","ro","fi","sv","bg","hu","da","lt","mt","zh","ja","ko","multi-eu","multi-asian"],"title":"WavesV1SttPostParametersLanguage"},"WavesV1SttPostParametersWebhookMethod":{"type":"string","enum":["GET","POST"],"default":"POST","title":"WavesV1SttPostParametersWebhookMethod"},"WavesV1SttPostParametersRedactPii":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersRedactPii"},"WavesV1SttPostParametersRedactPci":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersRedactPci"},"WavesV1SttPostParametersEmotionDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersEmotionDetection"},"WavesV1SttPostParametersGenderDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersGenderDetection"},"Word":{"type":"object","properties":{"word":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"confidence":{"type":"number","format":"double"},"speaker":{"type":"string","description":"Present when `diarize=true`."}},"title":"Word"},"Utterance":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"string"}},"title":"Utterance"},"TranscriptionResponseMetadata":{"type":"object","properties":{"duration":{"type":"number","format":"double","description":"Audio duration in seconds."},"processing_time_ms":{"type":"number","format":"double","description":"Pulse Pro only."},"rtfx":{"type":"number","format":"double","description":"Real-time factor for this request (Pulse Pro only)."},"num_chunks":{"type":"number","format":"double","description":"Number of internal chunks the audio was split into (Pulse Pro only)."},"filename":{"type":"string","description":"Pulse responses include this when sent via URL."},"fileSize":{"type":"number","format":"double","description":"Bytes received (Pulse responses)."}},"title":"TranscriptionResponseMetadata"},"TranscriptionResponse":{"type":"object","properties":{"status":{"type":"string"},"transcription":{"type":"string"},"words":{"type":"array","items":{"$ref":"#/components/schemas/Word"}},"utterances":{"type":"array","items":{"$ref":"#/components/schemas/Utterance"},"description":"Sentence-level segments with optional speaker labels. Returned by `?model=pulse` only; Pulse Pro responses omit this field."},"language":{"type":"string"},"metadata":{"$ref":"#/components/schemas/TranscriptionResponseMetadata"},"request_id":{"type":"string"},"gender":{"type":"string","description":"Detected speaker gender label. Present when `gender_detection=true` was set on the request."},"emotions":{"type":"object","additionalProperties":{"type":"number","format":"double"},"description":"Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request."}},"required":["status","transcription"],"title":"TranscriptionResponse"},"AsyncAccepted":{"type":"object","properties":{"status":{"type":"string"},"request_id":{"type":"string"}},"required":["status","request_id"],"description":"Returned by Pulse Pro when `webhook_url` is set. The transcription arrives on the webhook when ready.","title":"AsyncAccepted"},"Speech to Text_transcribe_Response_200":{"oneOf":[{"$ref":"#/components/schemas/TranscriptionResponse"},{"$ref":"#/components/schemas/AsyncAccepted"}],"title":"Speech to Text_transcribe_Response_200"},"ToolCallType":{"type":"string","enum":["function"],"title":"ToolCallType"},"ToolCallFunction":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded argument object."}},"required":["name","arguments"],"title":"ToolCallFunction"},"ToolCall":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ToolCallType"},"function":{"$ref":"#/components/schemas/ToolCallFunction"}},"required":["id","type","function"],"title":"ToolCall"},"ElectronMessage":{"type":"object","properties":{"role":{"type":"string","description":"Message role — one of `system`, `user`, `assistant`, or `tool`.\n`tool` is used to feed a function-call result back to the model on the next turn.\n"},"content":{"type":["string","null"],"description":"Text content for the message. `null` is permitted on assistant messages that carry only `tool_calls`."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}},"tool_call_id":{"type":"string","description":"Required when `role` is `\"tool\"`."}},"required":["role"],"title":"ElectronMessage"},"ChatCompletionRequestStreamOptions":{"type":"object","properties":{"include_usage":{"type":"boolean","description":"Append a final SSE chunk with the `usage` block. Strongly\nrecommended for any caller that tracks token consumption.\n"}},"title":"ChatCompletionRequestStreamOptions"},"ToolType":{"type":"string","enum":["function"],"title":"ToolType"},"ToolParameters":{"type":"object","properties":{},"description":"JSON Schema for the tool's parameters.","title":"ToolParameters"},"Tool":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolType"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"$ref":"#/components/schemas/ToolParameters","description":"JSON Schema for the tool's parameters."}},"required":["type","name"],"title":"Tool"},"ChatCompletionRequestToolChoice0":{"type":"string","enum":["auto","required","none"],"title":"ChatCompletionRequestToolChoice0"},"ChatCompletionRequestToolChoiceOneOf1Type":{"type":"string","enum":["function"],"title":"ChatCompletionRequestToolChoiceOneOf1Type"},"ChatCompletionRequestToolChoiceOneOf1Function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"title":"ChatCompletionRequestToolChoiceOneOf1Function"},"ChatCompletionRequestToolChoice1":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ChatCompletionRequestToolChoiceOneOf1Type"},"function":{"$ref":"#/components/schemas/ChatCompletionRequestToolChoiceOneOf1Function"}},"required":["type","function"],"title":"ChatCompletionRequestToolChoice1"},"ChatCompletionRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestToolChoice0"},{"$ref":"#/components/schemas/ChatCompletionRequestToolChoice1"}],"title":"ChatCompletionRequestToolChoice"},"ChatCompletionRequestResponseFormatType":{"type":"string","enum":["text","json_object"],"title":"ChatCompletionRequestResponseFormatType"},"ChatCompletionRequestResponseFormat":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ChatCompletionRequestResponseFormatType"}},"description":"Output shape. `{type: \"text\"}` (default) or `{type: \"json_object\"}`.\n","title":"ChatCompletionRequestResponseFormat"},"ChatCompletionRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"ChatCompletionRequestStop"},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","description":"Model ID. Currently only `\"electron\"`."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ElectronMessage"},"description":"Chat history. Standard OpenAI message array."},"temperature":{"type":"number","format":"double","default":1,"description":"Sampling temperature."},"top_p":{"type":"number","format":"double","default":1,"description":"Nucleus sampling."},"max_tokens":{"type":"integer","description":"Maximum output tokens. Combined input + output context ceiling\nis 32,768.\n"},"stream":{"type":"boolean","default":false,"description":"When true, response is `text/event-stream`. See the\n[Streaming guide](/waves/documentation/llm-electron/streaming).\n"},"stream_options":{"$ref":"#/components/schemas/ChatCompletionRequestStreamOptions"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"Tool / function calling definitions. Standard OpenAI shape.\nSee [Tool Calling](/waves/documentation/llm-electron/tool-function-calling).\n"},"tool_choice":{"$ref":"#/components/schemas/ChatCompletionRequestToolChoice"},"response_format":{"$ref":"#/components/schemas/ChatCompletionRequestResponseFormat","description":"Output shape. `{type: \"text\"}` (default) or `{type: \"json_object\"}`.\n"},"stop":{"$ref":"#/components/schemas/ChatCompletionRequestStop"},"seed":{"type":"integer","description":"Best-effort determinism."},"logit_bias":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"logprobs":{"type":"boolean","default":false},"top_logprobs":{"type":"integer"},"presence_penalty":{"type":"number","format":"double","default":0},"frequency_penalty":{"type":"number","format":"double","default":0},"user":{"type":"string","description":"Opaque end-user identifier. Not interpreted by Electron."}},"required":["model","messages"],"description":"Most OpenAI Chat Completions request fields are accepted as\npassthrough. Explicitly rejected: `n > 1`, `prompt_logprobs`.\n","title":"ChatCompletionRequest"},"ChatCompletionObject":{"type":"string","enum":["chat.completion"],"title":"ChatCompletionObject"},"ChatCompletionChoicesItemsFinishReason":{"type":"string","enum":["stop","length","tool_calls","content_filter"],"title":"ChatCompletionChoicesItemsFinishReason"},"ChatCompletionChoicesItems":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/ElectronMessage"},"finish_reason":{"$ref":"#/components/schemas/ChatCompletionChoicesItemsFinishReason"}},"title":"ChatCompletionChoicesItems"},"UsagePromptTokensDetails":{"type":"object","properties":{"cached_tokens":{"type":"integer","description":"Subset of `prompt_tokens` served from prefix cache. Billed at\nthe discounted rate ($0.10 / 1M vs $0.40 / 1M for fresh input).\n"}},"title":"UsagePromptTokensDetails"},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Total input tokens (cached + uncached)."},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"$ref":"#/components/schemas/UsagePromptTokensDetails"}},"title":"Usage"},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"$ref":"#/components/schemas/ChatCompletionObject"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"$ref":"#/components/schemas/ChatCompletionChoicesItems"}},"usage":{"$ref":"#/components/schemas/Usage"}},"title":"ChatCompletion"},"ErrorErrorDetailsItems":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"title":"ErrorErrorDetailsItems"},"ErrorError":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message."},"type":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorErrorDetailsItems"},"description":"Validation issues, when applicable. Each entry includes the JSON\npath to the offending field plus a short reason. Present on\nschema-validation failures (e.g. `n > 1`, `prompt_logprobs`).\n"},"request_id":{"type":"string","description":"Echo in support tickets so the request can be traced."}},"title":"ErrorError"},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorError"}},"title":"Error"}},"securitySchemes":{"BearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}}}