curl --request POST \
--url https://api.tryhamsa.com/v1/jobs/text-to-speech \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<string>",
"text": "Minimum 5 words text to speech content!",
"webhookUrl": "<string>",
"webhookAuth": {
"authKey": "Token",
"authSecret": "Secret"
}
}'
{
"success": false,
"message": "success",
"data": {
"id": "<string>",
"title": "<string>",
"type": "AI_CONTENT",
"mediaUrl": "<string>",
"webhookUrl": "<string>",
"model": "<string>",
"status": "PENDING",
"jobResponse": {
"text": "<string>",
"ttsMediaFile": "<string>"
},
"totalCost": 123,
"apiKeyId": "<string>",
"userId": "<string>",
"ttsVoiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token <api-key>'
Successful response
The response is of type object
.
curl --request POST \
--url https://api.tryhamsa.com/v1/jobs/text-to-speech \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<string>",
"text": "Minimum 5 words text to speech content!",
"webhookUrl": "<string>",
"webhookAuth": {
"authKey": "Token",
"authSecret": "Secret"
}
}'
{
"success": false,
"message": "success",
"data": {
"id": "<string>",
"title": "<string>",
"type": "AI_CONTENT",
"mediaUrl": "<string>",
"webhookUrl": "<string>",
"model": "<string>",
"status": "PENDING",
"jobResponse": {
"text": "<string>",
"ttsMediaFile": "<string>"
},
"totalCost": 123,
"apiKeyId": "<string>",
"userId": "<string>",
"ttsVoiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
curl --request POST \
--url https://api.tryhamsa.com/v1/jobs/text-to-speech \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<string>",
"text": "Minimum 5 words text to speech content!",
"webhookUrl": "<string>",
"webhookAuth": {
"authKey": "Token",
"authSecret": "Secret"
}
}'
{
"success": false,
"message": "success",
"data": {
"id": "<string>",
"title": "<string>",
"type": "AI_CONTENT",
"mediaUrl": "<string>",
"webhookUrl": "<string>",
"model": "<string>",
"status": "PENDING",
"jobResponse": {
"text": "<string>",
"ttsMediaFile": "<string>"
},
"totalCost": 123,
"apiKeyId": "<string>",
"userId": "<string>",
"ttsVoiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token <api-key>'
Successful response
The response is of type object
.
curl --request POST \
--url https://api.tryhamsa.com/v1/jobs/text-to-speech \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<string>",
"text": "Minimum 5 words text to speech content!",
"webhookUrl": "<string>",
"webhookAuth": {
"authKey": "Token",
"authSecret": "Secret"
}
}'
{
"success": false,
"message": "success",
"data": {
"id": "<string>",
"title": "<string>",
"type": "AI_CONTENT",
"mediaUrl": "<string>",
"webhookUrl": "<string>",
"model": "<string>",
"status": "PENDING",
"jobResponse": {
"text": "<string>",
"ttsMediaFile": "<string>"
},
"totalCost": 123,
"apiKeyId": "<string>",
"userId": "<string>",
"ttsVoiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}