> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiid.edu.kg/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate images (compatible with OpenAI Dall-E)

> OpenAI Dall-E-style image generation API.

- `POST /v1/images/generations`: Create an image generation task

Standard authentication headers:
- `Content-Type: application/json`

- `model: string`: Required, public model name
- `prompt: string`: Recommended, image generation prompt
- `n: number`: Optional, number of images to generate
- `size: string`: Optional, size or resolution specification
- `quality: string`: Optional, quality level
- `response_format: string`: Optional, response format

Common compatible extension parameters:
- `image`
- `image_url`
- `image_urls`
- `image_list`
- `subject_image_list`
- `scene_image`
- `style_image`
- `negative_prompt`
- `aspect_ratio`
- `resolution`
- `callback_url`
- `external_task_id`

Kling Dedicated extension parameters:
- `model_name`
- `element_list`
- `result_type`
- `series_amount`
- `human_image`
- `cloth_image`
- `up_expansion_ratio`
- `down_expansion_ratio`
- `left_expansion_ratio`
- `right_expansion_ratio`

### 3.1 Nano Banana Series

Public model:
- `nano-banana`
- `nano-banana-pro`
- `nano-banana-pro-2k`
- `nano-banana-pro-4k`
- `nano-banana-2`
- `nano-banana-2-2k`
- `nano-banana-2-4k`

Capabilities:
- `nano-banana`: Basic text-to-image, also compatible with image editing
- `nano-banana-pro*`: Higher-quality version
- `nano-banana-2*`: Newer model family
- `*-2k` / `*-4k`: High-resolution variants

Common parameters:
- Text-to-image: `model + prompt`
- Image editing: `model + prompt + image`, also compatible with `image_urls`
- Common extensions: `n` `size` `quality` `response_format`

Example:

```json
{
  "model": "nano-banana",
  "prompt": "a cute cat running in cloud",
  "n": 1,
  "size": "1024x1792"
}
```

```json
{
  "model": "nano-banana-pro",
  "prompt": "把主体改成赛博朋克夜景",
  "image": "https://example.com/input.png",
  "n": 1
}
```

### 3.2 Seedream Series

Public model:
- `doubao-seedream-3-0-t2i-250415`
- `doubao-seedream-4-0-250828`
- `doubao-seedream-4-5-251128`
- `doubao-seedream-5-0-260128`

Capabilities:
- Use the text-to-image call uniformly
- It is recommended to pass the standard parameter first: `prompt + model + size/aspect_ratio`

Common parameters:
- `model + prompt`
- Optional: `size` `aspect_ratio` `n`

### 3.3 Kling Standard Image Main Model

Public base model:
- `kling-image`

Required:
- `model`
- `model_name`

Supported `model_name`:
- `kling-v1`
- `kling-v1-5`
- `kling-v2`
- `kling-v2-new`
- `kling-v2-1`
- `kling-v3`

Capabilities:
- Text-to-image: `model + model_name + prompt`
- Image-to-image: add `image` on top of text-to-image
- Multi-image generation: pass `subject_image_list`, or pass multiple `image_urls/images`
- Outpainting: pass `image` and the outpainting ratio parameter

Common parameters:
- `image`
- `subject_image_list`
- `scene_image`
- `style_image`
- `aspect_ratio`
- `resolution`
- `up_expansion_ratio`
- `down_expansion_ratio`
- `left_expansion_ratio`
- `right_expansion_ratio`

Example:

```json
{
  "model": "kling-image",
  "model_name": "kling-v3",
  "prompt": "海边日落，电影感人像",
  "aspect_ratio": "16:9",
  "n": 1
}
```

### 3.4 Kling Omni Image Main Model

Public base model:
- `kling-omni-image`

Required:
- `model`
- `model_name`

Supported `model_name`:
- `kling-image-o1`
- `kling-v3-omni`

Common parameters:
- `image_list`
- `element_list`
- `resolution`
- `aspect_ratio`
- `result_type`
- `series_amount`

Example:

```json
{
  "model": "kling-omni-image",
  "model_name": "kling-v3-omni",
  "prompt": "生成一张海边跳舞的图片",
  "element_list": [
    {
      "element_id": 835266081714884677
    }
  ]
}
```

### 3.5 Kling Virtual Try-On Model

Public model:
- `kolors-virtual-try-on-v1`
- `kolors-virtual-try-on-v1-5`

Minimum input parameters:
- `model + human_image + cloth_image`

Description:
- These two models are already complete primary models themselves, so there is no need to pass `model_name` again.

Example:

```json
{
  "model": "kolors-virtual-try-on-v1",
  "human_image": "https://example.com/human.jpg",
  "cloth_image": "https://example.com/cloth.jpg"
}
```



## OpenAPI

````yaml api-reference/en/openapi.json POST /v1/images/generations
openapi: 3.0.0
info:
  title: Overseas Expansion Camp API Reference Documentation
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI format (Chat)
  - name: OpenAI Format (Responses)
  - name: Gemini Format for Image Generation
  - name: Image generationOpenAI DALL-E format
  - name: List models
  - name: Video generationHappyHorse and Wan
  - name: Video generation Kling format
  - name: Video generation Omni and Veo formats
  - name: Video generation Seedance
  - name: Video generation Sora compatible formats
  - name: Video generation Vidu
  - name: Music generation task format
paths:
  /v1/images/generations:
    post:
      tags:
        - Image generationOpenAI DALL-E format
      summary: Generate images (compatible with OpenAI Dall-E)
      description: >-
        OpenAI Dall-E-style image generation API.


        - `POST /v1/images/generations`: Create an image generation task


        Standard authentication headers:

        - `Content-Type: application/json`


        - `model: string`: Required, public model name

        - `prompt: string`: Recommended, image generation prompt

        - `n: number`: Optional, number of images to generate

        - `size: string`: Optional, size or resolution specification

        - `quality: string`: Optional, quality level

        - `response_format: string`: Optional, response format


        Common compatible extension parameters:

        - `image`

        - `image_url`

        - `image_urls`

        - `image_list`

        - `subject_image_list`

        - `scene_image`

        - `style_image`

        - `negative_prompt`

        - `aspect_ratio`

        - `resolution`

        - `callback_url`

        - `external_task_id`


        Kling Dedicated extension parameters:

        - `model_name`

        - `element_list`

        - `result_type`

        - `series_amount`

        - `human_image`

        - `cloth_image`

        - `up_expansion_ratio`

        - `down_expansion_ratio`

        - `left_expansion_ratio`

        - `right_expansion_ratio`


        ### 3.1 Nano Banana Series


        Public model:

        - `nano-banana`

        - `nano-banana-pro`

        - `nano-banana-pro-2k`

        - `nano-banana-pro-4k`

        - `nano-banana-2`

        - `nano-banana-2-2k`

        - `nano-banana-2-4k`


        Capabilities:

        - `nano-banana`: Basic text-to-image, also compatible with image editing

        - `nano-banana-pro*`: Higher-quality version

        - `nano-banana-2*`: Newer model family

        - `*-2k` / `*-4k`: High-resolution variants


        Common parameters:

        - Text-to-image: `model + prompt`

        - Image editing: `model + prompt + image`, also compatible with
        `image_urls`

        - Common extensions: `n` `size` `quality` `response_format`


        Example:


        ```json

        {
          "model": "nano-banana",
          "prompt": "a cute cat running in cloud",
          "n": 1,
          "size": "1024x1792"
        }

        ```


        ```json

        {
          "model": "nano-banana-pro",
          "prompt": "把主体改成赛博朋克夜景",
          "image": "https://example.com/input.png",
          "n": 1
        }

        ```


        ### 3.2 Seedream Series


        Public model:

        - `doubao-seedream-3-0-t2i-250415`

        - `doubao-seedream-4-0-250828`

        - `doubao-seedream-4-5-251128`

        - `doubao-seedream-5-0-260128`


        Capabilities:

        - Use the text-to-image call uniformly

        - It is recommended to pass the standard parameter first: `prompt +
        model + size/aspect_ratio`


        Common parameters:

        - `model + prompt`

        - Optional: `size` `aspect_ratio` `n`


        ### 3.3 Kling Standard Image Main Model


        Public base model:

        - `kling-image`


        Required:

        - `model`

        - `model_name`


        Supported `model_name`:

        - `kling-v1`

        - `kling-v1-5`

        - `kling-v2`

        - `kling-v2-new`

        - `kling-v2-1`

        - `kling-v3`


        Capabilities:

        - Text-to-image: `model + model_name + prompt`

        - Image-to-image: add `image` on top of text-to-image

        - Multi-image generation: pass `subject_image_list`, or pass multiple
        `image_urls/images`

        - Outpainting: pass `image` and the outpainting ratio parameter


        Common parameters:

        - `image`

        - `subject_image_list`

        - `scene_image`

        - `style_image`

        - `aspect_ratio`

        - `resolution`

        - `up_expansion_ratio`

        - `down_expansion_ratio`

        - `left_expansion_ratio`

        - `right_expansion_ratio`


        Example:


        ```json

        {
          "model": "kling-image",
          "model_name": "kling-v3",
          "prompt": "海边日落，电影感人像",
          "aspect_ratio": "16:9",
          "n": 1
        }

        ```


        ### 3.4 Kling Omni Image Main Model


        Public base model:

        - `kling-omni-image`


        Required:

        - `model`

        - `model_name`


        Supported `model_name`:

        - `kling-image-o1`

        - `kling-v3-omni`


        Common parameters:

        - `image_list`

        - `element_list`

        - `resolution`

        - `aspect_ratio`

        - `result_type`

        - `series_amount`


        Example:


        ```json

        {
          "model": "kling-omni-image",
          "model_name": "kling-v3-omni",
          "prompt": "生成一张海边跳舞的图片",
          "element_list": [
            {
              "element_id": 835266081714884677
            }
          ]
        }

        ```


        ### 3.5 Kling Virtual Try-On Model


        Public model:

        - `kolors-virtual-try-on-v1`

        - `kolors-virtual-try-on-v1-5`


        Minimum input parameters:

        - `model + human_image + cloth_image`


        Description:

        - These two models are already complete primary models themselves, so
        there is no need to pass `model_name` again.


        Example:


        ```json

        {
          "model": "kolors-virtual-try-on-v1",
          "human_image": "https://example.com/human.jpg",
          "cloth_image": "https://example.com/cloth.jpg"
        }

        ```
      operationId: createImageGeneration
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: Public image model name.
                  example: dall-e-3
                  enum:
                    - nano-banana
                    - doubao-seedream-3-0-t2i-250415
                    - kling-image
                    - kling-omni-image
                    - kolors-virtual-try-on-v1
                    - kolors-virtual-try-on-v1-5
                prompt:
                  type: string
                  description: >-
                    Image generation description. This can be omitted for the
                    virtual try-on model.
                'n':
                  type: integer
                  description: Number of images to generate.
                  default: 1
                size:
                  type: string
                  description: Size or resolution representation.
                  enum:
                    - 1024x1024
                    - 1024x1792
                    - 1792x1024
                quality:
                  type: string
                  description: Quality level.
                  enum:
                    - standard
                    - hd
                style:
                  type: string
                  description: Style
                  enum:
                    - vivid
                    - natural
                response_format:
                  type: string
                  description: Response format.
                  enum:
                    - url
                    - b64_json
                user:
                  type: string
                  description: User ID
              required:
                - model
                - prompt
            examples:
              nano_banana_text2img:
                summary: Nano Banana Text-to-image
                value:
                  model: nano-banana
                  prompt: a cute cat running in cloud
                  'n': 1
                  size: 1024x1792
              seedream_text2img:
                summary: Seedream Text-to-Image
                value:
                  model: doubao-seedream-3-0-t2i-250415
                  prompt: 一张电影感海边日落人像
                  size: 1536x1024
                  'n': 1
              kling_text2img:
                summary: Kling Text-to-Image
                value:
                  model: kling-image
                  model_name: kling-v3
                  prompt: 海边日落，电影感人像
                  aspect_ratio: '16:9'
                  'n': 1
              kling_img2img:
                summary: Kling Image-to-Image
                value:
                  model: kling-image
                  model_name: kling-v2-1
                  prompt: 改成赛博朋克夜景风格
                  image: https://example.com/input.png
                  'n': 1
              kling_omni_image:
                summary: Kling Omni Image
                value:
                  model: kling-omni-image
                  model_name: kling-v3-omni
                  prompt: 生成一张海边跳舞的图片
                  element_list:
                    - element_id: 835266081714884700
              kling_virtual_try_on:
                summary: Kling Virtual Try-On
                value:
                  model: kolors-virtual-try-on-v1
                  human_image: https://example.com/human.jpg
                  cloth_image: https://example.com/cloth.jpg
      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ImageResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
              revised_prompt:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Use Bearer Token authentication.
        Format: `Authorization: Bearer sk-xxxxxx`

````