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

# Gemini 3.8 Flash Lite TTS

> Gemini 3.8 Flash Lite TTS API 可使用预设音色和可选的风格指令，将文稿或双人对话转换为 WAV 语音。完整输入限制为 8,192 个 token。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

`gemini-3.8-flash-lite-tts` 将文稿或双人对话转换为原生 WAV 语音。结果以任务 `files` 返回，与图像、视频、3D 和音频任务的标准响应结构一致。

## 模型

* **gemini-3.8-flash-lite-tts** - Gemini 3.8 Flash Lite 文本转语音生成

## 必填参数

单说话人输入与对话输入互斥。

* **text**：单说话人合成时必填。非空文稿。使用 `speakers` 和 `turns` 时省略
* **speakers**：对话时必填，需与 `turns` 一起使用。恰好两个说话人。每一项包括：
  * `speaker_id`：互不相同的非空说话人别名
  * `voice`：Gemini 预设音色
* **turns**：对话时必填，需与 `speakers` 一起使用。至少一轮。每一项包括：
  * `speaker_id`：必须与已配置的说话人匹配
  * `text`：非空的本轮文本
  * `style_instructions`：可选，该轮的演绎指令

对话请求必须省略顶层 `text` 和顶层 `voice`。完整输入限制为 8,192 个 token。

## 可选参数

* **voice**：单说话人合成的预设音色。默认：`Kore`。对话时省略
* **style\_instructions**：全局演绎风格，与文稿分开。两种模式均可使用
* **enable\_safety\_checker**：启用输入安全检查。默认：`true`。关闭可能需要账户授权
* **callback\_url**：可选的 Webhook URL，用于任务完成通知

## 预设音色

支持的值：`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`。

## 示例

### 单说话人

```json theme={"dark"}
{
  "model": "gemini-3.8-flash-lite-tts",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "text": "Hello! Welcome to PoYo.",
    "voice": "Kore",
    "style_instructions": "Warm, confident product narrator with clear pacing."
  }
}
```

### 双人对话

```json theme={"dark"}
{
  "model": "gemini-3.8-flash-lite-tts",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "style_instructions": "Conversational podcast tone with distinct speaker energy.",
    "speakers": [
      {
        "speaker_id": "host",
        "voice": "Kore"
      },
      {
        "speaker_id": "guest",
        "voice": "Puck"
      }
    ],
    "turns": [
      {
        "speaker_id": "host",
        "text": "Welcome!"
      },
      {
        "speaker_id": "guest",
        "text": "Thank you.",
        "style_instructions": "Warm and friendly."
      }
    ]
  }
}
```

## 注意事项

* 输出为原生 WAV。此模型没有 `output_format`、`temperature`、`language_code` 或 `seed` 参数。
* 通过标准任务状态 API 查询状态。
* 成功响应返回 `files`。生成的语音使用 `file_type: audio`。可选的时间 JSON 使用 `file_type: other`。


## OpenAPI

````yaml zh/api-manual/music-series/gemini-3-8-flash-lite-tts.json POST /api/generate/submit
openapi: 3.1.0
info:
  title: PoYo AI - Gemini 3.8 Flash Lite TTS API
  description: >-
    Gemini 3.8 Flash Lite TTS API 使用预设音色和可选的风格指令，将文本稿或双人对话转换为 WAV 语音。完整输入限制为
    8,192 个 token。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Gemini 3.8 Flash Lite TTS
      summary: 提交 Gemini 3.8 Flash Lite TTS 任务
      description: 根据文本稿或双人对话生成原生 WAV 语音。
      operationId: submit_gemini_3_8_flash_lite_tts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              example-1:
                value:
                  model: gemini-3.8-flash-lite-tts
                  input:
                    text: Hello! Welcome to PoYo.
              example-2:
                value:
                  model: gemini-3.8-flash-lite-tts
                  input:
                    speakers:
                      - speaker_id: host
                        voice: Kore
                      - speaker_id: guest
                        voice: Puck
                    turns:
                      - speaker_id: host
                        text: Welcome!
                      - speaker_id: guest
                        text: Thank you.
                        style_instructions: Warm and friendly.
      responses:
        '200':
          description: 任务已受理；请查询任务获取最终文件。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - gemini-3.8-flash-lite-tts
        input:
          $ref: '#/components/schemas/ModelInput'
        callback_url:
          type: string
          format: uri
          description: 可选的完成或失败回调 URL。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2026-10-13T10:30:00+08:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
    ModelInput:
      additionalProperties: false
      type: object
      properties:
        enable_safety_checker:
          default: true
          type: boolean
          description: 启用输入安全检查。如适用，关闭此项需要账户授权。
        speakers:
          maxItems: 2
          minItems: 2
          type: array
          items:
            required:
              - speaker_id
              - voice
            additionalProperties: false
            type: object
            properties:
              speaker_id:
                minLength: 1
                type: string
                description: 须包含非空白文本。
              voice:
                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
                type: string
          description: >-
            对话模式下须与 turns 同时提供。必须恰好两位说话人，且 speaker_id 互不相同且非空。此时省略 text 和顶层
            voice。
        style_instructions:
          type: string
          description: 全局演绎风格，与文本稿分开。
        voice:
          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
          type: string
          description: 单人模式的音色，默认 Kore。使用 speakers 和 turns 时省略。
        turns:
          minItems: 1
          type: array
          items:
            required:
              - speaker_id
              - text
            additionalProperties: false
            type: object
            properties:
              text:
                minLength: 1
                type: string
                description: 须包含非空白文本。
              speaker_id:
                minLength: 1
                type: string
                description: 须包含非空白文本。
              style_instructions:
                type: string
          description: >-
            对话模式下须与 speakers 同时提供。至少一个 turn；speaker_id 必须引用已配置的说话人。每个 turn 支持可选的
            style_instructions。
        text:
          type: string
          minLength: 1
          description: >-
            单人模式的文本稿。单人模式必填。使用 speakers 和 turns 时省略。完整输入限制为 8192 个
            token。须包含非空白文本。
      description: 使用 text（单人）或 speakers 加 turns（对话）其中一种。两种模式互斥；对话模式不能包含顶层 text 或 voice。
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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