跳至內容

Nano Banana Pro Edit

整合

模型 id nano-banana-pro/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/nano-banana-pro/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Faithfully restore this image with high fidelity to modern photograph quality, in full color, upscale to 4K",
    "images": [
      "https://content.doitong.com/dev-api/2026/10/21/req_tlhvxyf27ektm9ozuzozz5fn/0-1h3kLymYuP3n6Z-kAnWa8_Nh4eqcOs.png"
    ],
    "resolution": "1K"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: $0.15 150 API 點數 在此頁面執行

取得 API 金鑰
Google 圖像編輯 4K 輸出最高 4K #editing#consistency

使用自然語言指令編輯或合併相片,保持臉部和產品完整,最高達 4K。

範例

輸入
輸出 · ~41 秒
Faithfully restore this image with high fidelity to modern photograph quality, in full color, upscale to 4K

提示詞Faithfully restore this image with high fidelity to modern photograph quality, in full color, upscale to 4K

1K$0.15 · 150 API 點數

X 上 @NanoBanana 的提示詞

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填 107 / 50000

編輯圖像的文字指示。

•必填 image_urls
拖放檔案,或

識別編輯來源圖像或圖像轉圖像生成來源的 URL。

aspect_ratio 預設 auto

結果圖像的長寬比。

resolution

輸出圖像的解析度。

num_images 預設 1

請求生成的圖像數量。

進階 system_prompt · output_format · safety_tolerance · seed · limit_generations
0 / 50000

可選的整個請求適用之角色與輸出風格指引;會以系統指示傳送給 Gemini,或以系統訊息傳送給 OpenAI 相容供應商。值為空白時,不會傳送此指示。

output_format 預設 png

生成圖像的檔案格式。

safety_tolerance 預設 4

設定內容審核容忍度,範圍從限制最少的 6 到最嚴格的 1;1 會封鎖大多數內容。

初始化亂數生成的種子值。

POST /run/nano-banana-pro/edit?wait=20 報價 → $0.15
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/nano-banana-pro/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Faithfully restore this image with high fidelity to modern photograph quality, in full color, upscale to 4K",
    "images": [
      "https://content.doitong.com/dev-api/2026/10/21/req_tlhvxyf27ektm9ozuzozz5fn/0-1h3kLymYuP3n6Z-kAnWa8_Nh4eqcOs.png"
    ],
    "resolution": "1K"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Nano Banana Pro Edit

Nano Banana Pro 的編輯模式:提供一張或多張圖像,並描述要進行的變更,例如替換 背景、將人物與產品合併到同一個場景、重新設計樣式,或修正招牌上的文字。它能在多次編輯中維持 身分特徵和細節的穩定。以 1K、2K 或 4K 輸出,支援任何常見長寬比,可選擇網路 接地,每次請求最多提供四個結果。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
prompt必填
類型string
≤ 50,000 個字元≥ 3 個字元
編輯圖像的文字指示。
num_images選填 num_outputs
類型integer
預設值1
1 – 4
請求生成的圖像數量。
seed選填
類型integer | null
初始化亂數生成的種子值。
aspect_ratio選填
類型enum
預設值auto
auto21:916:93:24:35:41:14:53:42:39:16
結果圖像的長寬比。
output_format選填
類型enum
預設值png
jpegpngwebp
生成圖像的檔案格式。
safety_tolerance選填
類型enum
預設值4
123456
設定內容審核容忍度,範圍從限制最少的 6 到最嚴格的 1;1 會封鎖大多數內容。
image_urls必填 images
類型url[] · image
識別編輯來源圖像或圖像轉圖像生成來源的 URL。
system_prompt選填
類型string
預設值
≤ 50,000 個字元
可選的整個請求適用之角色與輸出風格指引;會以系統指示傳送給 Gemini,或以系統訊息傳送給 OpenAI 相容供應商。值為空白時,不會傳送此指示。
resolution選填
類型enum
預設值1K
1K2K4K
輸出圖像的解析度。
limit_generations選填
類型boolean
預設值true
實驗性生成上限:啟用 `True` 會覆寫提示詞中的圖像數量指示,並將每輪提示限制為 1 次生成。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "nano-banana-pro/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 150,
    "usd": "0.15",
    "charged": 150,
    "refunded": 0
  },
  "input": {
    "prompt": "Put this white sneaker on a sunlit marble pedestal in a minimalist gallery, keep the shoe exactly as it is",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_sneaker_ad.jpg"
    ],
    "resolution": "1K"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "description": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
images
array of object {url, content_type, file_name, file_size, width, height}編輯產生的圖像。
description
string生成圖像附帶的描述。

更多模型:圖像編輯

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/nano-banana-pro/edit.md. 所有模型與指南: https://doitong.com/developers/llms.txt