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

# Imagen 4

> Generate images using Imagen4 model (async)

Generate high-quality images using [Google DeepMind](https://deepmind.google)'s Imagen 4 model.

**Key Features:**

* **2K High Resolution** - Generate detailed images up to 2K resolution
* **Realistic Texture Details** - Excellent fabric, water droplet, and animal fur rendering
* **Precise Text Typography** - Significantly improved text and typography generation
* **SynthID Watermark** - Built-in invisible digital watermark to identify AI-generated content


## OpenAPI

````yaml /en/openapi.yaml POST /generate/k/imagen4
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/imagen4:
    post:
      tags:
        - public
      summary: Imagen4 Image Generation
      description: Generate images using Imagen4 model (async)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateImagen4TaskRequest'
        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.CreateImagen4TaskRequest:
      properties:
        aspect_ratio:
          default: '1:1'
          description: aspect ratio（optional，default 1:1）
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
            - '3:4'
            - '4:3'
          example: '1:1'
          type: string
        negative_prompt:
          description: Negative prompt (optional)
          example: blurry, low quality
          type: string
        num_images:
          default: 1
          description: Number of images to generate (optional, 1-4 images, default 1)
          example: 1
          maximum: 4
          minimum: 1
          type: integer
        prompt:
          description: Prompt (required, max 5000 characters)
          example: a futuristic cityscape at sunset
          maxLength: 5000
          minLength: 1
          type: string
        seed:
          description: Random seed (optional, integer type)
          example: 0
          type: integer
      required:
        - prompt
      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

````