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

# 提交图像任务

## 接口地址

```
POST https://api.mountsea.ai/hub/v1/image
Authorization: Bearer <your-api-key>
Content-Type: application/json
```

**请求结构**

```json theme={null}
{
  "model": "<model-id>",   // 必填 — 从下方模型参考中选取
  "input": { ... }         // 模型专属参数 — 展开对应模型查看详情
}
```

**响应**

```json theme={null}
{ "taskId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }
```

轮询 `GET /hub/v1/tasks/:taskId`，直到 `ready = true`。

***

## 模型参考（Model Reference）

<Tip>
  点击下方**能力分类标签**，再点击**模型名称**即可展开参数表与可直接复制的请求示例。
</Tip>

在下方按能力分类的标签页中挑选模型，点击展开即可查看参数表和可直接复制的请求示例。

<Tabs>
  <Tab title="文生图 · 4">
    <AccordionGroup>
      <Accordion title="nano-banana — Nano Banana (Google)" icon="cube">
        Gemini 2.5 Flash Image: fast and affordable text-to-image generation.

        | Parameter           | Type      | Req | Default | Values / Range                                                 | Description                                                                                                                                                                                      |
        | ------------------- | --------- | --- | ------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
        | `seed`              | `integer` |     | –       | –                                                              | The seed for the random number generator.                                                                                                                                                        |
        | `prompt`            | `string`  | ✓   | –       | –                                                              | The text prompt to generate an image from.                                                                                                                                                       |
        | `sync_mode`         | `boolean` |     | –       | –                                                              | If True, the media will be returned as a data URI and the output data won't be available in the request history.                                                                                 |
        | `num_images`        | `integer` |     | `1`     | –                                                              | The number of images to generate.                                                                                                                                                                |
        | `aspect_ratio`      | `string`  |     | `1:1`   | `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` | The aspect ratio of the generated image.                                                                                                                                                         |
        | `output_format`     | `string`  |     | `png`   | `jpeg` `png` `webp`                                            | The format of the generated image.                                                                                                                                                               |
        | `safety_tolerance`  | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                        | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter.                                                  |
        | `limit_generations` | `boolean` |     | –       | –                                                              | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to True to disregard any instructions in the prompt regarding the number of images to generate. |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana",
            "input": {
              "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
              "num_images": 1,
              "aspect_ratio": "1:1",
              "output_format": "png",
              "safety_tolerance": "4"
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="nano-banana-2 — Nano Banana 2 (Google)" icon="cube">
        Nano Banana 2 (Gemini 3.1 Flash Image) ??fast text-to-image with resolution tiers.

        | Parameter           | Type      | Req | Default | Values / Range                                                                                | Description                                                                                                                                                                                                                                                                                    |
        | ------------------- | --------- | --- | ------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `seed`              | `integer` |     | –       | –                                                                                             | The seed for the random number generator.                                                                                                                                                                                                                                                      |
        | `prompt`            | `string`  | ✓   | –       | –                                                                                             | The text prompt to generate an image from.                                                                                                                                                                                                                                                     |
        | `sync_mode`         | `boolean` |     | –       | –                                                                                             | If True, the media will be returned as a data URI and the output data won't be available in the request history.                                                                                                                                                                               |
        | `num_images`        | `integer` |     | `1`     | –                                                                                             | The number of images to generate.                                                                                                                                                                                                                                                              |
        | `resolution`        | `string`  |     | `1K`    | `0.5K` `1K` `2K` `4K`                                                                         | The resolution of the image to generate.                                                                                                                                                                                                                                                       |
        | `aspect_ratio`      | `string`  |     | `auto`  | `auto` `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` `4:1` `1:4` `8:1` `1:8` | The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use 'auto' to let the model decide based on the prompt.                                                                                                                                                  |
        | `output_format`     | `string`  |     | `png`   | `jpeg` `png` `webp`                                                                           | The format of the generated image.                                                                                                                                                                                                                                                             |
        | `system_prompt`     | `string`  |     | \`\`    | –                                                                                             | Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers).                                                   |
        | `thinking_level`    | `string`  |     | –       | `minimal` `high`                                                                              | When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable.                                                                                                                                                          |
        | `safety_tolerance`  | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                                                       | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter.                                                                                                                                                |
        | `enable_web_search` | `boolean` |     | –       | –                                                                                             | Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image.                                                                                                                                                   |
        | `limit_generations` | `boolean` |     | `true`  | –                                                                                             | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to True to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana-2",
            "input": {
              "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
              "num_images": 1,
              "resolution": "1K",
              "aspect_ratio": "auto",
              "output_format": "png",
              "safety_tolerance": "4",
              "limit_generations": true
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="nano-banana-pro — Nano Banana Pro (Google)" icon="cube">
        Nano Banana Pro (Gemini 3 Pro Image) ??studio-quality text-to-image generation.

        | Parameter           | Type      | Req | Default | Values / Range                                                        | Description                                                                                                                                                                                                                                  |
        | ------------------- | --------- | --- | ------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `seed`              | `integer` |     | –       | –                                                                     | The seed for the random number generator.                                                                                                                                                                                                    |
        | `prompt`            | `string`  | ✓   | –       | –                                                                     | The text prompt to generate an image from.                                                                                                                                                                                                   |
        | `sync_mode`         | `boolean` |     | –       | –                                                                     | If True, the media will be returned as a data URI and the output data won't be available in the request history.                                                                                                                             |
        | `num_images`        | `integer` |     | `1`     | –                                                                     | The number of images to generate.                                                                                                                                                                                                            |
        | `resolution`        | `string`  |     | `1K`    | `1K` `2K` `4K`                                                        | The resolution of the image to generate.                                                                                                                                                                                                     |
        | `aspect_ratio`      | `string`  |     | `1:1`   | `auto` `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` | The aspect ratio of the generated image.                                                                                                                                                                                                     |
        | `output_format`     | `string`  |     | `png`   | `jpeg` `png` `webp`                                                   | The format of the generated image.                                                                                                                                                                                                           |
        | `system_prompt`     | `string`  |     | \`\`    | –                                                                     | Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). |
        | `safety_tolerance`  | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                               | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter.                                                                                              |
        | `enable_web_search` | `boolean` |     | –       | –                                                                     | Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. Note: disabled on this platform.                                                                |
        | `limit_generations` | `boolean` |     | –       | –                                                                     | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to True to disregard any instructions in the prompt regarding the number of images to generate.                                             |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana-pro",
            "input": {
              "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
              "num_images": 1,
              "resolution": "1K",
              "aspect_ratio": "1:1",
              "output_format": "png",
              "safety_tolerance": "4"
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="gpt-image-2 — GPT Image 2 (OpenAI)" icon="cube">
        GPT Image 2, OpenAI's latest image model, is capable of creating extremely detailed images with fine typography.

        | Parameter       | Type      | Req | Default         | Values / Range               | Description                                                                                                                                                                                                          |
        | --------------- | --------- | --- | --------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `prompt`        | `string`  | ✓   | –               | –                            | The prompt for image generation                                                                                                                                                                                      |
        | `quality`       | `string`  |     | `high`          | `auto` `low` `medium` `high` | Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt.                                                                                                                   |
        | `sync_mode`     | `boolean` |     | –               | –                            | If True, the media will be returned as a data URI and the output data won't be available in the request history.                                                                                                     |
        | `image_size`    | `oneOf`   |     | `landscape_4_3` | Preset / Custom              | The size of the generated image. Use a preset name or a custom {width, height} object. Concrete sizes: both dimensions must be multiples of 16, max edge 3840px, aspect ratio ??3:1, total pixels 655,360??,294,400. |
        | `num_images`    | `integer` |     | `1`             | –                            | Number of images to generate                                                                                                                                                                                         |
        | `output_format` | `string`  |     | `png`           | `jpeg` `png` `webp`          | Output format for the images                                                                                                                                                                                         |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "gpt-image-2",
            "input": {
              "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
              "quality": "high",
              "image_size": "landscape_4_3",
              "num_images": 1,
              "output_format": "png"
            }
          }
          ```
        </details>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="图生图 / 编辑 · 4">
    <AccordionGroup>
      <Accordion title="nano-banana-edit — Nano Banana Image Edit (Google)" icon="cube">
        Gemini 2.5 Flash Image: image editing with instruction-following.

        | Parameter          | Type      | Req | Default | Values / Range                                                 | Description                                                                                                                                     |
        | ------------------ | --------- | --- | ------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
        | `seed`             | `integer` |     | –       | –                                                              | The seed for the random number generator.                                                                                                       |
        | `prompt`           | `string`  | ✓   | –       | –                                                              | The text prompt to generate an image from.                                                                                                      |
        | `image_urls`       | `array`   | ✓   | –       | –                                                              | The URLs of the images to use as a reference for the generation.                                                                                |
        | `num_images`       | `integer` |     | `1`     | –                                                              | The number of images to generate.                                                                                                               |
        | `aspect_ratio`     | `string`  |     | `1:1`   | `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` | The aspect ratio of the generated image.                                                                                                        |
        | `output_format`    | `string`  |     | `png`   | `jpeg` `png` `webp`                                            | The format of the generated image.                                                                                                              |
        | `safety_tolerance` | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                        | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter. |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana-edit",
            "input": {
              "prompt": "Make the character drive along the California coastline",
              "image_urls": [
                "https://example.com/sample-image.jpg"
              ],
              "num_images": 1
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="nano-banana-2-edit — Nano Banana 2 Image Edit (Google)" icon="cube">
        Nano Banana 2 image editing with resolution tiers.

        | Parameter          | Type      | Req | Default | Values / Range                                                                                | Description                                                                                                                                     |
        | ------------------ | --------- | --- | ------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
        | `seed`             | `integer` |     | –       | –                                                                                             | The seed for the random number generator.                                                                                                       |
        | `prompt`           | `string`  | ✓   | –       | –                                                                                             | The text prompt to generate an image from.                                                                                                      |
        | `image_urls`       | `array`   | ✓   | –       | –                                                                                             | The URLs of the images to use as a reference for the generation.                                                                                |
        | `num_images`       | `integer` |     | `1`     | –                                                                                             | The number of images to generate.                                                                                                               |
        | `resolution`       | `string`  |     | `1K`    | `0.5K` `1K` `2K` `4K`                                                                         | The resolution of the image to generate.                                                                                                        |
        | `aspect_ratio`     | `string`  |     | `auto`  | `auto` `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` `4:1` `1:4` `8:1` `1:8` | The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use 'auto' to let the model decide based on the prompt.   |
        | `output_format`    | `string`  |     | `png`   | `jpeg` `png` `webp`                                                                           | The format of the generated image.                                                                                                              |
        | `safety_tolerance` | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                                                       | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter. |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana-2-edit",
            "input": {
              "prompt": "Add falling snow and a warm golden glow to the scene",
              "image_urls": [
                "https://example.com/sample-image.jpg"
              ],
              "resolution": "1K"
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="nano-banana-pro-edit — Nano Banana Pro Image Edit (Google)" icon="cube">
        Nano Banana Pro studio-quality image editing.

        | Parameter          | Type      | Req | Default | Values / Range                                                        | Description                                                                                                                                     |
        | ------------------ | --------- | --- | ------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
        | `seed`             | `integer` |     | –       | –                                                                     | The seed for the random number generator.                                                                                                       |
        | `prompt`           | `string`  | ✓   | –       | –                                                                     | The text prompt to generate an image from.                                                                                                      |
        | `image_urls`       | `array`   | ✓   | –       | –                                                                     | The URLs of the images to use as a reference for the generation.                                                                                |
        | `num_images`       | `integer` |     | `1`     | –                                                                     | The number of images to generate.                                                                                                               |
        | `resolution`       | `string`  |     | `1K`    | `1K` `2K` `4K`                                                        | The resolution of the image to generate.                                                                                                        |
        | `aspect_ratio`     | `string`  |     | `1:1`   | `auto` `21:9` `16:9` `3:2` `4:3` `5:4` `1:1` `4:5` `3:4` `2:3` `9:16` | The aspect ratio of the generated image.                                                                                                        |
        | `output_format`    | `string`  |     | `png`   | `jpeg` `png` `webp`                                                   | The format of the generated image.                                                                                                              |
        | `safety_tolerance` | `string`  |     | `4`     | `1` `2` `3` `4` `5` `6`                                               | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Note: API-only parameter. |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "nano-banana-pro-edit",
            "input": {
              "prompt": "Remove the background and replace with a dramatic sunset beach scene",
              "image_urls": [
                "https://example.com/sample-image.jpg"
              ],
              "resolution": "1K"
            }
          }
          ```
        </details>
      </Accordion>

      <Accordion title="gpt-image-2-edit — GPT Image 2 Edit (OpenAI)" icon="cube">
        GPT Image 2 instruction-following image editing with reasoning.

        | Parameter       | Type      | Req | Default | Values / Range               | Description                                                                                                                |
        | --------------- | --------- | --- | ------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
        | `prompt`        | `string`  | ✓   | –       | –                            | The prompt for image generation                                                                                            |
        | `quality`       | `string`  |     | `high`  | `auto` `low` `medium` `high` | Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt.                         |
        | `mask_url`      | `string`  |     | –       | –                            | The URL of the mask image to use for the generation. This indicates what part of the image to edit.                        |
        | `sync_mode`     | `boolean` |     | –       | –                            | If True, the media will be returned as a data URI and the output data won't be available in the request history.           |
        | `image_size`    | `oneOf`   |     | `auto`  | Preset / Custom              | The size of the generated image. Use 'auto' to infer from input images, a preset name, or a custom {width, height} object. |
        | `image_urls`    | `array`   | ✓   | –       | –                            | The URLs of the images to use as a reference for the generation.                                                           |
        | `num_images`    | `integer` |     | `1`     | –                            | Number of images to generate                                                                                               |
        | `output_format` | `string`  |     | `png`   | `jpeg` `png` `webp`          | Output format for the images                                                                                               |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "gpt-image-2-edit",
            "input": {
              "prompt": "Add a dramatic rainbow arching across the sky",
              "quality": "high",
              "image_size": "auto",
              "image_urls": [
                "https://example.com/sample-image.jpg"
              ]
            }
          }
          ```
        </details>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>
