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

# Nano Banana 2

> Nano Banana 2 モデルを使用した画像生成（非同期）。テキストからの生成と画像編集を統合し、Google 検索による拡張をサポートします

[Google DeepMind](https://deepmind.google) の Nano Banana 2 (Gemini 2.0 Flash) モデルを使用して画像を生成します。

**主な特徴:**

* **統合された生成と編集** - テキストから画像生成と画像編集を一つのエンドポイントで実現
* **Google 検索拡張** - Google 検索を活用し、リアルタイムデータに基づいた画像を生成
* **マルチ画像入力** - 編集や参照用に最大14枚の入力画像をサポート
* **柔軟な解像度** - 1K、2K、4K の出力解像度をサポート
* **多様なアスペクト比** - 1:1 から 21:9 まで幅広いアスペクト比に対応


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/k/nano-banana-2
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AIモデルタスクスケジューリングプラットフォーム API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: 本番サーバー
security: []
paths:
  /generate/k/nano-banana-2:
    post:
      tags:
        - public
      summary: Nano Banana 2 画像生成
      description: >-
        Nano Banana 2 モデルを使用した画像生成（非同期）。テキストからの生成と画像編集を統合し、Google
        検索による拡張をサポートします
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateNanoBanana2TaskRequest'
        description: タスクパラメータ
        required: true
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: 無効なパラメータ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: 認証エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    ka.CreateNanoBanana2TaskRequest:
      properties:
        aspect_ratio:
          default: auto
          description: AspectRatio 画像のアスペクト比（オプション、デフォルトは auto）
          enum:
            - '1:1'
            - '1:4'
            - '1:8'
            - '2:3'
            - '3:2'
            - '3:4'
            - '4:1'
            - '4:3'
            - '4:5'
            - '5:4'
            - '8:1'
            - '9:16'
            - '16:9'
            - '21:9'
            - auto
          example: auto
          type: string
        google_search:
          default: false
          description: GoogleSearch Google 検索による拡張を使用するかどうか（オプション、デフォルトは false）
          example: false
          type: boolean
        image_input:
          description: ImageInput 入力画像のリスト（オプション、最大14枚、各画像最大30MBまでサポート）
          example:
            - ''
          items:
            type: string
          maxItems: 14
          type: array
        output_format:
          default: jpg
          description: OutputFormat 出力画像のフォーマット（オプション、デフォルトは jpg）
          enum:
            - jpg
            - png
          example: jpg
          type: string
        prompt:
          description: Prompt 画像生成のためのテキスト記述（必須、最大20000文字）
          example: A beautiful landscape with mountains and a lake at sunset
          maxLength: 20000
          minLength: 1
          type: string
        resolution:
          default: 1K
          description: Resolution 画像の解像度（オプション、デフォルトは 1K）
          enum:
            - 1K
            - 2K
            - 4K
          example: 1K
          type: string
      required:
        - prompt
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: タスクID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: '機械可読なエラーコード（例: TASK.INVALID_PARAMS）'
          type: string
        message:
          description: ユーザーフレンドリーなエラーメッセージ
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Tokenを使用して認証を行ってください

````