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

# EvoLink Auto - Gemini 格式

> 使用 Google Generative AI 格式的智能路由

## 智能模型路由

使用 Google Generative AI 格式调用 EvoLink Auto 智能模型路由。

### 核心特点

* **Gemini 原生格式**：完全兼容 Google Generative AI API
* **智能路由**：自动选择合适的模型
* **透明返回**：响应中包含实际使用的模型版本

<Note>
  在路径参数中使用 `evolink/auto`，调用 `/v1beta/models/evolink/auto:generateContent` 端点。
</Note>

<Note>
  **BaseURL 说明**：默认 BaseURL 为 `https://direct.evolink.ai`，对文本模型支持更好，支持长连接；`https://api.evolink.ai` 是多模态主力地址，对文本模型作为备用地址使用。
</Note>


## OpenAPI

````yaml cn/api-manual/language-series/evolink-auto/evolink-auto-gemini.json POST /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: EvoLink Auto - Gemini 格式
  description: 使用 Google Generative AI 格式的智能模型路由
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 标准接口
security:
  - bearerAuth: []
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - 智能路由
      summary: 智能模型路由 (Gemini 格式)
      description: 使用 Google Generative AI 格式的智能路由
      operationId: generateContentAuto
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
            enum:
              - evolink/auto
            example: evolink/auto
          description: 模型名称，使用 evolink/auto 启用智能路由
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeminiAutoRequest'
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiResponse'
components:
  schemas:
    GeminiAutoRequest:
      type: object
      required:
        - contents
      properties:
        contents:
          type: array
          description: 对话内容列表
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - user
                  - model
              parts:
                type: array
                items:
                  type: object
                  properties:
                    text:
                      type: string
          example:
            - role: user
              parts:
                - text: 介绍一下人工智能的发展历史
        generationConfig:
          type: object
          properties:
            temperature:
              type: number
              minimum: 0
              maximum: 2
              example: 0.7
            topP:
              type: number
              minimum: 0
              maximum: 1
              example: 0.9
            topK:
              type: integer
              minimum: 1
              example: 40
            maxOutputTokens:
              type: integer
              example: 1024
    GeminiResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                type: object
                properties:
                  parts:
                    type: array
                    items:
                      type: object
                      properties:
                        text:
                          type: string
                  role:
                    type: string
                    enum:
                      - model
              finishReason:
                type: string
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            totalTokenCount:
              type: integer
        modelVersion:
          type: string
          description: 实际使用的模型版本
          example: gemini-2.5-pro
      example:
        candidates:
          - content:
              parts:
                - text: 人工智能的发展历史可以追溯到20世纪50年代...
              role: model
            finishReason: STOP
        usageMetadata:
          promptTokenCount: 15
          candidatesTokenCount: 156
          totalTokenCount: 171
        modelVersion: gpt-5.4
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```
      bearerFormat: sk-evo-xxxxxxxxxx

````