---
title: "Initiate a text to speech job"
method: POST
path: "/v1/jobs/text-to-speech"
---

# Initiate a text to speech job

`POST /v1/jobs/text-to-speech`

## Request body

- TTSRequest
  - `voiceId` string — The voice id you wish to use. If you are using a cloned voice, you need to preload it first using [preload cloned TTS voice API](/api-reference/endpoint/preload-cloned-tts-voice)
  - `text` string — The text you want to convert to speech.
  - `webhookUrl` string, uri — The webhook url to which the TTS job result will be sent.
  - `webhookAuth` ExternalWebhookAuthScheme — Authorization header to be sent in this format: `Authorization: [authKey] [authSecret]`
    - `authKey` string, nullable
    - `authSecret` string, nullable

## Response `200`

Successful response

- TTSResponse
  - `success` boolean
  - `message` string
  - `data` object
    - `id` string
    - `title` string
    - `type` 'AI_CONTENT' | 'TRANSCRIPTION' | 'TTS' | 'TRANSLATION'
    - `mediaUrl` string, uri
    - `webhookUrl` string, uri
    - `model` string
    - `status` 'PENDING' | 'COMPLETED' | 'FAILED'
    - `jobResponse` object
      - `text` string
      - `ttsMediaFile` string, uri
    - `totalCost` number
    - `apiKeyId` string
    - `userId` string
    - `ttsVoiceId` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Server Side Error

---

[API](https://skmtc.net/tryhamsa/apis/hamsa-api.md) · [All operations](https://skmtc.net/tryhamsa/apis/hamsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryhamsa/hamsa-api/versions/ecbeb5d8dc13/schema)
