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

# Generate Audio Sample

> Generate an audio sample for a voice.

### Headers

<ParamField header="authorization" type="string" required={true}>
  Your API key for authentication.
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required={true}>
  The ID of the voice to generate the audio sample for, or it’s name (like “maya”).
</ParamField>

### Request Body

<ParamField body="text" type="string" required={true}>
  The text content to be spoken in the voice sample.

  Character limit: `200` characters.
</ParamField>

<ParamField body="voice_settings" type="object">
  Alternate `voice_settings` can be passed in to override the preset’s default settings.
</ParamField>

<ParamField body="language" type="string">
  The language of the text content. Default is `ENG`.

  Some other language codes: “ESP”, “GER”, “FRE”
</ParamField>

### Response

<ResponseField name="sample" type="audio">
  The generated audio file of the spoken text using the specified or overridden voice preset settings.
</ResponseField>

<ResponseExample>
  ```json Response
  (Generated audio file)

  ```
</ResponseExample>
