> ## Documentation Index
> Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Synthesize audio preview

> Generate a TTS audio preview using an existing cache entry's voice and provider configuration. Returns WAV audio without saving to cache, allowing you to preview how different text or tuning settings would sound before committing changes.



## OpenAPI

````yaml POST /v1/agents/{agentId}/audio-cache/{entryId}/synthesize
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/audio-cache/{entryId}/synthesize:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: entryId
        in: path
        required: true
        schema:
          type: string
        description: Audio cache entry ID
    post:
      tags:
        - Audio Cache
      summary: Synthesize audio preview
      description: >-
        Generate a TTS audio preview using an existing cache entry's voice and
        provider configuration. Returns WAV audio without saving to cache,
        allowing you to preview how different text or tuning settings would
        sound before committing changes.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SynthesizeAudioRequest'
      responses:
        '200':
          description: Synthesized audio
          content:
            audio/wav:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Invalid request. Returned when the request body fails validation
            against `SynthesizeAudioRequest`, or when `entryId` is not a numeric
            ID.
        '401':
          description: Unauthorized – missing or invalid API key
        '403':
          description: >-
            Forbidden – the API key does not have `read` permission on the audio
            cache resource
        '404':
          description: Resource not found
components:
  schemas:
    SynthesizeAudioRequest:
      type: object
      required:
        - text
        - config
      properties:
        text:
          type: string
          description: Text to synthesize
        config:
          $ref: '#/components/schemas/VoiceTuningConfig'
        language:
          type: string
          description: BCP-47 language tag, e.g. 'en-US'
    VoiceTuningConfig:
      type: object
      description: >-
        Provider-specific voice tuning settings. All fields are optional — each
        TTS provider uses a different subset.
      properties:
        stability:
          type: number
          format: float
          description: Controls voice consistency between regenerations (ElevenLabs)
        similarityBoost:
          type: number
          format: float
          description: >-
            Controls how closely the output matches the original voice sample
            (ElevenLabs)
        speed:
          type: number
          format: float
          description: Playback speed multiplier. 1.0 is normal speed
        modelId:
          type: string
          description: TTS model ID, specific to the provider (e.g. 'eleven_turbo_v2')
        engine:
          type: string
          description: TTS engine identifier
        emotion:
          type: string
          description: Emotion preset for the voice (Cartesia)
        volume:
          type: number
          format: float
          description: Output volume level (Cartesia)
        version:
          type: string
          description: Model version
        voiceDescription:
          type: string
          description: Natural language voice description (Hume)
        instantMode:
          type: boolean
          description: Enable instant mode for lower latency (Hume)
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````