---
title: "POST /services/tts"
method: POST
path: "/services/tts"
tags: ["TTS"]
---

# POST /services/tts

`POST /services/tts`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/services/tts`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `x:rules:*`, `x:devices:*`, `mobile`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/services/tts/post.ts> (a function with typed inputs; its response is checked against the schema)

Convert text to speech and return an audio URL. This audio file will be available for 7 days after creation.

## Headers

- `Authorization` string, string, required

## Request body

- TTSBody
  - `text` string, required: Text to be converted to audio. Cannot exceed 2000 characters for Polly and 425 characters for Bixby
  - `languageCode` string, required: Language used for the text to be converted to speech. Please refer tts/info API to get the options available
  - `voiceId` string, required: VoiceId to be used for the text. Please refer tts/info API to get the options available
  - `audioFormat` 'mp3' | 'pcm': Audio format of the audio file, default to mp3 when ttsProvider is Amazon Polly, default to pcm when ttsProvider is Bixby. Amazon Polly supports mp3 and pcm. Bixby supports only pcm.
  - `ttsProvider` 'polly' | 'bixby': TTS provider to use for converting text to speech, default to polly
  - `engine` 'standard' | 'neural': TTS engine to be used, default to standard, standard - robotic voice, neural - human like and natural voice. This option is available only when ttsProvider is Amazon Polly. Please refer tts/info API to get the options available
  - `speakingStyle` 'news' | 'conversational': Speaking style to be used. This option is available only when ttsProvider is Amazon Polly, engine is neural, and voiceIds are one of the following - Matthew, Joanna, Lupe. Please refer tts/info API to get the options available

## Response `200`

Success

- ConvertedTTS
  - `message` string, required: message to indicate success
  - `audioURL` string, required: Audio URL

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
