Skip to main content
POST
/
v2
/
tts
/
histories
Create TTS history
curl --request POST \
  --url https://api.tryhamsa.com/v2/tts/histories \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ttsVoiceId": "633f19a6-089b-4950-bfab-55f5c750732e",
  "script": "مرحباً، هذا مثال على نص التحويل إلى صوت.",
  "apiKey": "9f5f1f6a-2b1d-4a33-8fd4-6f5c2b89e3aa",
  "config": {
    "speed": 1,
    "expressiveness": 1
  },
  "voiceDictionaryIds": [
    "6ac0324d-bcb9-40f3-a57a-de6da7b721c8"
  ]
}
'
{
  "success": true,
  "message": "Operation completed successfully",
  "messageKey": "OPERATION_SUCCESSFUL",
  "data": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
ttsVoiceId
string<uuid>
required

TTS voice identifier

Example:

"633f19a6-089b-4950-bfab-55f5c750732e"

script
string
required

Text to be synthesized. Must contain real Arabic or English text.

Required string length: 1 - 3000
Example:

"مرحباً، هذا مثال على نص التحويل إلى صوت."

apiKey
string<uuid>
required

API key identifier (used for API key authorization)

Example:

"9f5f1f6a-2b1d-4a33-8fd4-6f5c2b89e3aa"

config
object

Optional voice generation configuration

Example:
{ "speed": 1, "expressiveness": 1 }
voiceDictionaryIds
string<uuid>[]

Optional list of voice dictionary identifiers

Required array length: 1 - 10 elements

Response

History created successfully.

success
boolean
Example:

true

message
string
Example:

"Operation completed successfully"

messageKey
string
Example:

"OPERATION_SUCCESSFUL"

data
array
Example:
[]