{"openapi":"3.1.0","info":{"title":"Models API","version":"1.0.0"},"paths":{"/console/v1/auth/token":{"post":{"operationId":"auth_create_access_token","summary":"Create access token","description":"Mint a short-lived access token from your API key. Call this from your server,\nthen hand the returned `access_token` to a browser or mobile client. The client\nsends it as `Authorization: Bearer <access_token>` on TTS, STT and speech-to-speech\nrequests. On\nWebSocket connections it can also go in the `api_key` query parameter. HTTP\nrequests must use the header.\n\nA token works any number of times until it expires. It is accepted only on\nTTS, STT and speech-to-speech inference routes: `POST /waves/v1/stt/`, `WSS /waves/v1/stt/live`,\n`POST /waves/v1/tts`, `POST /waves/v1/tts/live`, `WSS /waves/v1/tts/live`, the\ndedicated Lightning v3.1 routes (`POST /waves/v1/lightning-v3.1/get_speech`,\n`POST /waves/v1/lightning-v3.1/stream`, `WSS /waves/v1/lightning-v3.1/get_speech/stream`),\n`WSS /waves/v1/s2s`, and the voice-listing routes (public catalog, no cloned\nvoices). Treat any route not listed as unavailable to tokens. This endpoint,\n`POST /waves/v1/pulse/get_text`, voice cloning, pronunciation dictionaries,\nanalytics and chat completions return `403` to a token.\n\nRequests made with a token are billed to the API key that minted it. Deleting\nthat key invalidates its tokens. A token works in every region:\n`api.smallest.ai`, `api.india.smallest.ai` (Mumbai) and `api.us.smallest.ai` (Oregon).\n\nSend the API key as exactly `Authorization: Bearer <API key>`. This endpoint replaces\n`POST /waves/v1/auth/token`, whose tokens work only in the region that minted them.\n\n```bash\ncurl -X POST \"https://api.smallest.ai/console/v1/auth/token\" \\\n  -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ttl_seconds\": 300}'\n```\n\nSee the [Authentication guide](/api-reference/token-based-authentication)\nfor the end-to-end server and client flow.\n","tags":["auth"],"responses":{"201":{"description":"Token created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenResponse"}}}},"400":{"description":"`ttl_seconds` is not an integer between 30 and 900.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}},"403":{"description":"The request was authenticated with an access token or an admin `X-API-Key` (only an API key can mint tokens), or the account, its email domain or its organization is blocked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}},"429":{"description":"Too many mint requests. Mint one token per client session and retry after a short wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}},"503":{"description":"Temporarily unavailable. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccessTokenRequest"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/auth/token":{"post":{"operationId":"accessTokens_createAccessTokenLegacy","summary":"Create access token (deprecated)","description":"Deprecated. Use [`POST /console/v1/auth/token`](/api-reference/models/access-tokens/create-access-token)\ninstead. This endpoint still works, but a token it mints is valid only in the region\nthat minted it (`api.india.smallest.ai` or `api.us.smallest.ai`). The request body\nand responses are the same as the console endpoint. It will be retired with advance\nnotice.\n","tags":["accessTokens"],"responses":{"201":{"description":"Token created. Valid only in the region that minted it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenResponse"}}}},"400":{"description":"`ttl_seconds` is not an integer between 30 and 900.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}},"403":{"description":"The request was authenticated with an access token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleErrorResponse"}}}}},"deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccessTokenRequest"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/tts":{"post":{"operationId":"textToSpeech_synthesizeSpeech","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`, `lightning_v3.1_pro` for the Pro pool, or `lightning_v3.1_pro_10_26` for the [preview Pro checkpoint](/model-cards/text-to-speech/lightning-v-3-1-pro#checkpoints) for English, Spanish and Hindi. Other request parameters are identical across models. `lightning_v3.1` will be retired on Nov 30, 2026 (18:30 UTC); use `lightning_v3.1_pro`. See [Deprecation notices](/api-reference/deprecations/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). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On the preview checkpoint `lightning_v3.1_pro_10_26`, pass `en` (English), `es` (Spanish with English code-switching) or `hi` (Hindi with English code-switching); see [Checkpoints](/model-cards/text-to-speech/lightning-v-3-1-pro#checkpoints). On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.\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- 20 accepted language codes on `lightning_v3.1` (12 with trained voices, 8 additional routed via English/Hindi voices). On `lightning_v3.1_pro`: 31 languages with dedicated voices (10 Indic, 8 Asian & Middle Eastern, 13 European); `language: en` → UK + American accented English; `language: hi` → Indian accented English + Hindi; omit `language` → defaults to `en + hi`. Both models accept `language: auto` for cross-language routing.\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_*`) work with the pool they were cloned onto. The voice-cloning API accepts `model: lightning-v3.1` (default) or `lightning-v3.1-pro`; pair the resulting `voice_id` with the matching TTS `model` (`lightning_v3.1` or `lightning_v3.1_pro`). Check the clone's `modelIds` if unsure.\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":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1TtsPostParametersAccept"}},{"name":"x-expire-content","in":"header","description":"**Enterprise plans only.** Set to `true` to expire this request's\ncontent. The input text is deleted within 7 days; the usage record\n(credits, character count, model, latency) is kept. Omit the\nheader to keep content. On other plans the header is ignored and\nthe request is processed normally.\nSee [Zero Data Retention](/models/enterprise/zero-data-retention).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1TtsPostParametersXExpireContent"}}],"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"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/tts/live":{"post":{"operationId":"textToSpeech_synthesizeSpeechSse","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](/models/text-to-speech/streaming).\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>\", \"done\": false, \"status\": \"206\"}\\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: {\"status\": \"200\", \"done\": true}\\n\\n` frame marks end of stream. Detect the terminator with `done == true`; every chunk frame also carries `done: false`, so `\"done\" in msg` matches every frame.\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":"x-expire-content","in":"header","description":"**Enterprise plans only.** Set to `true` to expire this request's\ncontent. The input text is deleted within 7 days; the usage record\n(credits, character count, model, latency) is kept. Omit the\nheader to keep content. On other plans the header is ignored and\nthe request is processed normally.\nSee [Zero Data Retention](/models/enterprise/zero-data-retention).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1TtsLivePostParametersXExpireContent"}}],"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"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/{model}/get_voices":{"get":{"operationId":"voices_getWavesVoices","summary":"Get voices for a pool","description":"Return the voice catalog for the chosen Lightning v3.1 pool. Two pools:\n\n- `lightning-v3.1`: the Standard catalog. Retiring on Nov 30, 2026; use `lightning-v3.1-pro`.\n- `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.\n\nThe endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.\n\nEach voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `\"model\": \"lightning_v3.1\"` (Standard), `\"model\": \"lightning_v3.1_pro\"` (Pro) or `\"model\": \"lightning_v3.1_pro_10_26\"` (Pro voices on the [preview checkpoint](/model-cards/text-to-speech/lightning-v-3-1-pro#checkpoints) for English, Spanish and Hindi).\n\nFor the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards.\n","tags":["voices"],"parameters":[{"name":"model","in":"path","description":"The pool to query. `lightning-v3.1` returns Standard voices; `lightning-v3.1-pro` returns Pro voices. Note the hyphenated path form differs from the underscored body form used on `POST /waves/v1/tts` (`lightning_v3.1`, `lightning_v3.1_pro`).\n","required":true,"schema":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetParametersModel"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voices_getWavesVoices_Response_200"}}}},"400":{"description":"Bad request. The most common cause is a `{model}` value outside the enum. Use `lightning-v3.1` or `lightning-v3.1-pro`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestBadRequestError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestInternalServerError"}}}}}}},"/waves/v1/voice-cloning":{"post":{"operationId":"voiceCloning_createVoiceClone","summary":"Create a Voice Clone","description":"Create an instant voice clone in a single call. Defaults to `lightning-v3.1`.\n","tags":["voiceCloning"],"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","minLength":1,"maxLength":500,"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":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaLanguage","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`.\nThe server validates and rejects unsupported codes with a 400.\n"},"model":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel","default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\nPass `lightning-v3.1-pro` to clone onto the premium Pro pool.\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"]}}}},"security":[{"BearerAuth":[]}]},"get":{"operationId":"voiceCloning_listVoiceClones","summary":"List Voice Clones","description":"Retrieve all voice clones in your organization.\n","tags":["voiceCloning"],"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"}}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/pronunciation-dicts":{"get":{"operationId":"pronunciationDictionaries_getPronunciationDicts","summary":"List","description":"Retrieve all pronunciation dictionaries for the authenticated user","tags":["pronunciationDictionaries"],"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"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"pronunciationDictionaries_createPronunciationDict","summary":"Create","description":"Create a new pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"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"}}}},"security":[{"BearerAuth":[]}]},"put":{"operationId":"pronunciationDictionaries_updatePronunciationDict","summary":"Update","description":"Update an existing pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"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"}}}},"security":[{"BearerAuth":[]}]},"delete":{"operationId":"pronunciationDictionaries_deletePronunciationDict","summary":"Delete","description":"Delete an existing pronunciation dictionary for the authenticated user","tags":["pronunciationDictionaries"],"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"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/stt/":{"post":{"operationId":"speechToText_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 (21 streaming + 12 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?model=pulse`).\n\nPulse Pro is HTTP-only.\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`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).\n- **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.\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 (21 streaming + 12 pre-recorded 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, use `WSS /waves/v1/stt/live` (different supported-language set).\n\nAlways pass `language`. To auto-detect, pass one of the regional aggregators in the enum. On Pulse Pro, only `en` is accepted; any other value returns HTTP 400.\n\n**Single-language codes:** `en`, `hi`, `de`, `es`, `ru`, `it`, `fr`, `nl`, `pt`, `zh`, `ja`, `ko`.\n\n**Regional auto-detect aggregators** for unknown audio:\n- `multi-eu` auto-detects across the European codes plus `en`.\n- `multi-asian` auto-detects across `zh`, `ko`, `ja`, `en`.\n- `multi-indic` auto-detects across `en`, `hi`, `gu`, `mr`, `bn`, `or`. India region only.\n\n**Automatic detection (`auto`, beta, US region only).** Pass `language=auto` on `model=pulse` and the\nspoken language is detected from the audio, then transcribed with that language's model. The response adds\n`detected_language`, `language_confidence` and `mixed_language_detected`. One language is picked per file;\nif several languages are spoken, the dominant one is used and `mixed_language_detected` is `true`.\nDetection fails with an error instead of guessing: `NO_SPEECH_DETECTED` (422),\n`LANGUAGE_DETECTION_LOW_CONFIDENCE` (422, also returned when the audio has no identifiable language, such as music or noise),\n`DETECTED_LANGUAGE_NOT_SUPPORTED` (400), `LANGUAGE_NOT_ENABLED_IN_REGION` (400; includes `detected_language` when the detected language is not deployed in the region, and omits it when `auto` itself is not enabled, for example outside the US region),\n`LID_UNAVAILABLE` (503). On these errors, retry with `language` set explicitly. Not available on `pulse-pro` or on streaming.\nDetection works best with at least about 10 seconds of speech; on clips of a few seconds it is less reliable and more\noften returns `LANGUAGE_DETECTION_LOW_CONFIDENCE`, so pass `language` explicitly for short clips when you know it.\n\n**Region gating.** Indic single-language codes and `multi-indic` are enabled in the India region only. `zh`, `ja`, `ko`, and `multi-asian` are enabled in every region. Set `language` explicitly when you know the audio language; omission may return `LANGUAGE_NOT_ENABLED_IN_REGION` if the `multi-*` auto-detect aggregator (not `language=auto`) is not enabled for your region.\n\n- **Pulse Pro**: pass `en`. Any other value returns HTTP 400 at validation.\n- **Pulse**: pass any code above. See the [Pulse model card](/model-cards/speech-to-text/pulse) for the full table with language names.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersLanguage"}},{"name":"word_timestamps","in":"query","description":"Include the per-word `words[]` array in the response. Each entry carries the recognized `word`, its `start`/`end` timestamps, and a per-word `confidence` score (0.0 to 1.0). With `diarize=true`, entries also include `speaker`.\n\nMust be the lowercase string `\"true\"` or `\"false\"`. Any other value (including integer or capitalized variants) returns HTTP 400.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersWordTimestamps","default":"false"}},{"name":"diarize","in":"query","description":"Multi-speaker identification. Adds per-word and per-utterance speaker labels.\n\nMust be the lowercase string `\"true\"` or `\"false\"`. Any other value (including integer or capitalized variants) returns HTTP 400.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersDiarize","default":"false"}},{"name":"keywords","in":"query","description":"Pulse only. Boost recognition of specific words or phrases for this request. The same parameter works on the realtime WebSocket endpoint.\n\n**Entry format:** `KEYWORD` or `KEYWORD:INTENSIFIER`, where `INTENSIFIER` is a number that defaults to `1`. Example: `Blackwell:2,Jensen Huang:2`. Matching is case-sensitive. Duplicates: last-wins (`NVIDIA:1,NVIDIA:5` is equivalent to `NVIDIA:5`). Max 1000 keywords per request; sending more returns `400` with `keywords too large (max 1000)` in `errors[]`.\n\n**Encodings.** Comma-string (recommended), repeated key (`keywords=a&keywords=b`), and bracketed array (`keywords[]=a`) are all accepted. A JSON-array literal (`[\"a\",\"b\"]`) does not boost. Pass the raw string.\n\n**Intensifier.** Default `1`, recommended `1` to `3`. Above `10` is not recommended: higher values increase the chance of hallucinating the keyword when it was not spoken. Reuse the same keyword list across requests when the vocabulary is stable.\n\nSee [Keyword Boosting](/models/speech-to-text/features/keyword-boosting) for the full contract and worked examples.\n","required":false,"schema":{"type":"string"}},{"name":"webhook_url","in":"query","description":"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.","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.","required":false,"schema":{"type":"string"}},{"name":"redact_pii","in":"query","description":"Pulse only. Applies with `?model=pulse`; Pulse Pro ignores it and returns the transcript unredacted. Redact personally identifiable information from the transcript. Tokens use the shape `[ENTITYTYPE_N]` where N is a per-entity sequential index (e.g. `[FIRSTNAME_1]`). Entity types include `FIRSTNAME`, `LASTNAME`, `PHONENUMBER`, `ADDRESS`, `EMAIL`.\n\n**Language support:** effective on `en` and `hi`. Accepted on other codes but redaction is not reliable.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersRedactPii","default":"false"}},{"name":"redact_pci","in":"query","description":"Pulse only. Applies with `?model=pulse`; Pulse Pro ignores it and returns the transcript unredacted. Redact payment card information. Tokens use the shape `[ENTITYTYPE_N]`. Known entity types include `ACCOUNTNAME` (cardholder name), `CREDITCARDNUMBER` (card PAN), `CREDITCARDCVV`, `ZIPCODE`, `ACCOUNTNUMBER`. Use alongside `redact_pii=true` for combined PII + PCI redaction.\n\n**Language support:** currently effective only on `en` and `hi`. Setting `redact_pci=true` on other language codes is accepted but does not redact.\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":"x-expire-content","in":"header","description":"**Enterprise plans only.** Set to `true` to expire this request's\ncontent. The uploaded audio and the transcript are deleted within\n7 days; the usage record (duration, model, latency) is kept. Omit\nthe header to keep content. On other plans the header is ignored\nand the request is processed normally.\nSee [Zero Data Retention](/models/enterprise/zero-data-retention).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1SttPostParametersXExpireContent"}}],"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":"Invalid query parameters, empty audio, a language the model does not support, or a language not enabled in this region.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"401":{"description":"API key missing, invalid, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"403":{"description":"Plan does not include access to the requested model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"413":{"description":"Audio too long (over the duration limit) or, with `language=auto`, rejected as too large or too long by language detection. The body has `status`, `code` and `message`; `request_id` is included on the duration-limit error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"422":{"description":"`language=auto` could not determine the spoken language: no speech, or not enough confidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"429":{"description":"RPM cap exceeded (Standard plan default 25/min per model). Retry with exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"500":{"description":"Unexpected server-side failure. Retry with exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}},"503":{"description":"Transcription service temporarily unavailable. Retry after a short backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SttErrorResponse"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"security":[{"BearerAuth":[]}]}},"/waves/v1/chat/completions":{"post":{"operationId":"electron_complete","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](/models/llm/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":["electron"],"parameters":[{"name":"x-expire-content","in":"header","description":"**Enterprise plans only.** Set to `true` to expire this request's\ncontent. Prompts and completions are deleted within 7 days; the\nusage record (token counts, model, latency) is kept. Omit the\nheader to keep content. On other plans the header is ignored and\nthe request is processed normally.\nSee [Zero Data Retention](/models/enterprise/zero-data-retention).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1ChatCompletionsPostParametersXExpireContent"}}],"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](/api-reference/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"}}}},"security":[{"BearerAuth":[]}]}}},"tags":[{"name":"auth"},{"name":"accessTokens"},{"name":"textToSpeech"},{"name":"voices"},{"name":"voiceCloning"},{"name":"pronunciationDictionaries"},{"name":"speechToText"},{"name":"electron"}],"servers":[{"url":"https://api.smallest.ai","description":"waves"}],"components":{"schemas":{"CreateAccessTokenRequest":{"type":"object","properties":{"ttl_seconds":{"type":"integer","minimum":30,"maximum":900,"default":300,"description":"How long the token stays valid, in seconds. Between 30 and 900. Defaults to 300 when omitted."}},"title":"CreateAccessTokenRequest"},"AccessTokenResponseTokenType":{"type":"string","enum":["Bearer"],"description":"Always `Bearer`.","title":"AccessTokenResponseTokenType"},"AccessTokenResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"The short-lived token. Always starts with `wat_`. Send it as `Authorization: Bearer <access_token>`."},"token_type":{"$ref":"#/components/schemas/AccessTokenResponseTokenType","description":"Always `Bearer`."},"expires_in":{"type":"integer","description":"Seconds until the token expires, equal to the `ttl_seconds` that was applied."},"expires_at":{"type":"string","format":"date-time","description":"Expiry time in UTC (ISO 8601)."}},"required":["access_token","token_type","expires_in","expires_at"],"title":"AccessTokenResponse"},"ValidationErrorResponseStatus":{"type":"string","enum":["error"],"title":"ValidationErrorResponseStatus"},"ValidationErrorResponseErrorsItems":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"title":"ValidationErrorResponseErrorsItems"},"ValidationErrorResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ValidationErrorResponseStatus"},"message":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorResponseErrorsItems"},"description":"One entry per failed field."}},"title":"ValidationErrorResponse"},"SimpleErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"title":"SimpleErrorResponse"},"WavesV1TtsPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1TtsPostParametersAccept"},"WavesV1TtsPostParametersXExpireContent":{"type":"string","enum":["true"],"title":"WavesV1TtsPostParametersXExpireContent"},"TtsRequestModel":{"type":"string","enum":["lightning_v3.1","lightning_v3.1_pro","lightning_v3.1_pro_10_26"],"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. Retiring on Nov\n  30, 2026; use `lightning_v3.1_pro`.\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](/model-cards/text-to-speech/lightning-v-3-1-pro)\n  for supported voice IDs.\n- `lightning_v3.1_pro_10_26` — [preview] New Lightning v3.1 Pro\n  checkpoint for English, Spanish and Hindi. Accepts every Pro\n  voice. On 2026-11-28, it becomes the stable `lightning_v3.1_pro`\n  for these three languages only; all other languages are\n  unchanged. `lightning_v3.1_pro_10_26` remains available until\n  2026-12-28. See [Checkpoints](/model-cards/text-to-speech/lightning-v-3-1-pro#checkpoints).\n\nSame concurrency and latency profile across all three. 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":["auto","en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es","de","fr","it","nl","sv","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\n**Default on `lightning_v3.1_pro`:** when `language` is omitted, the\nPro pool defaults to **`en + hi`** (mixed Indian + Western English\ncoverage, auto-detected from the input text).\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**`auto` (recommended for cross-language use cases):** routes internally\nbased on the input text. Any English or Hindi voice can be used\nacross all supported languages when `auto` is set; the platform\nhandles language-appropriate routing without needing a code per\ncall.\n\n**On `lightning_v3.1`** — 20 supported languages:\n- 10 European: English, Spanish, French, German, Italian, Dutch, Swedish, Portuguese, Polish, Russian\n- 10 Indic: Hindi, Marathi, Gujarati, Punjabi, Bengali, Odia, Tamil, Telugu, Kannada, Malayalam\n\n**On `lightning_v3.1_pro`** — 31 supported languages (adds 11 over base):\n- 13 European: base 10 plus Greek, Finnish, Norwegian\n- 8 Asian & Middle Eastern: Chinese, Japanese, Korean, Indonesian, Malay, Vietnamese, Turkish, Arabic\n- 10 Indic: same as base\n- Pass `en` → UK + American accented English.\n- Pass `hi` → Indian accented English + Hindi (code-switching).\n- Omit `language` → defaults to `en + hi` (mixed Indian + Western English coverage, auto-detected from input text).\n\nOn `lightning_v3.1_pro_10_26`, use `en` (English), `es` (Spanish with English code-switching) or `hi` (Hindi with English code-switching).\n","title":"TtsRequestLanguage"},"TtsRequestNumberPronunciationLanguage":{"type":"string","enum":["auto","en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es","de","fr","it","nl","sv","pt","ru","el","fi","no","pl","ar","zh","id","ja","ko","ms","tr","vi"],"description":"Optional. Sets the language used to read out numeric content —\nnumbers, currency amounts, times, and the numeric parts of dates\nand years — independently of the synthesis voice. Ordinary words\nare not translated.\n\n- If you **omit `language`**, this value also becomes the\n  synthesis language: model selection and voice routing follow it.\n- If you **set `language` explicitly**, `language` always wins for\n  synthesis and `number_pronunciation_language` only changes how\n  numeric content is normalized. It works both ways — read numbers\n  in Hindi under an English voice, or in English under a Hindi\n  voice (tuned for Indian, often mixed-script, use cases).\n- Omit this field to keep the existing behaviour — normalization\n  follows `language`.\n\nNote: only numeric tokens are re-spoken; the words around them\nstay in the text language. On a cross-language request names may\nalso render in the target script (e.g. \"Smith\" → \"स्मिथ\"), which\nis generally the desired reading for native-language voices.\n\nAccepts the same language codes as `language` (including `auto`,\n`nl`, `sv`).\n","title":"TtsRequestNumberPronunciationLanguage"},"TtsRequestDateFormat":{"type":"string","enum":["EU","US"],"description":"Optional. Controls how all-numeric dates (e.g. `05/03/2024`) are\nread out, independent of the synthesis voice:\n\n- `EU` — day/month order (`DD/MM`): `05/03/2024` → \"fifth March,\n  twenty twenty four\".\n- `US` — month/day order (`MM/DD`): `05/03/2024` → \"May third,\n  twenty twenty four\".\n\nOmit this field to keep the existing behaviour: English dates\ndefault to `US` (`MM/DD`). Applies across all languages, so you can\nforce day-first (`DD/MM`) reading — e.g. the Indian convention — on\nany voice.\n","title":"TtsRequestDateFormat"},"TtsRequestContentFilterAction":{"type":"string","enum":["reject","flag","redact"],"default":"reject","description":"What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match; `redact` removes the matched term and synthesizes the rest.","title":"TtsRequestContentFilterAction"},"TtsRequestContentFilter":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Must be the literal `true` to enable the filter. Any other value leaves it off."},"action":{"$ref":"#/components/schemas/TtsRequestContentFilterAction","default":"reject","description":"What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match; `redact` removes the matched term and synthesizes the rest."}},"description":"Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nrewrites your text only with `action: redact`; otherwise it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/text-to-speech/content-filter).\n","title":"TtsRequestContentFilter"},"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","minLength":1,"maxLength":8000,"default":"Hello from Waves TTS.","description":"The text to convert to speech. Max 8000 characters after trim; whitespace-only strings are rejected."},"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. Retiring on Nov\n  30, 2026; use `lightning_v3.1_pro`.\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](/model-cards/text-to-speech/lightning-v-3-1-pro)\n  for supported voice IDs.\n- `lightning_v3.1_pro_10_26` — [preview] New Lightning v3.1 Pro\n  checkpoint for English, Spanish and Hindi. Accepts every Pro\n  voice. On 2026-11-28, it becomes the stable `lightning_v3.1_pro`\n  for these three languages only; all other languages are\n  unchanged. `lightning_v3.1_pro_10_26` remains available until\n  2026-12-28. See [Checkpoints](/model-cards/text-to-speech/lightning-v-3-1-pro#checkpoints).\n\nSame concurrency and latency profile across all three. 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","minimum":0.5,"maximum":2,"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\n**Default on `lightning_v3.1_pro`:** when `language` is omitted, the\nPro pool defaults to **`en + hi`** (mixed Indian + Western English\ncoverage, auto-detected from the input text).\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**`auto` (recommended for cross-language use cases):** routes internally\nbased on the input text. Any English or Hindi voice can be used\nacross all supported languages when `auto` is set; the platform\nhandles language-appropriate routing without needing a code per\ncall.\n\n**On `lightning_v3.1`** — 20 supported languages:\n- 10 European: English, Spanish, French, German, Italian, Dutch, Swedish, Portuguese, Polish, Russian\n- 10 Indic: Hindi, Marathi, Gujarati, Punjabi, Bengali, Odia, Tamil, Telugu, Kannada, Malayalam\n\n**On `lightning_v3.1_pro`** — 31 supported languages (adds 11 over base):\n- 13 European: base 10 plus Greek, Finnish, Norwegian\n- 8 Asian & Middle Eastern: Chinese, Japanese, Korean, Indonesian, Malay, Vietnamese, Turkish, Arabic\n- 10 Indic: same as base\n- Pass `en` → UK + American accented English.\n- Pass `hi` → Indian accented English + Hindi (code-switching).\n- Omit `language` → defaults to `en + hi` (mixed Indian + Western English coverage, auto-detected from input text).\n\nOn `lightning_v3.1_pro_10_26`, use `en` (English), `es` (Spanish with English code-switching) or `hi` (Hindi with English code-switching).\n"},"number_pronunciation_language":{"$ref":"#/components/schemas/TtsRequestNumberPronunciationLanguage","description":"Optional. Sets the language used to read out numeric content —\nnumbers, currency amounts, times, and the numeric parts of dates\nand years — independently of the synthesis voice. Ordinary words\nare not translated.\n\n- If you **omit `language`**, this value also becomes the\n  synthesis language: model selection and voice routing follow it.\n- If you **set `language` explicitly**, `language` always wins for\n  synthesis and `number_pronunciation_language` only changes how\n  numeric content is normalized. It works both ways — read numbers\n  in Hindi under an English voice, or in English under a Hindi\n  voice (tuned for Indian, often mixed-script, use cases).\n- Omit this field to keep the existing behaviour — normalization\n  follows `language`.\n\nNote: only numeric tokens are re-spoken; the words around them\nstay in the text language. On a cross-language request names may\nalso render in the target script (e.g. \"Smith\" → \"स्मिथ\"), which\nis generally the desired reading for native-language voices.\n\nAccepts the same language codes as `language` (including `auto`,\n`nl`, `sv`).\n"},"date_format":{"$ref":"#/components/schemas/TtsRequestDateFormat","description":"Optional. Controls how all-numeric dates (e.g. `05/03/2024`) are\nread out, independent of the synthesis voice:\n\n- `EU` — day/month order (`DD/MM`): `05/03/2024` → \"fifth March,\n  twenty twenty four\".\n- `US` — month/day order (`MM/DD`): `05/03/2024` → \"May third,\n  twenty twenty four\".\n\nOmit this field to keep the existing behaviour: English dates\ndefault to `US` (`MM/DD`). Applies across all languages, so you can\nforce day-first (`DD/MM`) reading — e.g. the Indian convention — on\nany voice.\n"},"math_notation":{"type":"boolean","default":false,"description":"Opt-in flag that reads digit-flanked math operators (`5 x 3`,\n`2 ^ 10`, `6 ÷ 2`) as words instead of leaving them for the\ndefault number reader. Off by default because in real traffic\ndigit-flanked `NxN` is more often a product dimension, the\n`24x7` idiom, or a vehicle-registration code than an actual\nmultiplication.\n\nWhen `true`, the normalizer replaces the operator with the\nspoken word matched to `number_pronunciation_language`:\n\n| Glyphs | en (default / fallback) | hi | mr |\n|---|---|---|---|\n| `×` `x` `X` `*` | times | गुणा | गुणिले |\n| `÷` and spaced `/` | divided by | बटा | भागिले |\n| `+` | plus | प्लस | अधिक |\n| spaced `-` `–` `−` | minus | माइनस | वजा |\n| `=` | equals | बराबर | बरोबर |\n| `^` `**` | to the power of | की घात | ची घात |\n\nLocalized only for `hi` and `mr`; every other language falls\nback to the English words. The operator word follows\n`number_pronunciation_language`, not the synthesis\n`language`, so `language=en, number_pronunciation_language=hi`\nreads `6 x 7` as \"छः गुणा सात\".\n\nMatching rules: unambiguous glyphs (`× ÷ * ^ ** = +` and the\nwrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).\nThe ambiguous `-` `–` `−` and `/` fire only when\nspace-padded, so `5-3` stays a range and `1/2` stays a\nfraction. See [Math notation](/models/text-to-speech/math-notation)\nfor the full lexicon, known limitations (product dimensions,\n`24x7` idiom, vehicle-reg codes), and EU-language\nlocalizations.\n"},"content_filter":{"$ref":"#/components/schemas/TtsRequestContentFilter","description":"Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nrewrites your text only with `action: redact`; otherwise it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/text-to-speech/content-filter).\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](/models/text-to-speech/word-timestamps).\n"},"session_id":{"type":"string","pattern":"^[a-zA-Z0-9_\\-.]+$","maxLength":128,"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","pattern":"^[a-zA-Z0-9_\\-.]+$","maxLength":128,"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"},"WavesV1TtsLivePostParametersXExpireContent":{"type":"string","enum":["true"],"title":"WavesV1TtsLivePostParametersXExpireContent"},"WavesV1ModelGetVoicesGetParametersModel":{"type":"string","enum":["lightning-v3.1","lightning-v3.1-pro"],"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 (e.g. `american`, `british`, `indian`)."},"gender":{"type":"string","description":"Gender label (`male` or `female`)."},"age":{"type":"string","description":"Age range (e.g. `young`, `middle aged`, `senior`)."},"emotions":{"type":"array","items":{"type":"string"},"description":"Emotional ranges the voice supports. May be empty."},"usecases":{"type":"array","items":{"type":"string"},"description":"Recommended use cases (e.g. `conversational`, `narration`)."}},"description":"Metadata describing the voice. Filter client-side to find voices for a target language, accent, or use case. Fields may be empty on some voices.","title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique voice identifier. Pass this value as `voice_id` on `POST /waves/v1/tts` (or the streaming route)."},"displayName":{"type":"string","description":"Human-readable name for the voice."},"tags":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags","description":"Metadata describing the voice. Filter client-side to find voices for a target language, accent, or use case. Fields may be empty on some voices."}},"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 for the chosen pool."}},"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"},"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaLanguage":{"type":"string","enum":["en","hi","mr","kn","ta","bn","gu","de","fr","es","it","pl","nl","ru","ar","he","sv","ml","te","pt","pa","or"],"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`.\nThe server validates and rejects unsupported codes with a 400.\n","title":"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaLanguage"},"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel":{"type":"string","enum":["lightning-v3.1","lightning-v3.1-pro"],"default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\nPass `lightning-v3.1-pro` to clone onto the premium Pro pool.\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"},"PronunciationItem":{"type":"object","properties":{"word":{"type":"string","minLength":1,"description":"The word to be pronounced"},"pronunciation":{"type":"string","minLength":1,"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"},"ErrorResponseDetailsItems":{"type":"object","properties":{},"title":"ErrorResponseDetailsItems"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorResponseDetailsItems"},"description":"Additional error details (validation errors)"}},"required":["error"],"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","minLength":1,"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","minLength":1,"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","zh","ja","ko","multi-eu","multi-asian","multi-indic","auto"],"title":"WavesV1SttPostParametersLanguage"},"WavesV1SttPostParametersWordTimestamps":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersWordTimestamps"},"WavesV1SttPostParametersDiarize":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1SttPostParametersDiarize"},"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"},"WavesV1SttPostParametersXExpireContent":{"type":"string","enum":["true"],"title":"WavesV1SttPostParametersXExpireContent"},"Word":{"type":"object","properties":{"word":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"confidence":{"type":"number","format":"double","description":"Per-word confidence score, from 0.0 to 1.0."},"speaker":{"type":"integer","description":"Zero-indexed speaker label. Present on Pulse when `diarize=true`. Pulse Pro does not diarize, so this field is absent on Pro responses."},"speaker_confidence":{"type":"number","format":"double","description":"Speaker-attribution confidence for this word, from 0.0 to 1.0. Present on Pulse alongside `speaker`."}},"title":"Word"},"Utterance":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"integer","description":"Zero-indexed speaker label. Present when `diarize=true` was set on the request."}},"title":"Utterance"},"TranscriptionResponseMetadata":{"type":"object","properties":{"duration":{"type":"number","format":"double","description":"Audio duration in seconds. Present on both Pulse and Pulse Pro."},"processing_time_ms":{"type":"number","format":"double","description":"Server-side processing time in milliseconds. 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."},"fileSize":{"type":"number","format":"double","description":"Bytes received. Pulse only."}},"description":"Response metadata. Pulse responses carry `duration` and `fileSize`. Pulse Pro responses carry `duration`, `processing_time_ms`, `rtfx`, and `num_chunks`.","title":"TranscriptionResponseMetadata"},"TranscriptionResponse":{"type":"object","properties":{"status":{"type":"string"},"transcription":{"type":"string"},"words":{"type":"array","items":{"$ref":"#/components/schemas/Word"},"description":"Per-word timestamps. **Empty unless the request sets `word_timestamps=true`.** Each entry carries `word`, `start`, `end`, and `confidence` (0.0–1.0). Pulse responses with `diarize=true` also include `speaker` and `speaker_confidence`."},"utterances":{"type":"array","items":{"$ref":"#/components/schemas/Utterance"},"description":"Sentence-level segments. Returned by `?model=pulse` only; Pulse Pro responses omit this field entirely. **Empty on Pulse unless the request sets `word_timestamps=true`** (the same flag turns on both `words[]` and `utterances[]`)."},"detected_language":{"type":"string","description":"Language detected from the audio. Present only when the request used `language=auto`."},"language_confidence":{"type":"number","format":"double","description":"Confidence of `detected_language`, 0–1. Present only with `language=auto`."},"mixed_language_detected":{"type":"boolean","description":"True when parts of the file looked like languages served by different models. Present only with `language=auto`."},"language":{"type":"string","description":"Language of the transcription. Present on Pulse Pro responses; Pulse responses omit this field."},"metadata":{"$ref":"#/components/schemas/TranscriptionResponseMetadata","description":"Response metadata. Pulse responses carry `duration` and `fileSize`. Pulse Pro responses carry `duration`, `processing_time_ms`, `rtfx`, and `num_chunks`."},"request_id":{"type":"string","description":"Server-assigned request identifier. Present on Pulse Pro responses; Pulse responses omit this field."},"totalBytes":{"type":"number","format":"double","description":"Bytes received. Pulse Pro only."},"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. Current known keys: `anger`, `disgust`, `fear`, `sadness`, `happiness`."}},"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"},"SttErrorResponseStatus":{"type":"string","enum":["error"],"description":"Set to `error` on validation and transcription errors.","title":"SttErrorResponseStatus"},"SttErrorResponseErrorsOneOf0Items":{"type":"object","properties":{},"title":"SttErrorResponseErrorsOneOf0Items"},"SttErrorResponseErrors0":{"type":"array","items":{"$ref":"#/components/schemas/SttErrorResponseErrorsOneOf0Items"},"title":"SttErrorResponseErrors0"},"SttErrorResponseErrors":{"oneOf":[{"$ref":"#/components/schemas/SttErrorResponseErrors0"},{"type":"string"}],"description":"Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string.","title":"SttErrorResponseErrors"},"SttErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message on authentication, plan, credit, and rate-limit errors."},"status":{"$ref":"#/components/schemas/SttErrorResponseStatus","description":"Set to `error` on validation and transcription errors."},"message":{"type":"string","description":"Human-readable error message on validation and transcription errors, and on a missing `Authorization` header."},"error_code":{"type":"string","description":"Machine-readable error code. Known values: `LANGUAGE_NOT_ENABLED_IN_REGION`, `NO_SPEECH_DETECTED`, `LANGUAGE_DETECTION_LOW_CONFIDENCE`, `DETECTED_LANGUAGE_NOT_SUPPORTED`, `LID_UNAVAILABLE`."},"code":{"type":"string","description":"Machine-readable error code on some transcription failures. Known values: `AudioDecodeError`, `NoAudio`, `AudioTooLong`; with `language=auto` also `EmptyBody` and `AudioTooLarge` (400/413, from language detection)."},"language":{"type":"string","description":"Language code echoed on `LANGUAGE_NOT_ENABLED_IN_REGION` responses."},"detected_language":{"type":"string","description":"Language detected from the audio, on `language=auto` errors that have one."},"language_confidence":{"type":"number","format":"double","description":"Confidence of `detected_language`, on `language=auto` errors that have one."},"region":{"type":"string","description":"Region that served the request on `LANGUAGE_NOT_ENABLED_IN_REGION` responses (for example `ap-south-1` or `us-west-2`)."},"request_id":{"type":"string","description":"Correlation ID for support"},"errors":{"$ref":"#/components/schemas/SttErrorResponseErrors","description":"Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string."}},"description":"Error body returned by `POST /waves/v1/stt/`. The shape depends on where the request fails:\n\n- A request with no `Authorization` header returns `{ \"message\": \"Unauthorized: No tokens provided\" }`.\n- Other authentication errors, and plan, credit, and rate-limit errors, return `{ \"error\": \"<message>\" }`.\n- Request validation and transcription errors return `{ \"status\": \"error\", \"message\": \"<message>\" }`, with optional `errors`, `error_code`, `code`, `language`, `region`, and `request_id` fields.\n\nRead `error` first and fall back to `message`. Branch on the HTTP status and on `error_code` / `code` when present, not on the message text.\n","title":"SttErrorResponse"},"WavesV1ChatCompletionsPostParametersXExpireContent":{"type":"string","enum":["true"],"title":"WavesV1ChatCompletionsPostParametersXExpireContent"},"ElectronToolCallType":{"type":"string","enum":["function"],"title":"ElectronToolCallType"},"ElectronToolCallFunction":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded argument object."}},"required":["name","arguments"],"title":"ElectronToolCallFunction"},"ElectronToolCall":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ElectronToolCallType"},"function":{"$ref":"#/components/schemas/ElectronToolCallFunction"}},"required":["id","type","function"],"title":"ElectronToolCall"},"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/ElectronToolCall"}},"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"},"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","minimum":0,"maximum":2,"default":1,"description":"Sampling temperature."},"top_p":{"type":"number","format":"double","minimum":0,"maximum":1,"default":1,"description":"Nucleus sampling."},"max_tokens":{"type":"integer","minimum":1,"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](/models/llm/streaming).\n"},"stream_options":{"$ref":"#/components/schemas/ChatCompletionRequestStreamOptions"},"tools":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"Tool / function calling definitions. Forwarded verbatim to the\nOpenAI-compatible upstream, so the standard OpenAI shape\n(`{type: \"function\", function: {name, description, parameters}}`)\nis the recommended form and is what the examples below use.\nThe wire schema is permissive (`array<object>`) — any tools payload\nthe upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)\nfor details.\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","minimum":0,"maximum":20},"presence_penalty":{"type":"number","format":"double","minimum":-2,"maximum":2,"default":0},"frequency_penalty":{"type":"number","format":"double","minimum":-2,"maximum":2,"default":0},"user":{"type":"string","description":"Opaque end-user identifier. Not interpreted by Electron."},"prompt_cache_key":{"type":"string","description":"Groups the requests of one conversation so every turn reuses the\ncache. Create a new key (for example a UUID) when a conversation\nstarts, send it on every turn, and never share it between\nconversations. Affects speed only, never the reply. See\n[Optimizing Latency](/models/llm/optimizing-latency).\n"}},"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.\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","description":"API key authentication. Include your key as `Authorization: Bearer YOUR_API_KEY`. Access tokens are not accepted on this endpoint."}}}}