canonical: https://jentic.com/apis/amazonaws.com/polly

# AWS Amazon Polly

Jentic publishes the only available OpenAPI specification for Amazon Polly, keeping it validated and agent-ready. Amazon Polly is a managed text-to-speech service that turns text into lifelike audio across dozens of voices, languages, and speech engines (standard, neural, long-form, and generative). The API exposes synchronous synthesis via SynthesizeSpeech for short clips, asynchronous synthesis tasks for long-form audio written to S3, and pronunciation lexicon management for fine-grained word-level control. It supports plain text and SSML input and returns MP3, OGG Vorbis, PCM, or JSON speech-mark output.

## For AI agents

Convert text or SSML into spoken audio across multiple voices and languages, and manage pronunciation lexicons through Amazon Polly.

## Scope

Does not transcribe audio, translate text, or analyze speech content - use for text-to-speech synthesis and pronunciation-lexicon management only.

## Capabilities

- Synthesize plain text or SSML input into MP3, OGG, or PCM audio with SynthesizeSpeech
- Generate speech-mark JSON aligned to sentence, word, viseme, or SSML boundaries for lipsync and captions
- Run long-form synthesis tasks that write multi-megabyte audio output to an S3 bucket asynchronously
- List available voices filtered by language code, gender, or supported engine (neural, generative)
- Upload pronunciation lexicons in PLS format and apply them per request to override word pronunciations
- Track and retrieve completed or failed synthesis tasks by TaskId for batch audio production

## Use cases

### On-Demand Voice Notifications

Convert short alerts and IVR prompts to speech in real time. SynthesizeSpeech accepts up to a few thousand characters of plain text or SSML, a VoiceId, an Engine (standard, neural, generative), and an OutputFormat, and returns the audio bytes synchronously. Useful for chatbots that need a low-latency spoken response or contact-center prompts generated on the fly.

Example prompt: Call POST /v1/speech with Text 'Your order has shipped', VoiceId 'Joanna', Engine 'neural', and OutputFormat 'mp3'

### Long-Form Audiobook Production

Produce multi-minute or multi-hour narrated audio asynchronously by starting a SpeechSynthesisTask. The task writes the output (MP3 or OGG) to a configurable S3 bucket and prefix, with optional speech marks for chapter and word alignment. Generative and long-form engines maintain a coherent, natural prosody across long passages where SynthesizeSpeech would hit character limits.

Example prompt: Call POST /v1/synthesisTasks with OutputS3BucketName 'my-audio', VoiceId 'Ruth', Engine 'long-form', Text containing the chapter, and OutputFormat 'mp3'

### Custom Pronunciations with Lexicons

Override default pronunciations of brand names, drug names, or technical terms by uploading a PLS pronunciation lexicon. PutLexicon stores the lexicon under a name, and each SynthesizeSpeech call lists which lexicons to apply. Pairs well with neural voices for consistent product-name pronunciation across an audio library.

Example prompt: Call PUT /v1/lexicons/{LexiconName} 'brand-names' with the PLS XML, then call POST /v1/speech with LexiconNames ['brand-names'] and the source text

### AI Agent Voice Output via Jentic

A voice-first agent uses Jentic to discover Polly's SynthesizeSpeech operation, load its schema, and convert each generated response to audio for playback. Jentic stores AWS credentials in its vault and signs every call with SigV4, so the agent only handles the response text and the resulting audio bytes.

Example prompt: Use Jentic to search 'convert text to speech with a neural voice', load SynthesizeSpeech, and execute it with the agent's response text

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/speech | Synchronously synthesize text or SSML to audio |
| POST | /v1/synthesisTasks | Start an asynchronous long-form synthesis task writing to S3 |
| GET | /v1/synthesisTasks/{TaskId} | Get the status and output URI of a synthesis task |
| GET | /v1/voices | List available voices filtered by language and engine |
| PUT | /v1/lexicons/{LexiconName} | Upload or replace a pronunciation lexicon |
| GET | /v1/lexicons | List stored pronunciation lexicons |

## Key resources

- **Speech** — Synchronous text-to-speech synthesis returning audio bytes
- **SynthesisTasks** — Asynchronous long-form synthesis with output written to S3
- **Voices** — Listing of available voices, languages, genders, and supported engines
- **Lexicons** — Pronunciation lexicons in PLS format that override word pronunciations

## Why Jentic

- **Setup:** Wiring Polly by hand means computing SigV4 HMAC signatures per request, routing to the correct regional polly host, and handling the split between synchronous SynthesizeSpeech and asynchronous synthesis tasks yourself. Through Jentic you install once, import Amazon Polly from the API Directory, store your AWS access keys once, and your agent calls it with signing done per request for you.
- **Permission scoping:** You choose the operations the agent may call, so you can limit it to synthesis and voice listing, such as SynthesizeSpeech and DescribeVoices, while operations like deleting a pronunciation lexicon are not included unless you add them. Where a lexicon or task is named in the URL path, as with /v1/lexicons/{LexiconName} or /v1/synthesisTasks/{TaskId}, the rule stays scoped to the operations you grant.
- **Credential handling:** Your AWS access keys are stored once, encrypted, by your own Jentic One instance and used to produce a SigV4 signature for each call. The raw secret access key never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'convert text to speech with a neural voice', and Jentic returns SynthesizeSpeech with its input schema and accepted VoiceId and Engine values so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Amazon Transcribe** — Transcribe inverts Polly: speech-to-text for inbound audio while Polly handles text-to-speech for outbound audio
- **Amazon Comprehend** — Detect language and sentiment in source text before choosing a Polly voice and engine
- **Amazon Rekognition** — Combine vision analysis with Polly narration to produce described-audio for image and video content

## FAQ

### Why is there no official OpenAPI spec for Amazon Polly?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Amazon Polly via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Amazon Polly API use?

Polly uses AWS SigV4 HMAC request signing with an AWS access key ID and secret. Through Jentic, AWS credentials live in the vault and SigV4 signatures are produced per request so the agent never sees raw secrets.

### Can I generate long audio files like audiobooks?

Yes. Use POST /v1/synthesisTasks for asynchronous synthesis: Polly writes the full audio to your specified S3 bucket. SynthesizeSpeech (POST /v1/speech) is limited to shorter inputs and returns audio synchronously.

### Which voice engines does Polly support?

Polly supports the standard, neural, long-form, and generative engines. Engine availability varies by voice; call GET /v1/voices and inspect SupportedEngines on each Voice to pick one compatible with your VoiceId.

### What are the rate limits for Polly?

Polly enforces per-region transactions-per-second limits per engine; neural and generative engines have lower default TPS than standard. Throttled requests return ThrottlingException - back off and retry, or request a quota increase via Service Quotas.

### How do I synthesize speech through Jentic?

Search Jentic for 'convert text to speech with a neural voice', load SynthesizeSpeech, and execute it with Text, VoiceId, and Engine. Install with pip install jentic; AWS credentials come from your Jentic One instance.

### Can I limit what my agent is allowed to do with the Amazon Polly API?

Yes. Because you run Jentic One yourself, your own rules decide which Amazon Polly operations the agent may call, so you can grant just synthesis and voice listing such as SynthesizeSpeech (POST /v1/speech) and listing voices (GET /v1/voices) while withholding operations like deleting a pronunciation lexicon. Path-scoped operations like PUT /v1/lexicons/{LexiconName} and GET /v1/synthesisTasks/{TaskId} are only reachable when you grant them, and your stored AWS credentials are used to sign each permitted call without exposing the raw secret to the agent. You control the operation set and the keys, so the agent can only do what you have allowed.
