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

# Gemini Text Chat

> Gemini 音频生成接口。
可使用gemini-2.5-flash-preview-tts等模型



## OpenAPI

````yaml post /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: UToken API
  version: 1.0.0
  description: Complete UToken API Reference Documentation
servers:
  - url: https://utoken.yoostudio.ai
    description: Production
security: []
tags:
  - name: Images / Native Gemini Format
  - name: Images / Native OpenAI Format
  - name: Images / Qwen OpenAI Compatible Format
  - name: Realtime Voice
  - name: Content Moderation
  - name: Text Embeddings
  - name: Unimplemented / Fine-tuning
  - name: Unimplemented / File Management
  - name: Models / List Models
  - name: Chat Completions
  - name: Chat Completions / Native Gemini Format
  - name: Chat Completions / Native OpenAI Format
  - name: Text Completions
  - name: Video Generation
  - name: Video Generation / Sora Format
  - name: Video Generation / Jimeng (Dreamina) Format
  - name: Video Generation / Kling AI Format
  - name: Document Reranking
  - name: Audio Processing
  - name: Audio Processing / Native OpenAI Format
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - Audio Processing
      summary: Native Gemini Format
      description: |-
        Gemini audio generation endpoint.
        Can use models like gemini-2.5-flash-preview-tts
      operationId: geminirelayv1beta-383836364
      parameters:
        - name: model
          in: path
          required: true
          description: Model name
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  items:
                    type: object
                    properties:
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                          x-apifox-orders:
                            - text
                    x-apifox-orders:
                      - parts
                generationConfig:
                  type: object
                  properties:
                    responseModalities:
                      type: array
                      items:
                        type: string
                    speechConfig:
                      type: object
                      properties:
                        voiceConfig:
                          type: object
                          properties:
                            prebuiltVoiceConfig:
                              type: object
                              properties:
                                voiceName:
                                  type: string
                              required:
                                - voiceName
                              x-apifox-orders:
                                - voiceName
                          required:
                            - prebuiltVoiceConfig
                          x-apifox-orders:
                            - prebuiltVoiceConfig
                      required:
                        - voiceConfig
                      x-apifox-orders:
                        - voiceConfig
                  required:
                    - responseModalities
                    - speechConfig
                  x-apifox-orders:
                    - responseModalities
                    - speechConfig
              required:
                - contents
                - generationConfig
              x-apifox-orders:
                - contents
                - generationConfig
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  candidates:
                    type: array
                    items:
                      type: object
                      properties:
                        content:
                          type: object
                          properties:
                            role:
                              type: string
                            parts:
                              type: array
                              items:
                                type: object
                                properties: {}
                                x-apifox-orders: []
                          x-apifox-orders:
                            - role
                            - parts
                        finishReason:
                          type: string
                        safetyRatings:
                          type: array
                          items:
                            type: object
                            properties: {}
                            x-apifox-orders: []
                      x-apifox-orders:
                        - content
                        - finishReason
                        - safetyRatings
                  usageMetadata:
                    type: object
                    properties:
                      promptTokenCount:
                        type: integer
                      candidatesTokenCount:
                        type: integer
                      totalTokenCount:
                        type: integer
                    x-apifox-orders:
                      - promptTokenCount
                      - candidatesTokenCount
                      - totalTokenCount
                x-apifox-orders:
                  - candidates
                  - usageMetadata
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Use Bearer Token authentication
        Format: Authorization: Bearer sk-xxxxxx

````