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

# Flux Kontext

> Flux Kontext モデルを使用した画像の生成または編集（非同期）

Flux Kontext モデルを使用して画像を生成します。

**主な特徴:**

* **多言語サポート** - 中国語プロンプトをサポートし、自動翻訳機能付き
* **コンテキスト認識** - インテリジェントなコンテキスト理解


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/k/flux-kontext
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/flux-kontext:
    post:
      tags:
        - public
      summary: Flux Kontext 画像生成/編集
      description: Flux Kontext モデルを使用した画像の生成または編集（非同期）
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateFluxKontextTaskRequest'
        description: タスクパラメータ
        required: true
      responses:
        '200':
          description: OK
          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.CreateFluxKontextTaskRequest:
      properties:
        aspect_ratio:
          default: auto
          description: アスペクト比（オプション、デフォルト 16:9）
          enum:
            - auto
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
          example: '16:9'
          type: string
        enable_translation:
          default: true
          description: 自動翻訳を有効化（オプション、デフォルト true）
          example: true
          type: boolean
        input_image:
          description: 入力画像URL（オプション、編集モードで使用）
          example: https://example.com/input.jpg
          type: string
        model:
          default: flux-kontext-pro
          description: モデルバージョン（オプション、デフォルト flux-kontext-pro）
          enum:
            - flux-kontext-pro
            - flux-kontext-max
          example: flux-kontext-pro
          type: string
        output_format:
          default: jpeg
          description: 出力形式（オプション、デフォルト jpeg）
          enum:
            - jpeg
            - png
          example: jpeg
          type: string
        prompt:
          description: プロンプト（必須、英語をサポート）
          example: a beautiful landscape with mountains
          minLength: 1
          type: string
        prompt_upsampling:
          default: false
          description: プロンプト拡張を有効化（オプション、デフォルト false）
          example: false
          type: boolean
        safety_tolerance:
          default: 2
          description: 安全性許容レベル（オプション、0-6、デフォルト2）
          example: 2
          maximum: 6
          minimum: 0
          type: integer
        upload_cn:
          description: 中国本土サーバーを使用してアップロード（オプション）
          example: false
          type: boolean
        watermark:
          description: ウォーターマーク識別子（オプション）
          example: ''
          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を使用して認証を行ってください

````