POST
/
higgsfield
/
tts
Text-to-Speech (TTS)
curl --request POST \
  --url https://api.unifically.com/higgsfield/tts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "voice_id": "<string>",
  "prompt": "<string>",
  "sound_id": "<string>",
  "similarity_boost": 123,
  "style": 123,
  "speed": 123,
  "stability": 123
}
'
{
  "code": 200,
  "data": {
    "task_id": "9e84f995-42e2-589e-d087-677hd364g869",
    "error": {}
  }
}
Generate speech audio from text using various voices and optional background sounds.

Pricing

For current pricing, see the Pricing page.

Authentication

All endpoints require authentication using Bearer token authorization:
-H 'Authorization: Bearer YOUR_API_KEY'

Request

curl -X POST 'https://api.unifically.com/higgsfield/tts' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "voice_id": "1YxkwUwGY4H3slvZUBRhXW",
    "prompt": "Hello, this is a test of text to speech generation.",
    "sound_id": "DwUP9LmFKqHsvvWQkjLE6",
    "similarity_boost": 90,
    "style": 60,
    "speed": 1.1,
    "stability": 30
  }'

Parameters

voice_id
string
required
Voice ID to use for speech generation (get from /higgsfield/voices endpoint)
prompt
string
required
Text to convert to speech
sound_id
string
Background sound ID (get from /higgsfield/sounds endpoint). If not provided, no background sound is usedDefault: "" (empty)
similarity_boost
integer
Voice similarity boost (0-100). Higher values make the output more similar to the original voiceDefault: 90
style
integer
Voice style/expressiveness (0-100). Controls how expressive the voice isDefault: 60
speed
float
Speech speed (0-1.2). 1.0 is normal speed, lower is slower, higher is fasterDefault: 1.1
stability
integer
Voice stability (0-100). Higher values make the voice more consistent/stableDefault: 30

Important Notes

  • preset_name parameter exists internally but is automatically set to match sound_id. You don’t need to provide it

Response

{
  "code": 200,
  "data": {
    "task_id": "9e84f995-42e2-589e-d087-677hd364g869",
    "error": {}
  }
}

Response Fields

code
integer
default:"200"
HTTP status code (200 for success)
data
object
Response data
task_id
string
Unique identifier for this generation task
error
object
Error information (empty object for successful requests)

Error Responses

Parameter Out of Range:

{
  "code": 400,
  "data": {
    "message": "speed must be between 0 and 1.2",
    "error": {}
  }
}
{
  "code": 400,
  "data": {
    "message": "similarity_boost must be between 0 and 100",
    "error": {}
  }
}
Use the task_id to check the status using the Get Task endpoint.