跳转到内容

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' 使用下游加速路径,并独立于 num_inference_steps 固定为 10 步。默认模式 'none' 则遵循 num_inference_steps;因此默认的 Lightning 设置使用其配置的 4 步。

output_format 默认 png

结果图像的文件格式。

默认 1

TeleStyleV2 适配器强度;降低到参考实现的 1.0 以下可获得更细微的风格效果。

默认 1

Lightning LoRA 强度;降低到参考实现的 1.0 以下可获得更细微的风格效果。

默认 4

要执行的推理步数。

默认 1

使用 CFG 设置生成对提示词的遵循程度;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 适配器强度;降低到参考实现的 1.0 以下可获得更细微的风格效果。
use_lightning_lora可选
类型boolean
默认值true
为 true 时,控制是否将 Lightning LoRA 与默认 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 设置生成对提示词的遵循程度;CFG 是 Classifier Free Guidance 的缩写。
acceleration可选
类型enum
默认值none
noneregular
图像生成加速模式:'regular' 使用下游加速路径,并独立于 num_inference_steps 固定为 10 步。默认模式 '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/developers/models/telestyle-v2.md. 所有模型和指南: https://doitong.com/developers/llms.txt