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

> Generate images using OpenAI GPT-4o model (async)

Create and edit images using [OpenAI](https://openai.com)'s GPT-4o native image generation capabilities.

**Key Features:**

* **Native Multimodal** - Image generation built into GPT-4o architecture, not external model calls
* **Precise Text Rendering** - Significantly better text generation than DALL·E 3
* **Multi-Turn Consistency** - Refine images through natural conversation while maintaining style coherence
* **Image Understanding & Editing** - Support uploading images as input for understanding and transformation


## OpenAPI

````yaml /en/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 Model Task Scheduling Platform 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: Production server
security: []
paths:
  /generate/k/gpt4o-image:
    post:
      tags:
        - public
      summary: GPT-4o Image Generation
      description: Generate images using OpenAI GPT-4o model (async)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateGPT4oImageTaskRequest'
        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.CreateGPT4oImageTaskRequest:
      properties:
        filesUrl:
          description: File URL list (optional) - File URL list, max 5 images
          example:
            - ''
          items:
            type: string
          type: array
        isEnhance:
          default: false
          description: Enable enhancement (optional) - Prompt enhancement, default false
          example: false
          type: boolean
        maskUrl:
          description: >-
            Mask URL (optional) - Mask image URL for editing, black areas will
            be replaced/modified
          example: ''
          type: string
        nVariants:
          default: 1
          description: >-
            Number of variants (optional) - Number of image variants, options 1,
            2 or 4, default 1
          enum:
            - 1
            - 2
            - 4
          example: 1
          type: integer
        prompt:
          description: Prompt (optional) - Describe the content you want GPT-4o to generate
          example: A beautiful sunset over the mountains
          type: string
        size:
          default: '1:1'
          description: >-
            Size (required) - Image aspect ratio, must be one of the supported
            formats
          enum:
            - '1:1'
            - '3:2'
            - '2:3'
          example: '1:1'
          type: string
      required:
        - size
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: Task ID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g., TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Please use your API Token for authentication

````