> ## Documentation Index
> Fetch the complete documentation index at: https://evo-0136956d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini API（）

> Gemini 原生 API 接口。/v1beta/models/ 之后的路径直接透传（如 gemini-2.0-flash:generateContent、gemini-2.0-flash:streamGenerateContent）。 支持文本生成和图片生成（如 Nano Banana）。



## OpenAPI

````yaml /en/openapi/relay-api.mintlify.json post /v1beta/models/{path}
openapi: 3.0.1
info:
  title: AI Relay API
  description: 统一的 AI Model 调用接口，支持 OpenAI、Claude、Gemini、Kling、即梦等多种格式
  version: 1.0.0
  license:
    name: Proprietary
    url: https://example.com/license
servers:
  - url: https://token.nusabase.com/silver
    description: API Base URL
security:
  - BearerAuth: []
tags:
  - name: Models
    description: Models endpoints
  - name: Chat
    description: Chat endpoints
  - name: Responses
    description: Responses endpoints
  - name: Realtime
    description: Realtime endpoints
  - name: Claude
    description: Claude endpoints
  - name: Gemini
    description: Gemini endpoints
  - name: Images
    description: Images endpoints
  - name: Video
    description: Video endpoints
  - name: Video / Kling
    description: Video / Kling endpoints
  - name: Video / Jimeng
    description: Video / Jimeng endpoints
  - name: Audio
    description: Audio endpoints
  - name: Embeddings
    description: Embeddings endpoints
  - name: Rerank
    description: Rerank endpoints
  - name: Moderations
    description: Moderations endpoints
  - name: Not Implemented
    description: Not Implemented endpoints
paths:
  /v1beta/models/{path}:
    post:
      tags:
        - Gemini
      summary: Gemini API（）
      description: >-
        Gemini 原生 API 接口。/v1beta/models/ 之后的路径直接透传（如
        gemini-2.0-flash:generateContent、gemini-2.0-flash:streamGenerateContent）。
        支持文本生成和图片生成（如 Nano Banana）。
      operationId: post_v1beta_models_path
      parameters:
        - name: path
          in: path
          description: Model 资源路径（如 models/gemini-2.0-flash:generateContent）
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                generationConfig:
                  type: object
                  properties:
                    responseModalities:
                      type: array
                      items:
                        type: string
                    imageConfig:
                      type: object
                      properties:
                        aspectRatio:
                          type: string
                        imageSize:
                          type: string
                  required:
                    - responseModalities
              required:
                - contents
                - generationConfig
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiResponse'
          headers: {}
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    GeminiResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                type: object
                properties:
                  role:
                    type: string
                  parts:
                    type: array
                    items:
                      type: object
                      properties: {}
              finishReason:
                type: string
              safetyRatings:
                type: array
                items:
                  type: object
                  properties: {}
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            totalTokenCount:
              type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误 Profile
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数
              nullable: true
            code:
              type: string
              description: 错误代码
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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