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

# Gemini 3.5 Flash - Native API - クイックスタート

> - Google Native API形式でgemini-3.5-flashモデルを呼び出し
- 同期処理モード、リアルタイムレスポンス
- 最小限のパラメータですぐに開始
- 💡 より多くの機能が必要ですか？[完全なAPIリファレンス](./native-api-reference)をご確認ください

<Tip>
  **ストリーミング**：URL の `generateContent` を `streamGenerateContent` に置き換えると、ストリーミングレスポンスが有効になり、コンテンツをリアルタイムでチャンクごとに受信できます。
</Tip>

<Note>
  **BaseURL**：デフォルトの BaseURL は `https://direct.evolink.ai` で、テキストモデルへの対応が優れており、長時間接続をサポートします。`https://api.evolink.ai` はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。
</Note>


## OpenAPI

````yaml ja/api-manual/language-series/gemini-3.5-flash/native-api/native-api-quickstart.json POST /v1beta/models/gemini-3.5-flash:generateContent
openapi: 3.1.0
info:
  title: Gemini Native API - クイックスタート
  description: Google Gemini Native APIを始めて、5分で最初のAI会話を完了しましょう
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨）
  - url: https://api.evolink.ai
    description: 代替 URL
security:
  - bearerAuth: []
tags:
  - name: コンテンツ生成
    description: Gemini AIコンテンツ生成API
paths:
  /v1beta/models/gemini-3.5-flash:generateContent:
    post:
      tags:
        - コンテンツ生成
      summary: gemini-3.5-flash クイックチャット
      description: |-
        - Google Native API形式でgemini-3.5-flashモデルを呼び出し
        - 同期処理モード、リアルタイムレスポンス
        - 最小限のパラメータですぐに開始
        - 💡 より多くの機能が必要ですか？[完全なAPIリファレンス](./native-api-reference)をご確認ください
      operationId: generateContentQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentQuickRequest'
      responses:
        '200':
          description: コンテンツが正常に生成されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
        '400':
          description: 無効なリクエストパラメータ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: 無効なリクエストパラメータ
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足、チャージが必要です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: クォータ不足
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '403':
          description: アクセス拒否
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
        '404':
          description: リソースが見つかりません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Model not found
                  type: not_found_error
        '429':
          description: レート制限を超過しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: レート制限を超過しました
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: 内部サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: 内部サーバーエラー
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: 上流サービスエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try again later
        '503':
          description: サービス一時利用不可
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: サービス一時利用不可
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    GenerateContentQuickRequest:
      type: object
      required:
        - contents
      properties:
        contents:
          type: array
          description: 会話コンテンツリスト
          items:
            $ref: '#/components/schemas/ContentSimple'
          minItems: 1
          example:
            - role: user
              parts:
                - text: Hello, please introduce yourself
    GenerateContentResponse:
      type: object
      properties:
        candidates:
          type: array
          description: 候補応答のリスト
          items:
            $ref: '#/components/schemas/Candidate'
        promptFeedback:
          $ref: '#/components/schemas/PromptFeedback'
        usageMetadata:
          $ref: '#/components/schemas/UsageMetadata'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP ステータスエラーコード
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
            fallback_suggestion:
              type: string
              description: エラー時のフォールバック提案
    ContentSimple:
      type: object
      required:
        - role
        - parts
      properties:
        role:
          type: string
          description: コンテンツロール
          enum:
            - user
          example: user
        parts:
          type: array
          description: コンテンツパーツリスト（プレーンテキスト）
          items:
            $ref: '#/components/schemas/TextPart'
          minItems: 1
    Candidate:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentResponse'
        finishReason:
          type: string
          description: 終了理由
          enum:
            - STOP
            - MAX_TOKENS
            - SAFETY
            - RECITATION
            - OTHER
          example: STOP
        index:
          type: integer
          description: 候補インデックス
          example: 0
        safetyRatings:
          type: array
          nullable: true
          description: 安全性評価
          items:
            type: object
    PromptFeedback:
      type: object
      properties:
        safetyRatings:
          type: array
          nullable: true
          description: プロンプト安全性評価
          items:
            type: object
    UsageMetadata:
      type: object
      description: 使用統計
      properties:
        promptTokenCount:
          type: integer
          description: 入力トークン数
          example: 4
        candidatesTokenCount:
          type: integer
          description: 出力トークン数
          example: 611
        totalTokenCount:
          type: integer
          description: トークンの合計数
          example: 2422
        thoughtsTokenCount:
          type: integer
          description: 推論トークン数
          example: 1807
        promptTokensDetails:
          type: array
          description: 詳細な入力トークン情報（モダリティ別）
          items:
            $ref: '#/components/schemas/TokenDetail'
    TextPart:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: テキストコンテンツ
          example: |-
            Hello! I'm glad to introduce myself.

            I'm a large language model trained and developed by Google...
    ContentResponse:
      type: object
      properties:
        role:
          type: string
          description: レスポンスロール
          enum:
            - model
          example: model
        parts:
          type: array
          description: レスポンスコンテンツパーツ
          items:
            $ref: '#/components/schemas/TextPart'
    TokenDetail:
      type: object
      description: トークン詳細（モダリティ別）
      properties:
        modality:
          type: string
          description: コンテンツモダリティタイプ
          enum:
            - TEXT
            - IMAGE
            - AUDIO
            - VIDEO
          example: TEXT
        tokenCount:
          type: integer
          description: このモダリティのトークン数
          example: 4
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````