---
description: Generate speech task
---

# Generate Speech

**Price:&#x20;**<mark style="color:$success;">**2.22$**</mark>

**Generate Speech Task**

```powershell
curl --location 'https://api.unifically.com/higgsfield/speech' \
--header 'Authorization: Bearer APIKEY' \
--header 'Content-Type: application/json' \
--data '{
  "avatar_preset_id": "7f1kmlzvtCNncSqUYMTbU",
  "prompt": "good",
  "width": 705,
  "height": 829,
  "image": [
    ""
  ],
  "audio": ""
}'
```

| Fields             | type      | Details                                                                                                                                       |
| ------------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| avatar\_preset\_id | string    | <p>Get avatar from avatar-presets api<br></p>                                                                                                 |
| prompt             | string    | Prompt                                                                                                                                        |
| image              | string\[] | url base64  Autobiography avatar, supports url base64                                                                                         |
| audio              | string    | <p>url (wav/mp3） 13s speak <br>The duration of the voice URL file (wav/mp3) cannot exceed 13 seconds. Choose between "speak" and "voice".</p> |
| speak              | object    | Choose between text-to-speech and audio                                                                                                       |
| speak.voice\_id    | string    | Get voices from voices API                                                                                                                    |
| speak.sound\_id    | string    | Get Sound ids from sound API                                                                                                                  |
| speak.text         | string    | Text to speech                                                                                                                                |

**Get Template Endpoints**

```powershell
curl --location 'https://api.unifically.com/higgsfield/tpl/sounds' \
--header 'Authorization: Bearer APIKEY' \
--header 'Content-Type: application/json'

curl --location 'https://api.unifically.com/higgsfield/tpl/avatar-presets' \
--header 'Authorization: Bearer APIKEY' \
--header 'Content-Type: application/json'

curl --location 'https://api.unifically.com/higgsfield/tpl/voices' \
--header 'Authorization: Bearer APIKEY' \
--header 'Content-Type: application/json'

curl --location 'https://api.unifically.com/higgsfield/tpl/motions' \
--header 'Authorization: Bearer APIKEY' \
--header 'Content-Type: application/json'
```
