跳至內容

Telestyle V2 Style Transfer

整合

模型 id telestyle-v2
# 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/telestyle-v2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "style_image_url": "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.071 71 API 點數 在此頁面執行

取得 API 金鑰
Open model 圖像編輯 #stylized#transform#editing

風格轉換:使用第二張風格參考圖片的外觀重新呈現內容圖片

Open model · 圖像

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

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

建立請求

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

•必填
拖放檔案,或

提供主體與結構以進行風格轉換的圖像 URL。圖像套用風格時,兩者都會保留。

•必填
拖放檔案,或

用於重新設計內容圖像風格的圖像 URL。參考圖像提供材質與藝術風格,以及色彩與光線。

image_size

輸出圖像尺寸;僅在提供時覆寫內容圖像的尺寸。

num_images 預設 1

請求生成的圖像數量。

進階 negative_prompt · acceleration · output_format · lora_scale · lightning_lora_scale · num_inference_steps · guidance_scale · seed · use_lightning_lora · use_content_description · use_style_description · enable_safety_checker
預設

生成期間使用的負面提示詞。

acceleration 預設 none

圖像生成加速模式:'regular' 使用下游加速路徑,固定為 10 個步驟,獨立於 num_inference_steps。預設模式 'none' 則遵循 num_inference_steps;因此預設的 Lightning 設定會使用其配置的 4 個步驟。

output_format 預設 png

生成圖像的檔案格式。

預設 1

TeleStyleV2 adapter 強度,可低於參考實作的 1.0,以產生更細緻的風格效果。

預設 1

Lightning LoRA 強度,可低於參考實作的 1.0,以產生更細緻的風格效果。

預設 4

要執行的推論步數。

預設 1

使用 CFG(Classifier Free Guidance,無分類器引導)設定生成對提示詞的遵循程度。

用於重現圖像結果的種子。若要每次重現相同圖像,請保持種子、所有輸入和模型版本不變。

POST /run/telestyle-v2?wait=20 報價 → $0.071
# 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/telestyle-v2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "style_image_url": "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 金鑰

關於 Telestyle V2 Style Transfer

接收保留主體與版面的 `content_image_url`,以及將套用其風格、材質、光線與色彩的 `style_image_url`。`lora_scale`(0 到 4)控制風格強度,選用的 Lightning LoRA 預設啟用,預設步數為 4。可使用 `image_size` 預設值設定輸出尺寸,每次呼叫可產生 1 到 4 張 jpeg 或 png 圖片。

參數

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

名稱類型 預設值允許值 說明
content_image_url必填
類型url · image
提供主體與結構以進行風格轉換的圖像 URL。圖像套用風格時,兩者都會保留。
style_image_url必填
類型url · image
用於重新設計內容圖像風格的圖像 URL。參考圖像提供材質與藝術風格,以及色彩與光線。
lora_scale選填
類型number
預設值1
0 – 4
TeleStyleV2 adapter 強度,可低於參考實作的 1.0,以產生更細緻的風格效果。
use_lightning_lora選填
類型boolean
預設值true
為 true 時,控制是否在預設 LoRA 旁使用 Lightning LoRA。
lightning_lora_scale選填
類型number
預設值1
0 – 4
Lightning LoRA 強度,可低於參考實作的 1.0,以產生更細緻的風格效果。
use_content_description選填
類型boolean
預設值true
為 true 時,以內容圖像的描述擴充提示詞;描述由 VLM 撰寫。
use_style_description選填
類型boolean
預設值true
為 true 時,以風格圖像的描述擴充提示詞;描述由 VLM 撰寫。
image_size選填
類型object
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
輸出圖像尺寸;僅在提供時覆寫內容圖像的尺寸。
negative_prompt選填
類型string
預設值
生成期間使用的負面提示詞。
num_inference_steps選填
類型integer
預設值4
2 – 50
要執行的推論步數。
guidance_scale選填
類型number
預設值1
0 – 20
使用 CFG(Classifier Free Guidance,無分類器引導)設定生成對提示詞的遵循程度。
acceleration選填
類型enum
預設值none
noneregular
圖像生成加速模式:'regular' 使用下游加速路徑,固定為 10 個步驟,獨立於 num_inference_steps。預設模式 'none' 則遵循 num_inference_steps;因此預設的 Lightning 設定會使用其配置的 4 個步驟。
num_images選填 num_outputs
類型integer
預設值1
1 – 4
請求生成的圖像數量。
seed選填
類型integer | null
用於重現圖像結果的種子。若要每次重現相同圖像,請保持種子、所有輸入和模型版本不變。
enable_safety_checker選填
類型boolean
預設值true
安全檢查器啟用狀態;true 會啟用檢查。
output_format選填
類型enum
預設值png
jpegpng
生成圖像的檔案格式。
必填 標準名稱,也可使用

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

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "telestyle-v2",
  "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": 71,
    "usd": "0.071",
    "charged": 71,
    "refunded": 0
  },
  "input": {
    "content_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "style_image_url": "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
      }
    ],
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "",
    "seed": 42
  },
  "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}套用樣式後的圖像。
has_nsfw_concepts
array of boolean指出生成圖像是否出現 NSFW 概念。
prompt
string根據內容圖像和樣式圖像建立的提示詞。
seed
integer生成期間套用的種子值。

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