# Synthesize speech (JSON body) POST /v1/a/adapters/tts/{engine} Select code sample ``` const url = 'https://example.com/v1/a/adapters/tts/polly'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"model":"example","voice":"example","language":"example","speed":"example","format":"mp3","text":"example","sample_rate":1,"advanced_settings":{},"fallback":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ``` curl --request POST \ --url https://example.com/v1/a/adapters/tts/polly \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "model": "example", "voice": "example", "language": "example", "speed": "example", "format": "mp3", "text": "example", "sample_rate": 1, "advanced_settings": {}, "fallback": true }' ``` - /v1/a/adapters/tts/{engine} Synthesizes speech from a JSON body and streams the audio. ## Permission This operation needs the permission [`tts:synthesize:manage`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#tts-synthesize-manage). ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/account/#bearerauth)** ## Parameters ### Path Parameters **engine** required string Allowed values: polly azure gc ya\_v3 techmo elevenlabs alfanum voxtream kugel TTS engine selector. ## Request Bodyrequired Media typeapplication/json JSON synthesis request body (POST/DELETE). object **model** string **voice** string **language** string **speed** string **format** string default: mp3 **text** string **sample\_rate** integer **advanced\_settings** object ***key*** additional properties any **fallback** Defaults to true when omitted. boolean | null ## Responses ### 200 Synthesized audio stream. Select media type string format: binary string format: binary #### Headers **X-Cache** string `1` on cache hit, `0` otherwise. **Content-Disposition** string ### 400 Error response. Media typeapplication/json object **code** required string **reason** required string **message** required string ##### Examplegenerated ``` { "code": "example", "reason": "example", "message": "example" } ``` ### 401 Unauthorized ### 403 Forbidden ### 429 Error response. Media typeapplication/json object **code** required string **reason** required string **message** required string ##### Examplegenerated ``` { "code": "example", "reason": "example", "message": "example" } ``` ### 502 Error response. Media typeapplication/json object **code** required string **reason** required string **message** required string ##### Examplegenerated ``` { "code": "example", "reason": "example", "message": "example" } ```