> ## 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.

# Flux2 Flex Image to Image

> Flux 2 Flex モデルを使用した画像編集（非同期）

Flux2 Flex モデルを使用して画像から画像を生成します。


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/k/flux2-flex-image-to-image
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/flux2-flex-image-to-image:
    post:
      tags:
        - public
      summary: Flux 2 Flex 画像から画像
      description: Flux 2 Flex モデルを使用した画像編集（非同期）
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateFlux2FlexImageToImageTaskRequest'
        description: Task parameters
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    ka.CreateFlux2FlexImageToImageTaskRequest:
      properties:
        aspect_ratio:
          default: auto
          description: アスペクト比（オプション、デフォルト値 auto）
          enum:
            - '1:1'
            - '4:3'
            - '3:4'
            - '16:9'
            - '9:16'
            - '3:2'
            - '2:3'
            - auto
          example: auto
          type: string
        input_urls:
          description: 入力画像URLのリスト（必須、1-8枚の画像）
          example:
            - https://example.com/image1.png
            - https://example.com/image2.png
          items:
            type: string
          maxItems: 8
          minItems: 1
          type: array
        prompt:
          description: プロンプト（必須、3-5000文字）
          example: Replace the can in image 2 with the can from image 1
          maxLength: 5000
          minLength: 3
          type: string
        resolution:
          default: 1K
          description: 解像度（オプション、デフォルト値 1K）
          enum:
            - 1K
            - 2K
          example: 1K
          type: string
      required:
        - input_urls
        - 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を使用して認証を行ってください

````