> ## 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 Native Format

> 兼容 Gemini 的 generateContent 和流式接口

使用支持 Gemini 原生协议的模型。不支持的 model ID 会返回 Gemini 格式的错误响应。

流式输出请调用 `POST /v1beta/models/{model}:streamGenerateContent` 并读取 SSE 响应。

## 其他支持的模型

* `google/gemini-3.7-flash`
* `google/gemini-3.5-flash`
* `google/gemini-3.8-flash`
* `google/gemini-4-argon`
* `google/gemini-3.1-pro-preview`
* `google/gemini-3-flash-preview`

URL 中使用完整的公开 ID，包含厂商前缀和斜杠，例如 `/v1beta/models/google/gemini-3.7-flash:generateContent`。发送非空的 contents 数组。流式输出使用 `:streamGenerateContent?alt=sse`。


## OpenAPI

````yaml zh/api-manual/chat-series/gemini-native-format.json POST /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: Vidgo Gemini Native
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security: []
paths:
  /v1beta/models/{model}:generateContent:
    post:
      summary: 生成 Gemini 内容
      description: >-
        使用原生协议请求体，不需要生成接口的 input 包装。JSON 和 SSE 响应体由上游转发；返回的模型名可能与 Vidgo 公开 ID
        不同。认证错误可能使用 detail 字段；协议错误使用该协议的错误结构。
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
            enum:
              - google/gemini-3.7-flash
              - google/gemini-3.5-flash
              - google/gemini-3.8-flash
              - google/gemini-4-argon
              - google/gemini-3.1-pro-preview
              - google/gemini-3-flash-preview
          description: 完整的 Vidgo 公开模型 ID，包含厂商前缀和斜杠。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                contents:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    additionalProperties: true
              required:
                - contents
            examples:
              workflow:
                summary: Vidgo 工作流程示例
                value:
                  contents:
                    - role: user
                      parts:
                        - text: Hello
      responses:
        '200':
          description: Gemini 响应
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: 不支持的模型或协议
        '401':
          description: 凭证无效
        '402':
          description: 积分不足
        '403':
          description: 拒绝访问
        '404':
          description: 未找到厂商上下文
        '408':
          description: 请求超时
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: JSON 无效或请求体不是对象
        '429':
          description: 超出上游速率限制
        '502':
          description: 上游连接或响应错误
      security:
        - bearerAuth: []
        - googleApiKey: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    googleApiKey:
      type: apiKey
      in: header
      name: x-goog-api-key

````

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