跳转到内容

Trellis 2 · Retexture

集成

模型 id trellis-2/retexture
# 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/trellis-2/retexture?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mesh_url": "https://example.com/your-file.glb"
  }'

# 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.24 240 API 积分 在此页面运行

获取 API 密钥
Microsoft 图像转 3D #image-to-3d

重新为现有无纹理 3D 网格贴图,使其匹配参考图像,输出 GLB

Microsoft · 3D

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填 image_url
拖放文件,或

用于纹理化的参考图像 URL。

resolution 默认 1024

纹理细节和处理速度取决于此内部生成分辨率:提高分辨率会产生更精细的细节,但耗时更长。

•必填

无纹理 3D 网格的重新纹理化源 URL,支持 GLB、OBJ、PLY 或 STL 格式。

高级 texture_size · tex_slat_guidance_strength · tex_slat_guidance_rescale · tex_slat_guidance_interval_start · tex_slat_guidance_interval_end · tex_slat_sampling_steps · tex_slat_rescale_t · seed
texture_size 默认 2048

用于烘焙的网格纹理分辨率。提高分辨率可获得更精细的表面细节,但会生成更大的文件。

默认 1

纹理颜色保真度控制:较高设置会更贴近输入图像的颜色并提高鲜艳度,但可能导致过度饱和。

默认 0

提高此设置以处理噪声纹理或色带:它会减少纹理阶段强引导造成的伪影。

默认 0.6

纹理生成的无分类器指导启用点。该值表示降噪进度的比例,并设置 interval_start;指导仅在由 interval_start 和 interval_end 界定的窗口内运行。

默认 0.9

纹理阶段无分类器指导的停止边界,以不小于 tex_slat_guidance_interval_start 的降噪比例表示。

默认 12

用于生成纹理的去噪步数。增加步数会延长处理时间,但可能产生更干净的纹理。

默认 3

通过纹理生成噪声调度设置纹理细节锐度;提高该值会产生更锐利的细节。

用于可复现随机生成的种子。

POST /run/trellis-2/retexture?wait=20 报价 → $0.24
# 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/trellis-2/retexture?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mesh_url": "https://example.com/your-file.glb"
  }'

# 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 密钥

关于 Trellis 2 · Retexture

根据参考 `image_url` 为 `mesh_url` 中的网格应用新纹理(GLB、OBJ、PLY 或 STL)。`resolution` 为 512 或 1024,`texture_size` 为 1024、2048 或 4096。提供纹理阶段的引导和采样控制。不会重新生成几何体。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
image_url必填 image
类型url · image
用于纹理化的参考图像 URL。
mesh_url必填
类型string
无纹理 3D 网格的重新纹理化源 URL,支持 GLB、OBJ、PLY 或 STL 格式。
seed可选
类型integer | null
用于可复现随机生成的种子。
resolution可选
类型enum
默认值1024
5121024
纹理细节和处理速度取决于此内部生成分辨率:提高分辨率会产生更精细的细节,但耗时更长。
tex_slat_guidance_strength可选
类型number
默认值1
0 – 10
纹理颜色保真度控制:较高设置会更贴近输入图像的颜色并提高鲜艳度,但可能导致过度饱和。
tex_slat_guidance_rescale可选
类型number
默认值0
0 – 1
提高此设置以处理噪声纹理或色带:它会减少纹理阶段强引导造成的伪影。
tex_slat_guidance_interval_start可选
类型number
默认值0.6
0 – 1
纹理生成的无分类器指导启用点。该值表示降噪进度的比例,并设置 interval_start;指导仅在由 interval_start 和 interval_end 界定的窗口内运行。
tex_slat_guidance_interval_end可选
类型number
默认值0.9
0 – 1
纹理阶段无分类器指导的停止边界,以不小于 tex_slat_guidance_interval_start 的降噪比例表示。
tex_slat_sampling_steps可选
类型integer
默认值12
1 – 50
用于生成纹理的去噪步数。增加步数会延长处理时间,但可能产生更干净的纹理。
tex_slat_rescale_t可选
类型number
默认值3
1 – 6
通过纹理生成噪声调度设置纹理细节锐度;提高该值会产生更锐利的细节。
texture_size可选
类型enum
默认值2048
102420484096
用于烘焙的网格纹理分辨率。提高分辨率可获得更精细的表面细节,但会生成更大的文件。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "trellis-2/retexture",
  "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": 240,
    "usd": "0.24",
    "charged": 240,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mesh_url": "https://example.com/your-file.glb"
  },
  "output": {
    "model_glb": {
      "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
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "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 是模型自身的结果对象。
输出字段
model_glb
object {url, content_type, file_name, file_size}以 GLB 格式生成的 3D 模型。

更多模型:图像转 3D

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/trellis-2/retexture.md. 所有模型和指南: https://doitong.com/developers/llms.txt