跳至內容

Uso

整合

模型 id uso
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/uso?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

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

此請求: $0.10 100 API 點數 在此頁面執行

取得 API 金鑰
ByteDance 圖像編輯 #image-to-image

根據內容影像及一或兩張樣式影像生成樣式與主體導向的影像

ByteDance · 圖像

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

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

預設

生成提示詞文字;留空即可僅執行樣式轉換。

•必填
拖放檔案,或

圖像 URL 清單,順序為:[content_image, style_image, extra_style_image]。

image_size 預設 square_hd

生成圖像的尺寸。

num_images 預設 1

同時生成的圖像數量。

進階 negative_prompt · output_format · num_inference_steps · guidance_scale · seed · keep_size · enable_safety_checker
預設

要排除的不需要圖像內容,包括元素、樣式與瑕疵。

output_format 預設 png

輸出圖像格式:PNG 保留透明度,而 JPEG 會產生較小的檔案。

預設 28

去噪迭代次數;次數越高,生成時間越長,但可能取得更佳品質。

預設 4

提示詞遵循程度控制:提高此值可讓結果更貼近提示詞。

控制生成隨機性的 Seed。重複使用 Seed 會產生一致且可重現的結果。

POST /run/uso?wait=20 報價 → $0.10
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/uso?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

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

執行此請求

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

關於 Uso

依序接收 `input_image_urls` 中的內容影像、樣式影像及可選的額外樣式影像。純樣式轉換時提示可以留空,`negative_prompt` 可排除不需要的元素。`keep_size` 會保留內容影像的版面與尺寸。每次執行可產生 1 到 4 張影像,支援 1 到 50 個步驟,輸出為 PNG 或 JPEG。

參數

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

名稱類型 預設值允許值 說明
prompt選填
類型string
預設值
生成提示詞文字;留空即可僅執行樣式轉換。
input_image_urls必填
類型url[] · image
圖像 URL 清單,順序為:[content_image, style_image, extra_style_image]。
image_size選填
類型object
預設值square_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成圖像的尺寸。
negative_prompt選填
類型string
預設值
要排除的不需要圖像內容,包括元素、樣式與瑕疵。
num_inference_steps選填
類型integer
預設值28
1 – 50
去噪迭代次數;次數越高,生成時間越長,但可能取得更佳品質。
guidance_scale選填
類型number
預設值4
1 – 10
提示詞遵循程度控制:提高此值可讓結果更貼近提示詞。
keep_size選填
類型boolean
預設值false
處理內容圖像時保留其尺寸與排列,適合用於轉移樣式。
num_images選填 num_outputs
類型integer
預設值1
1 – 4
同時生成的圖像數量。
seed選填
類型integer | null
控制生成隨機性的 Seed。重複使用 Seed 會產生一致且可重現的結果。
enable_safety_checker選填
類型boolean
預設值true
啟用 NSFW 內容的偵測與篩選。
output_format選填
類型enum
預設值png
jpegpng
輸出圖像格式:PNG 保留透明度,而 JPEG 會產生較小的檔案。
必填 標準名稱,也可使用

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

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "uso",
  "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": 100,
    "usd": "0.10",
    "charged": 100,
    "refunded": 0
  },
  "input": {
    "input_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "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
      }
    ],
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string",
    "timings": {}
  },
  "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://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/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}包含樣式自訂、主體自訂或兩者的生成圖像。
seed
integer生成時使用的種子值。
has_nsfw_concepts
array of boolean生成圖像中每張圖像的 NSFW 偵測結果。
prompt
string生成期間使用的提示詞。
timings
object依處理階段細分的效能計時測量結果。

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