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

# GPT-4o Image

> OpenAI GPT-4o モデルを使用して画像を生成します（非同期）

[OpenAI](https://openai.com) の GPT-4o モデルを使用して画像を生成します。


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/k/gpt4o-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/gpt4o-image:
    post:
      tags:
        - public
      summary: GPT-4o Image 画像生成
      description: OpenAI GPT-4o モデルを使用して画像を生成します（非同期）
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateGPT4oImageTaskRequest'
        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.CreateGPT4oImageTaskRequest:
      properties:
        filesUrl:
          description: ファイルURLリスト（オプション）- ファイルURLリスト、最大5枚の画像
          example:
            - ''
          items:
            type: string
          type: array
        isEnhance:
          default: false
          description: 拡張を有効化（オプション）- プロンプト拡張、デフォルト false
          example: false
          type: boolean
        maskUrl:
          description: マスクURL（オプション）- 編集用のマスク画像URL、黒色の領域が置換/修正されます
          example: ''
          type: string
        nVariants:
          default: 1
          description: バリエーション数（オプション）- 画像バリエーション数、1、2、または4を選択可能、デフォルト1
          enum:
            - 1
            - 2
            - 4
          example: 1
          type: integer
        prompt:
          description: プロンプト（オプション）- GPT-4oに生成してほしい内容を記述
          example: A beautiful sunset over the mountains
          type: string
        size:
          default: '1:1'
          description: サイズ（必須）- 画像のアスペクト比、サポートされている形式のいずれかである必要があります
          enum:
            - '1:1'
            - '3:2'
            - '2:3'
          example: '1:1'
          type: string
      required:
        - size
      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を使用して認証を行ってください

````