---
title: "Create speech"
method: POST
path: "/audio/speech"
---

# Create speech

`POST /audio/speech`

## Request

- Base URL: `https://api.shortgenius.com/v1`
- URL: `https://api.shortgenius.com/v1/audio/speech`
- Auth: HTTP bearer

Generate speech from provided text.

## Request body

- object
  - `text` string, required: The text to generate speech from.
  - `locale` 'af-ZA' | 'id-ID' | 'ms-MY' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-US' | 'es-ES' | 'es-419' | 'fr-CA' | 'fr-FR' | 'hr-HR' | 'it-IT' | 'hu-HU' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'fi-FI' | 'sv-SE' | 'vi-VN' | 'tr-TR' | 'el-GR' | 'ru-RU' | 'sr-SP' | 'uk-UA' | 'hy-AM' | 'he-IL' | 'ur-PK' | 'ar-SA' | 'hi-IN' | 'th-TH' | 'ko-KR' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'auto': The locale of the text.
  - `voice_id` string, required: The voice to use for speech generation. See the [List voices](#tag/voices/GET/voices) endpoint.
  - `wait_for_generation` boolean: If false, this endpoint immediately returns the incomplete speech record, and you can poll the [Get speech](#tag/voices/GET/media/get/{id}) endpoint until the task completes. If true, this endpoint waits until the speech generation completes, then returns the complete speech record. Defaults to false.

## Response `200`

Successful response

- Audio: Details about the created or retrieved audio media.
  - `id` string, uuid, required: Unique ID of the audio.
  - `created_at` string, required: Date and time (ISO 8601) when the audio media was created.
  - `updated_at` string, nullable: Date and time (ISO 8601) when the audio media was last updated.
  - `url` string, nullable, required: URL of the audio. Only available after the audio is generated.
  - `user_id` string, uuid, required: ID of the user who generated the audio.
  - `transcript` object, nullable: Transcript of the audio with timestamps. Only available after the audio is generated.
    - `words` object[], required
      - `text` string, required
      - `start` number, required
      - `end` number, required
      - `confidence` number
  - `category` 'AIGeneratedAudio' | 'AIGeneratedAudioForVideo' | 'AIGeneratedMusic', required: Category of the audio.
  - `state` 'pending' | 'generating' | 'completed' | 'error', required: State of the audio generation.
  - `text` string, nullable: Source text of the audio.
  - `locale` 'af-ZA' | 'id-ID' | 'ms-MY' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-US' | 'es-ES' | 'es-419' | 'fr-CA' | 'fr-FR' | 'hr-HR' | 'it-IT' | 'hu-HU' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'fi-FI' | 'sv-SE' | 'vi-VN' | 'tr-TR' | 'el-GR' | 'ru-RU' | 'sr-SP' | 'uk-UA' | 'hy-AM' | 'he-IL' | 'ur-PK' | 'ar-SA' | 'hi-IN' | 'th-TH' | 'ko-KR' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'null', nullable: Locale of the audio to guide the AI. Auto-detected if not provided.
  - `voice` Voice: A text-to-speech voice
    - `id` string, required: Unique ID of the voice.
    - `name` string, required: Name of the voice.
    - `description` string, nullable, required: Description of the voice.
    - `avatar_url` string, nullable: Avatar url of the voice.
    - `flag_url` string, nullable: Flag url of the voice.
    - `tags` object, nullable, required: Tags of the voice. Describe the characteristics of the voice.
      - `language` string, nullable
      - `accent` string, nullable
      - `age` string, nullable
      - `category` string, nullable
      - `gender` string, nullable
      - `tone` string, nullable
      - `useCase` string, nullable
    - `preview_url` string, nullable, required: URL of the preview audio of the voice.
    - `locale` 'af-ZA' | 'id-ID' | 'ms-MY' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-US' | 'es-ES' | 'es-419' | 'fr-CA' | 'fr-FR' | 'hr-HR' | 'it-IT' | 'hu-HU' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'fi-FI' | 'sv-SE' | 'vi-VN' | 'tr-TR' | 'el-GR' | 'ru-RU' | 'sr-SP' | 'uk-UA' | 'hy-AM' | 'he-IL' | 'ur-PK' | 'ar-SA' | 'hi-IN' | 'th-TH' | 'ko-KR' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'null', nullable, required: Locale of the voice.
    - `source` 'Cartesia' | 'CartesiaClonedVoice' | 'ElevenLabs' | 'ElevenLabsShared' | 'FishAudio' | 'FishAudioClonedVoice' | 'OpenAI', required: Source of the voice.
  - `duration` number, nullable: Duration of the generated audio. Only available after the audio is generated.
  - `lufs` number, nullable: Loudness normalization value in LUFS. Only available after the audio is generated.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized request

---

[API](https://skmtc.dev/shortgenius/apis/shortgenius-api.md) · [All operations](https://skmtc.dev/shortgenius/apis/shortgenius-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shortgenius/apis/shortgenius-api/revisions/532abda8ff32?raw)
