> ## 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.

# Replace audio and voice tuning settings

> Replace both the audio file and voice tuning settings for a cache entry in a single request. Sent as `multipart/form-data` with a `file` part containing the WAV audio (max 6 MB) and a `settings` part containing a JSON object with `text` and `config` fields.



## OpenAPI

````yaml PUT /v1/agents/{agentId}/audio-cache/{entryId}/details
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}/details:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: entryId
        in: path
        required: true
        schema:
          type: string
        description: Audio cache entry ID
    put:
      tags:
        - Audio Cache
      summary: Replace audio file and voice tuning settings
      description: >-
        Replace both the audio file and voice tuning settings for a cache entry
        in a single request. Sent as `multipart/form-data` with a `file` part
        containing the WAV audio (max 6 MB) and a `settings` part containing a
        JSON object with `text` and `config` fields.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - settings
              properties:
                file:
                  type: string
                  format: binary
                  description: WAV audio file (max 6 MB)
                settings:
                  type: string
                  description: >-
                    JSON string with shape `{"text": string, "config":
                    VoiceTuningConfig}`, where `VoiceTuningConfig` matches the
                    [VoiceTuningConfig](#/components/schemas/VoiceTuningConfig)
                    schema. `text` is the transcript to associate with the cache
                    entry; `config` carries provider-specific voice tuning
                    settings.
      responses:
        '204':
          description: Audio and settings updated
        '400':
          description: >-
            Invalid request. Returned when the `file` part is missing, the file
            exceeds the 6 MB limit, the `settings` part is not valid JSON, or
            the `entryId` is not a numeric ID.
        '401':
          description: Unauthorized – missing or invalid API key
        '403':
          description: >-
            Forbidden – the API key does not have `write` permission on the
            audio cache resource
        '404':
          description: Resource not found
components:
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````