{
  "openapi": "3.1.0",
  "info": {
    "title": "Default Module",
    "description": "",
    "version": "1.0.0"
  },
  "tags": [],
  "paths": {
    "/v1/image-generation": {
      "post": {
        "summary": "Image generation - Create task",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "title": "Prompt",
                    "description": "Recommended: no more than 300 Chinese characters or 600 English words"
                  },
                  "model": {
                    "type": "string",
                    "title": "Model",
                    "description": "Currently supported: seedream-4.5, nano-banana-pro-light-i2i, gemini-3-pro-image-text-to-image, gemini-2.5-flash-image-text-to-image"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Reference Images",
                    "description": "Up to 10 images, each <= 10MB"
                  },
                  "size": {
                    "type": "string",
                    "title": "Image Size",
                    "description": "1x1, 2x3, 3x2, 3x4, 4x3, 4x5, 5x4, 9x16, 16x9, 21x9. Supported by nano-banana-pro-light-i2i and gemini-3-pro-image-text-to-image"
                  },
                  "quality": {
                    "type": "string",
                    "description": "Specifies output image quality/resolution. seedream-4.5: 2K, 4K; nano-banana-pro-light-i2i and gemini-3-pro-image-text-to-image: 1K, 2K, 4K",
                    "title": "Output Quality and Resolution"
                  },
                  "max_images": {
                    "type": "integer",
                    "title": "Maximum Number of Images",
                    "description": "maxNum=4. The model will try to generate the requested count, but the exact number is not guaranteed"
                  }
                },
                "required": [
                  "prompt",
                  "model",
                  "images"
                ]
              },
              "example": {
                "prompt": "Change to green clothes",
                "model": "gemini-3-pro-image-preview",
                "max_images": 4,
                "quality": "2K",
                "images": [
                  "https://picfile-baidu.babybus.com/AiUserData/AiFile/20260123/b30541e678484fffb257fc2b7a584ef1.png"
                ],
                "size": "2:3"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "task_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "task_id"
                      ]
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "msg",
                    "request_id"
                  ]
                },
                "example": {
                  "code": 0,
                  "data": {
                    "task_id": "d69cbf03-bb75-4928-b518-52c958b6b092"
                  },
                  "msg": "",
                  "request_id": "68982830-2b37-441e-a387-3a9de2737b92"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/query/image-generation": {
      "get": {
        "summary": "Image generation - Get task",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "description": "",
            "required": false,
            "example": "53658251-dc0d-4883-896e-5b77c355a3b5",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "title": "Task ID"
                        },
                        "prompt": {
                          "type": "string",
                          "title": "Prompt"
                        },
                        "status": {
                          "type": "string",
                          "title": "Status",
                          "description": "processing: in progress.\ncompleted: completed.\nfailed: failed"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "title": "Input Images"
                        },
                        "output_images": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "title": "AI Generated Images"
                        },
                        "model_name": {
                          "type": "string",
                          "title": "Model Name"
                        },
                        "metadata": {
                          "type": "string"
                        },
                        "msg": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "task_id",
                        "prompt",
                        "status",
                        "images",
                        "output_images",
                        "model_name",
                        "metadata",
                        "msg"
                      ]
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "msg",
                    "request_id"
                  ]
                },
                "example": {
                  "code": 0,
                  "data": {
                    "task_id": "53658251-dc0d-4883-896e-5b77c355a3b5",
                    "prompt": "Image 1: Krillin is lifted by Frieza's telekinesis and explodes. Image 2: Goku roars in rage. Image 3: Goku transforms into a Super Saiyan. Image 4: Goku defeats Frieza.",
                    "status": "Success",
                    "images": [
                      "https://apioss.sydney-ai.com/img/1/t9il_91djAom_8ByY8LCYDXV_riLR5VptDiLjsXwR4BA10Ms10Qn14Br18kTksWg1xwAX0_rY7kAkx3sXsX410XxkxQrY0ky_vVI/72f5caa292477ef2b067cb03cb17d6.png",
                      "https://apioss.sydney-ai.com/img/1/t9il_91djAom_8ByY8LCYDXV_riLR5VptDiLjsXwR4BA10Ms10Qn14Br18kTksWg1xwAX0_rY7kAkx3sXsX410XxkxQrY0ky_vVI/72f5caa292477ef2b067cb03cb17d6.png",
                      "https://apioss.sydney-ai.com/img/1/t9il_91djAom_8ByY8LCYDXV_riLR5VptDiLjsXwR4BA10Ms10Qn14Br18kTksWg1xwAX0_rY7kAkx3sXsX410XxkxQrY0ky_vVI/72f5caa292477ef2b067cb03cb17d6.png",
                      "https://apioss.sydney-ai.com/img/1/t9il_91djAom_8ByY8LCYDXV_riLR5VptDiLjsXwR4BA10Ms10Qn14Br18kTksWg1xwAX0_rY7kAkx3sXsX410XxkxQrY0ky_vVI/72f5caa292477ef2b067cb03cb17d6.png",
                      "https://apioss.sydney-ai.com/img/1/t9il_91djAom_8ByY8LCYDXV_riLR5VptDiLjsXwR4BA10Ms10Qn14Br18kTksWg1xwAX0_rY7kAkx3sXsX410XxkxQrY0ky_vVI/72f5caa292477ef2b067cb03cb17d6.png"
                    ],
                    "output_images": [
                      "https://cos-output-image.ppinfra.com/prod/fusion-2b48e3c5-0a94-4a57-a600-92c83fe86865?q-sign-algorithm=sha1&q-ak=AKIDHOHvKVnrgHkyxhCTyOdeSjoiRxGPSJ0V&q-sign-time=1768448163%3B1768620963&q-key-time=1768448163%3B1768620963&q-header-list=host&q-url-param-list=&q-signature=2b8ef52945e73c46e836f3173bc181d435afffcc",
                      "https://cos-output-image.ppinfra.com/prod/fusion-5ff8070c-cd3a-4441-bc1f-f4904c11edda?q-sign-algorithm=sha1&q-ak=AKIDHOHvKVnrgHkyxhCTyOdeSjoiRxGPSJ0V&q-sign-time=1768448169%3B1768620969&q-key-time=1768448169%3B1768620969&q-header-list=host&q-url-param-list=&q-signature=b5a507ebea672d17d63e7b97f02cf1d3fe16ea8b",
                      "https://cos-output-image.ppinfra.com/prod/fusion-fe5b2bf1-83f8-49f4-aeb5-7043a3731aeb?q-sign-algorithm=sha1&q-ak=AKIDHOHvKVnrgHkyxhCTyOdeSjoiRxGPSJ0V&q-sign-time=1768448173%3B1768620973&q-key-time=1768448173%3B1768620973&q-header-list=host&q-url-param-list=&q-signature=91c3f8f06b80c0331825ac034338aa4f8ea9c19b",
                      "https://cos-output-image.ppinfra.com/prod/fusion-6b248d10-8d2f-4015-a153-65244fc541c3?q-sign-algorithm=sha1&q-ak=AKIDHOHvKVnrgHkyxhCTyOdeSjoiRxGPSJ0V&q-sign-time=1768448176%3B1768620976&q-key-time=1768448176%3B1768620976&q-header-list=host&q-url-param-list=&q-signature=8dad7cb3991871984f783799b921b8c3c5c4899d"
                    ],
                    "model_name": "seedream-4.5",
                    "metadata": "",
                    "msg": ""
                  },
                  "msg": "",
                  "request_id": "b858b2dd-8199-45e7-bdca-61790fa893ac"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/video-generation": {
      "post": {
        "summary": "Video generation - Create task",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "title": "Model Name",
                    "description": "MiniMax-Hailuo-02,sora-2,wan2.6-t2v,wan2.6-i2v"
                  },
                  "prompt": {
                    "type": "string",
                    "title": "Prompt",
                    "description": "Maximum length: 2000 characters"
                  },
                  "videos": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Reference Videos",
                    "description": "Supported by some video editing models"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Image List",
                    "description": "Supported by some video editing models"
                  },
                  "duration": {
                    "type": "integer",
                    "title": "Video Duration",
                    "description": "MiniMax-Hailuo-02: 6, 10. sora-2: 10, 15. wan2.6-t2v/wan2.6-i2v: 5, 10, 15"
                  },
                  "extends": {
                    "type": "object",
                    "properties": {
                      "refer_type": {
                        "type": "string",
                        "title": "Reference Type",
                        "description": "feature (feature reference), base (video to be edited)"
                      },
                      "keep_original_sound": {
                        "type": "string",
                        "title": "Keep Original Audio",
                        "description": "yes、no"
                      },
                      "shot_type": {
                        "type": "string",
                        "title": "Shot Type",
                        "description": "multi (multi-shot), single (single-shot)"
                      },
                      "audio": {
                        "type": "boolean",
                        "title": "Enable Audio"
                      }
                    },
                    "title": "Extended Fields",
                    "description": "Supported fields vary by model"
                  },
                  "size": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "string"
                  },
                  "first_frame_image": {
                    "type": "string",
                    "title": "First Frame Image",
                    "description": "Generate video based on the first frame image; required for wan2.6"
                  },
                  "last_frame_image": {
                    "type": "string",
                    "title": "Last Frame Image",
                    "description": "Generate video conditioned on first/last frame images"
                  },
                  "passthrough": {
                    "type": "boolean",
                    "title": "AI Direct Output",
                    "description": "Currently available only for test and Zhangwan accounts on Hailuo models"
                  }
                },
                "required": [
                  "model",
                  "prompt",
                  "videos",
                  "images",
                  "duration",
                  "extends"
                ]
              },
              "example": {
                "model": "wan2.6-r2v",
                "prompt": "A puppy and a kitten are playing together",
                "videos": [
                  "https://v4-fdl.kechuangai.com/ksc2/odyIH7L1KPxcpB1g2KNF0kDSGtSvETPPAXyZsUDCdS-U5Jycpx9cE9QUuwq7brAMM0ocMlGY14ZmNW0hgxY_7SnNisDRzy5BYiXgbZPRIC-DF4sSLCgNSkuyT7B9pZMkGHk95cdSMBBH7V2EVtPH00m09dx0XNUfUYNaLUbCt0ivtpab_RZtaGkFjJuXM82NuvgEEOsz6m27Gyo78B_Pcw.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAHHBimg8F88k8ThXpvU_oDtoMq1PImUAp8ddR6-MjKEcLV3IuSM4cn7z3IkeqaRFpFgV1zWA6YGpO1RJ_6gdSeclsU3ScLItAwgCzRled6ohJwda220ORpbNLZYHMlSHk7rO2z_N8qBjgJXFOzecsEFCjKL3JiZMEDBhx1HvdiCQMoheEJnsliKL8RMu159eCAuzeO2Jo-g8MnF1oW0fMD6U5jF8qEMu6FrmfIz88TbihoSHs_XK2axmPlM1WFnjCEe17mbIiBSaQW_zKaMp74lQPcFMDwHID6TQj9Ugz6p6bgFgrrHCCgFMAE&x-kcdn-pid=112757&pkey=AAXDOCLXzvNWCRihNv9YJ5L5yZJ_WJ0R3eCkUFwDD9o4gpvMhRqhzu2aYTCS0CiN4gtuDYJCiVpcAqFKzfgmimnwZ45CnRhv9dR3ttR8vlDbVpI1B3sZO5v8l1fciXc5YtM"
                ],
                "images": [
                  "https://picfile-baidu.babybus.com/AiUserData/AiFile/20260228/450874bb794b474a960c2bef17487e3c.jpg"
                ],
                "duration": 5,
                "extends": {
                  "refer_type": "base",
                  "keep_original_sound": "no"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "title": "Task ID",
                          "description": "Use this ID to get task details and download URLs"
                        }
                      },
                      "required": [
                        "task_id"
                      ]
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "msg",
                    "request_id"
                  ]
                },
                "example": {
                  "code": 0,
                  "data": {
                    "task_id": "5898d591-4ee2-4746-9dca-1b09ccbe8e4b"
                  },
                  "msg": "",
                  "request_id": "5601634e-b6e4-426c-9116-1a81f1c7066a"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/query/video-generation": {
      "get": {
        "summary": "Video generation - Get task",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "description": "",
            "required": false,
            "example": "5eaa2f78-f12e-43a1-86a6-8b15078d9bb5",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "title": "Task ID"
                        },
                        "prompt": {
                          "type": "string",
                          "title": "Prompt"
                        },
                        "file_url": {
                          "type": "string"
                        },
                        "first_frame_image": {
                          "type": "string"
                        },
                        "last_frame_image": {
                          "type": "string"
                        },
                        "model_name": {
                          "type": "string",
                          "title": "Model Name"
                        },
                        "duration": {
                          "type": "integer",
                          "title": "Video Duration"
                        },
                        "metadata": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "title": "Status",
                          "description": "processing: in progress.\ncompleted: completed.\nfailed: failed"
                        }
                      },
                      "required": [
                        "task_id",
                        "prompt",
                        "file_url",
                        "first_frame_image",
                        "last_frame_image",
                        "model_name",
                        "duration",
                        "metadata",
                        "status"
                      ]
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "msg",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "webhooks": {},
  "components": {
    "schemas": {},
    "responses": {},
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "basic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.linkai.one"
    }
  ],
  "security": [
    {
      "basic": []
    }
  ]
}