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

# Gemini 画像(Nano Banana)

> Gemini 画像生成。

Nano BananaシリーズはOpenAI Dall-E 形式をサポートします（詳細はリンク [画像生成OpenAI DALL-E 形式](#tag/%E5%9B%BE%E7%89%87%E7%94%9F%E6%88%90OpenAI%20DALL-E%E6%A0%BC%E5%BC%8F) を参照）。

Gemini 画像生成互換インターフェースです。`contents[].parts` にテキストまたは画像入力を入れ、`generationConfig.responseModalities` には通常 `IMAGE` を指定します。画像サイズは `generationConfig.imageConfig.imageSize` で制御します。



## OpenAPI

````yaml api-reference/ja/openapi.json POST /v1beta/models/{model}:generateContent
openapi: 3.0.0
info:
  title: 出海营 API 参考ドキュメント
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI形式(Chat)
  - name: OpenAI形式（Responses）
  - name: 画像生成Gemini形式
  - name: 画像生成OpenAI DALL-E形式
  - name: モデル一覧の取得
  - name: 動画生成HappyHorseとWan
  - name: 動画生成Kling形式
  - name: 動画生成OmniとVeo形式
  - name: Video generation Seedance
  - name: 動画生成Sora対応形式
  - name: Video generation Vidu
  - name: 音楽生成タスクの形式
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - 画像生成Gemini形式
      summary: Gemini 画像(Nano Banana)
      description: >-
        Gemini 画像生成。


        Nano BananaシリーズはOpenAI Dall-E 形式をサポートします（詳細はリンク [画像生成OpenAI DALL-E
        形式](#tag/%E5%9B%BE%E7%89%87%E7%94%9F%E6%88%90OpenAI%20DALL-E%E6%A0%BC%E5%BC%8F)
        を参照）。


        Gemini 画像生成互換インターフェースです。`contents[].parts`
        にテキストまたは画像入力を入れ、`generationConfig.responseModalities` には通常 `IMAGE`
        を指定します。画像サイズは `generationConfig.imageConfig.imageSize` で制御します。
      operationId: geminiRelayV1Beta
      parameters:
        - name: model
          in: path
          description: モデル名
          required: true
          example: gemini-3-pro-image-preview
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        description: メッセージのロール。一般的な値は `user` または `model` です。
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                              description: テキスト入力内容。
                            inlineData:
                              type: object
                              description: base64画像などの入力に適した、インラインのバイナリコンテンツオブジェクト。
                              properties:
                                mimeType:
                                  type: string
                                  description: 'インラインコンテンツの MIME タイプ。例: `image/png`。'
                                data:
                                  type: string
                                  description: Base64 エンコード後のバイナリデータの内容。
                        description: メッセージ片の配列。テキスト、画像などの入力はすべてここに含めます。
                  description: 必須。Gemini の入力コンテンツ配列。通常は少なくとも 1 件の user メッセージを含みます。
                generationConfig:
                  type: object
                  properties:
                    responseModalities:
                      type: array
                      items:
                        type: string
                      description: レスポンスモードの一覧。画像生成では通常 `IMAGE` を渡します。
                    imageConfig:
                      type: object
                      properties:
                        aspectRatio:
                          type: string
                          description: アスペクト比。たとえば `16:9`、`1:1`、`9:16`。
                        imageSize:
                          type: string
                          description: '出力解像度レベル。例: `1K`、`2K`、`4K`。'
                      description: 画像生成設定オブジェクト。
                  required:
                    - responseModalities
                  description: 生成設定オブジェクト。
              required:
                - contents
                - generationConfig
            example:
              contents:
                - role: user
                  parts:
                    - text: draw a cat
              generationConfig:
                responseModalities:
                  - TEXT
                  - IMAGE
                imageConfig:
                  aspectRatio: '16:9'
                  imageSize: 4K
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiResponse'
          headers: {}
      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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Bearer Token を使用して認証します。
        形式: `Authorization: Bearer sk-xxxxxx`

````