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

# Gemini 3.8 Flash Lite TTS

> [Core Function] Gemini 3.8 Flash Lite TTS is Google's text-to-speech model for low-latency speech generation. [Strengths] Single-speaker synthesis, two-speaker dialogue, 101 languages, per-turn style control, and WAV output (24 kHz mono PCM). [Best For] Bulk narration, voice-agent responses, read-aloud features, and multilingual dialogue. [Limitations] Do NOT use this for streaming, voice creation, music generation, or audio, image, or video input. Dialogue requires exactly two speakers with prebuilt or extended-library voices; designed or replicated voices are limited to single-speaker synthesis. Combined text and style must stay within 8,192 Unicode characters. [Routing] Choose Flash Lite for latency and cost efficiency; choose Gemini 3.8 Flash TTS for expressive delivery and broader language coverage.

## Billing

Billed in **USD per million input characters**. Current prices are listed on the [Modellix Pricing Page](https://www.modellix.ai/pricing).

* **Single speaker:** Count Unicode characters in `text`.
* **Two speakers:** Sum Unicode characters in all `turns[].text`, without adding separators.
* `style`, speaker names, voice names, and `language_code` are excluded from the character count.


## OpenAPI

````yaml /media-model-api/google/google-t2s.json post /google/gemini-3.8-flash-lite-tts
openapi: 3.1.0
info:
  title: Google Text-to-Speech Models API
  description: >-
    Google Gemini text-to-speech. Converts plain text into controllable speech
    audio. Submit an async task, then poll GET /api/v1/tasks/{task_id} for the
    audio.
  version: 1.0.0
  contact:
    name: Modellix Support
    email: support@modellix.ai
servers:
  - url: https://api.modellix.ai/api/v1
    description: The text-to-speech models API from Google.
security:
  - bearerAuth: []
paths:
  /google/gemini-3.8-flash-lite-tts:
    post:
      summary: Gemini 3.8 Flash Lite TTS
      description: >-
        [Core Function] Gemini 3.8 Flash Lite TTS is Google's text-to-speech
        model for low-latency speech generation. [Strengths] Single-speaker
        synthesis, two-speaker dialogue, 101 languages, per-turn style control,
        and WAV output (24 kHz mono PCM). [Best For] Bulk narration, voice-agent
        responses, read-aloud features, and multilingual dialogue. [Limitations]
        Do NOT use this for streaming, voice creation, music generation, or
        audio, image, or video input. Dialogue requires exactly two speakers
        with prebuilt or extended-library voices; designed or replicated voices
        are limited to single-speaker synthesis. Combined text and style must
        stay within 8,192 Unicode characters. [Routing] Choose Flash Lite for
        latency and cost efficiency; choose Gemini 3.8 Flash TTS for expressive
        delivery and broader language coverage.
      operationId: gemini38FlashLiteTTSAsync
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Gemini38FlashLiteTTSRequest'
            examples:
              single_speaker:
                summary: Single speaker with turn style
                value:
                  text: Have a wonderful day!
                  style: cheerful and friendly
                  language_code: en-us
                  voice: Kore
              dual_speaker:
                summary: Two-speaker dialogue, one part per turn
                value:
                  language_code: en-us
                  speakers:
                    - speaker: Joe
                      voice: Puck
                    - speaker: Jane
                      voice: Kore
                  turns:
                    - speaker: Joe
                      text: How is it going today, Jane?
                      style: cheerful and friendly
                    - speaker: Jane
                      text: Pretty good. Ready when you are.
                      style: calm and relaxed
      responses:
        '200':
          description: >-
            Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until
            the task completes; synthesized audio is returned on the task
            result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskResponse'
              example:
                code: 0
                message: success
                data:
                  status: pending
                  task_id: task-gemini-38-flash-lite-tts-001
                  model_id: google/gemini-3.8-flash-lite-tts
                  get_result:
                    method: GET
                    url: >-
                      https://api.modellix.ai/api/v1/tasks/task-gemini-38-flash-lite-tts-001
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Gemini38FlashLiteTTSRequest:
      type: object
      description: >-
        Use text and voice for single-speaker synthesis, or speakers and turns
        for two-speaker dialogue. Dialogue requests must omit top-level text,
        voice, and style. Combined text and trimmed style must not exceed 8,192
        Unicode characters.
      properties:
        text:
          type: string
          description: Verbatim transcript. Required for single-speaker synthesis.
          minLength: 1
          maxLength: 8192
          example: Have a wonderful day!
        style:
          type: string
          description: >-
            Optional delivery direction for single-speaker synthesis. Not spoken
            aloud.
          maxLength: 8192
          example: cheerful and friendly
        language_code:
          type: string
          description: >-
            Optional BCP-47 language tag in lowercase. Examples: en-us, cmn-cn,
            ja-jp. The model can also detect the language from the transcript.
          pattern: ^[a-z]{2,3}(-[a-z0-9]+)*$
          example: en-us
        voice:
          type: string
          description: >-
            Required for single-speaker synthesis. Prebuilt voice name, extended
            voice-library ID, or a designed/replicated voice ID (voice_... or
            voicekey_...). No spaces.
          minLength: 1
          maxLength: 256
          example: Kore
        speakers:
          type: array
          description: Exactly two speakers for dialogue. Use with turns.
          minItems: 2
          maxItems: 2
          items:
            $ref: '#/components/schemas/Gemini38FlashLiteTTSSpeaker'
        turns:
          type: array
          description: >-
            Dialogue turns in order. Each speaker must match a name in speakers,
            case-sensitively.
          minItems: 1
          items:
            $ref: '#/components/schemas/Gemini38TTSTurn'
    AsyncTaskResponse:
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          description: Response code, 0 indicates success
          example: 0
        message:
          type: string
          description: Response message
          example: success
        data:
          type: object
          required:
            - status
            - task_id
            - model_id
          description: >-
            Task submission details. Poll GET /api/v1/tasks/{task_id} until
            status is success; audio appears in result.resources with type audio
            and format wav.
          properties:
            status:
              type: string
              enum:
                - pending
                - processing
              description: Initial task status
              example: pending
            task_id:
              type: string
              description: Unique task identifier for polling
              example: task-gemini-tts-001
            model_id:
              type: string
              description: Model ID in provider/model format
              example: google/gemini-3.1-flash-tts
            get_result:
              type: object
              description: Endpoint to query the task result
              properties:
                method:
                  type: string
                  example: GET
                url:
                  type: string
                  example: https://api.modellix.ai/api/v1/tasks/task-gemini-tts-001
    Gemini38FlashLiteTTSSpeaker:
      type: object
      required:
        - speaker
        - voice
      properties:
        speaker:
          type: string
          description: Speaker name used by turns. Alphanumeric, 1-64 characters.
          minLength: 1
          maxLength: 64
          pattern: ^[A-Za-z0-9]+$
          example: Joe
        voice:
          type: string
          description: >-
            Prebuilt voice name or extended voice-library ID, such as Puck or
            Kore. Designed or replicated voices (voice_... or voicekey_...) are
            not supported in dialogue. No spaces.
          minLength: 1
          maxLength: 256
          example: Puck
    Gemini38TTSTurn:
      type: object
      required:
        - speaker
        - text
      properties:
        speaker:
          type: string
          description: Which configured speaker says this turn.
          minLength: 1
          maxLength: 64
          pattern: ^[A-Za-z0-9]+$
          example: Joe
        text:
          type: string
          description: Verbatim line for this turn.
          minLength: 1
          maxLength: 8192
          example: How is it going today, Jane?
        style:
          type: string
          description: Optional delivery direction for this turn only. Not spoken aloud.
          maxLength: 8192
          example: cheerful and friendly
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Error code (equals HTTP status code)
          example: 400
        message:
          type: string
          description: 'Error message in format ''Category: detail'''
          example: 'Invalid parameters: combined prompt and text must be <= 8000 bytes'
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 400
            message: 'Invalid parameters: parameter ''text'' is required'
    Unauthorized:
      description: Unauthorized - Invalid or missing API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            message: 'Authentication failed: invalid API key'
    TooManyRequests:
      description: Too many requests - Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          description: Maximum requests per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Remaining quota in current window
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Rate limit window reset time (Unix timestamp)
          schema:
            type: integer
            example: 1704067260
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 429
            message: >-
              Rate limit exceeded: 100 requests per minute, retry after 60
              seconds
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 500
            message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Modellix API Key. Format: `Bearer <your_api_key>`'

````

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