> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 3.8 Flash TTS

> The Gemini 3.8 Flash TTS API turns a script or a two-speaker dialogue into WAV audio, with 30 preset voices and style instructions to steer delivery.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

Gemini 3.8 Flash TTS is Google's highest-fidelity Gemini 3.8 text-to-speech model. It reads a script with one voice, or performs a two-speaker dialogue, and returns WAV audio. Choose from 30 preset voices, steer tone, pace and emotion with style instructions, and let the model detect the language (Google lists 130). It suits audiobooks, podcast-style conversations, studio narration and character dialogue.

For high-volume, everyday speech with the same request fields, use [Gemini 3.8 Flash-Lite TTS](https://docs.vidgo.ai/api-manual/music-series/google-gemini-3-8-flash-lite-text-to-speech.md). Switch between them by changing `model`.

## Models

* **google/gemini-3.8-flash/text-to-speech** — Gemini 3.8 Flash text-to-speech for single-voice narration and two-speaker dialogue.

## Features

* Text-to-speech with one voice, or a scripted dialogue between two speakers.
* 30 preset voices, set per request or per speaker.
* Plain-language `style_instructions` for tone, pace, accent and emotion, globally or per dialogue turn.
* Automatic language detection (Google lists 130 languages).
* WAV audio output.

## Input modes

* **Single speaker**: send `text` and, optionally, `voice` (default `Kore`).
* **Two-speaker dialogue**: send exactly two `speakers` and a list of `turns`. Do not send top-level `text` or `voice` in this mode.

## Required parameters

Single speaker:

* `text` (string): The text to speak. Not blank.

Two-speaker dialogue:

* `speakers` (object\[]): Exactly two objects, each with only:
  * `speaker_id` (string): A non-empty alias, unique within the request, such as `host`.
  * `voice` (string): One of the [Voice Presets](#voice-presets).
* `turns` (object\[]): At least one line, in speaking order:
  * `speaker_id` (string): Must match one of the two `speakers`.
  * `text` (string): What that speaker says. Not blank.
  * `style_instructions` (string, optional): Direction for this line only.

## Optional parameters

* `voice` (string): Single-speaker mode only. One of the [Voice Presets](#voice-presets). Default `Kore`.
* `style_instructions` (string): Global direction for the whole request, such as `Calm, warm documentary narration`. Works in both modes.
* `enable_safety_checker` (boolean): Run the upstream safety checker. Default `true`.

## Output

The finished task returns one WAV audio file in the `files` array of [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) and the callback payload. The output format is fixed; there is no `output_format` field.

## Voice Presets

`voice` and `speakers[].voice` accept these 30 values (case-sensitive):

> [accordion] Supported voice values
>
> * `Achernar`
> * `Achird`
> * `Algenib`
> * `Algieba`
> * `Alnilam`
> * `Aoede`
> * `Autonoe`
> * `Callirrhoe`
> * `Charon`
> * `Despina`
> * `Enceladus`
> * `Erinome`
> * `Fenrir`
> * `Gacrux`
> * `Iapetus`
> * `Kore`
> * `Laomedeia`
> * `Leda`
> * `Orus`
> * `Pulcherrima`
> * `Puck`
> * `Rasalgethi`
> * `Sadachbia`
> * `Sadaltager`
> * `Schedar`
> * `Sulafat`
> * `Umbriel`
> * `Vindemiatrix`
> * `Zephyr`
> * `Zubenelgenubi`

## Examples

* **Single-speaker narration with style**: `voice: Charon` with a global `style_instructions` for slow documentary delivery.
* **Two-speaker podcast dialogue**: `host` (`Kore`) and `guest` (`Puck`), with per-turn `style_instructions` on two lines and a `callback_url`.

## Notes

* Credits are reserved at submission and depend on the billable character count: `text`, the global `style_instructions`, and every turn's `text` and `style_instructions`. Speaker IDs are not counted. A failed task is refunded in full. See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates.
* [Gemini 3.8 Flash-Lite TTS](https://docs.vidgo.ai/api-manual/music-series/google-gemini-3-8-flash-lite-text-to-speech.md) is billed at a lower rate with the same fields.
* Dialogue supports exactly two speakers. A third speaker, a `speaker_id` in `turns` that is not in `speakers`, or top-level `text`/`voice` in a dialogue request returns 400.
* Put delivery directions in `style_instructions`, not in `text`; the model may read directions inside `text` aloud.
* `output_format`, `language_code`, `temperature`, `seed` and timestamps are not supported on this endpoint, and neither are voice cloning or custom voices.


## OpenAPI

````yaml api-manual/music-series/google-gemini-3-8-flash-text-to-speech.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Gemini 3.8 Flash TTS
  description: >-
    The Gemini 3.8 Flash TTS API turns a script or a two-speaker dialogue into
    WAV audio, with 30 preset voices and style instructions to steer delivery.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Audio Series
      summary: Gemini 3.8 Flash TTS
      description: >-
        Send `text` (plus optional `voice`) for one speaker, or `speakers` +
        `turns` for a two-speaker dialogue; dialogue requests must not include
        top-level `text` or `voice`. Any field not listed, such as
        `output_format`, `language_code` or `temperature`, returns 400.
      operationId: submit_google_gemini_3_8_flash_text_to_speech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: Model ID. Use `google/gemini-3.8-flash/text-to-speech`.
                  example: google/gemini-3.8-flash/text-to-speech
                callback_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint that receives a POST when
                    the task becomes `finished` or `failed`. HTTPS is
                    recommended. Omit it, or send `null` or an empty string, to
                    disable callbacks.
                  example: https://your-domain.com/callback
                input:
                  type: object
                  properties:
                    text:
                      type: string
                      minLength: 1
                      example: Welcome to the city museum. The east wing opens at ten.
                      description: >-
                        Single speaker: the text to speak. Required in
                        single-speaker mode, not blank. Must be omitted in
                        dialogue mode.
                    voice:
                      type: string
                      enum:
                        - Achernar
                        - Achird
                        - Algenib
                        - Algieba
                        - Alnilam
                        - Aoede
                        - Autonoe
                        - Callirrhoe
                        - Charon
                        - Despina
                        - Enceladus
                        - Erinome
                        - Fenrir
                        - Gacrux
                        - Iapetus
                        - Kore
                        - Laomedeia
                        - Leda
                        - Orus
                        - Pulcherrima
                        - Puck
                        - Rasalgethi
                        - Sadachbia
                        - Sadaltager
                        - Schedar
                        - Sulafat
                        - Umbriel
                        - Vindemiatrix
                        - Zephyr
                        - Zubenelgenubi
                      default: Kore
                      description: >-
                        Single speaker: preset voice. Must be omitted in
                        dialogue mode.
                    speakers:
                      type: array
                      items:
                        type: object
                        required:
                          - speaker_id
                          - voice
                        properties:
                          speaker_id:
                            type: string
                            minLength: 1
                            example: host
                            description: >-
                              Speaker alias referenced by `turns`. Non-empty and
                              unique.
                          voice:
                            type: string
                            enum:
                              - Achernar
                              - Achird
                              - Algenib
                              - Algieba
                              - Alnilam
                              - Aoede
                              - Autonoe
                              - Callirrhoe
                              - Charon
                              - Despina
                              - Enceladus
                              - Erinome
                              - Fenrir
                              - Gacrux
                              - Iapetus
                              - Kore
                              - Laomedeia
                              - Leda
                              - Orus
                              - Pulcherrima
                              - Puck
                              - Rasalgethi
                              - Sadachbia
                              - Sadaltager
                              - Schedar
                              - Sulafat
                              - Umbriel
                              - Vindemiatrix
                              - Zephyr
                              - Zubenelgenubi
                            description: Preset voice for this speaker.
                        additionalProperties: false
                        description: One speaker.
                      minItems: 2
                      maxItems: 2
                      description: >-
                        Dialogue: exactly two speakers. Each object has only
                        `speaker_id` and `voice`.
                    turns:
                      type: array
                      items:
                        type: object
                        required:
                          - speaker_id
                          - text
                        properties:
                          speaker_id:
                            type: string
                            example: host
                            description: Must match a `speaker_id` in `speakers`.
                          text:
                            type: string
                            minLength: 1
                            description: What the speaker says. Not blank.
                          style_instructions:
                            type: string
                            description: >-
                              Optional delivery direction for this line only,
                              such as `laughing` or `whispering`.
                        additionalProperties: false
                        description: One line of dialogue.
                      minItems: 1
                      description: >-
                        Dialogue: the lines in speaking order. At least one
                        turn.
                    style_instructions:
                      type: string
                      description: >-
                        Optional global direction for tone, pace, accent or
                        emotion, such as `Calm, warm documentary narration`.
                        Applies in both modes.
                    enable_safety_checker:
                      type: boolean
                      default: true
                      description: Run the upstream safety checker.
                  additionalProperties: false
                  description: >-
                    Generation parameters. Send `text` (single speaker) or
                    `speakers` + `turns` (two-speaker dialogue), not both.
            examples:
              single_speaker:
                summary: Single-speaker narration with style
                value:
                  model: google/gemini-3.8-flash/text-to-speech
                  input:
                    text: >-
                      In the spring of 1912, the ship left Southampton carrying
                      more than two thousand people.
                    voice: Charon
                    style_instructions: >-
                      Slow, measured documentary narration with a hint of
                      gravity
              dialogue:
                summary: Two-speaker podcast dialogue
                value:
                  model: google/gemini-3.8-flash/text-to-speech
                  callback_url: https://your-domain.com/callback
                  input:
                    speakers:
                      - speaker_id: host
                        voice: Kore
                      - speaker_id: guest
                        voice: Puck
                    turns:
                      - speaker_id: host
                        text: >-
                          So you really spent a winter alone at the research
                          station?
                      - speaker_id: guest
                        text: Four months. The quiet was the hardest part.
                        style_instructions: thoughtful, a little wistful
                      - speaker_id: host
                        text: I can't imagine. What did you miss most?
                        style_instructions: curious
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                    description: HTTP status code.
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                        description: >-
                          Task ID. Use it with [Query Task
                          Status](/api-manual/task-management/status).
                      status:
                        type: string
                        enum:
                          - not_started
                        description: Initial task status.
                      created_time:
                        type: string
                        format: date-time
                        description: Time the task was created (ISO 8601).
              example:
                code: 200
                data:
                  task_id: task-unified-1762160000-abc123
                  status: not_started
                  created_time: '2026-11-03T10:30:00'
        '400':
          description: >-
            Invalid input, unsupported field, inaccessible media, or
            insufficient credits
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '502':
          description: Unable to create the upstream generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '503':
          description: The requested model is temporarily unavailable
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Go to **Dashboard → API Key** ([API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key)) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.