imagestring必填
Reference image URL used to texture the model. PNG, JPEG and WebP, up to 20MB.
hitem3d/hi3d/textureHi3D Texture by Hitem3D adds textures to an untextured GLB model using a reference image. It uses the v1.5 texture models.
试用该模型
PNG、JPEG、WebP 或 GIF · 最大 20 MiB
选择一个示例,将其输入和结果加载到 playground 中。
{
"image": "https://static.sandbase.ai/examples/c4501277-43f5-4c6a-ae4b-4f56d42ca2f3/input/24dabdc3-0dee-40c8-b5b3-a4433574aa59.png",
"model_url": "https://static.sandbase.ai/examples/c4501277-43f5-4c6a-ae4b-4f56d42ca2f3/input/b28d2ada-8f0f-43c0-ae09-ce44d9c4a506.glb"
}Hi3D Texture by Hitem3D adds textures to an untextured GLB model using a reference image. It uses the v1.5 texture models.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the GLB geometry model to texture (e.g. Hi3D image-to-3d output with texture off). |
image | image URL, required | — | Reference image URL used to texture the model. PNG, JPEG and WebP, up to 20MB. |
version | hitem3dv1.5 / scene-portraitv1.5 | hitem3dv1.5 | Texture model version. |
resolution | 512 / 1024 / 1536 / 1536pro | — | Texture resolution. hitem3dv1.5 accepts 512, 1024, 1536, 1536pro; scene-portraitv1.5 accepts 1536. Uses the model's recommended value when unset. |
export_format | glb / obj / stl / fbx / usdz | glb | File format of the generated model. |
url: Main 3D file (GLB unless another export format is selected).thumbnail: Preview image rendered by the provider.$0.20 per request. Failed runs are not charged.
Other Hitem3D 3D endpoints: hitem3d/hi3d/image-to-3d, hitem3d/hi3d/multi-view-to-3d, hitem3d/hi3d/multicolor, hitem3d/hi3d/split.
开始构建
通过 SandBase Unified Run API 提交此模型。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "hitem3d/hi3d/texture",
"image": "https://storage.googleapis.com/falserverless/example_inputs/dog.png",
"version": "hitem3dv1.5",
"model_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb",
"export_format": "glb"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"创建一个 SandBase API 密钥,并将其设置到服务器环境中。所有请求都使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它,也不要提交到仓库。
使用此模型 ID 及其输入向 /v1/run 发送 POST 请求。上方的请求示例包含提交和轮询。
使用返回的运行 ID 轮询,直到状态为 completed、failed 或 timeout。仅在 completed 后读取输出。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"在模型的 image、video 或 audio 字段中传入一个可公开访问的文件 URL。支持的格式和限制显示在每个 Playground 输入项旁边。
在 Playground 中支持的图片字段上使用上传或替换控件。视频 URL 字段接受托管的 driving video;这并不表示支持视频上传。
imagestring必填Reference image URL used to texture the model. PNG, JPEG and WebP, up to 20MB.
versionstringTexture model version.
默认值:"hitem3dv1.5"
可选值:"hitem3dv1.5", "scene-portraitv1.5"
model_urlstring必填URL of the GLB geometry model to texture (e.g. Hi3D image-to-3d output with texture off).
resolutionstringTexture resolution. hitem3dv1.5 accepts 512, 1024, 1536, 1536pro; scene-portraitv1.5 accepts 1536. Uses the model's recommended value when unset.
可选值:"512", "1024", "1536", "1536pro"
export_formatstringFile format of the generated model.
默认值:"glb"
可选值:"glb", "obj", "stl", "fbx", "usdz"
{
"model": "hitem3d/hi3d/texture",
"image": "https://storage.googleapis.com/falserverless/example_inputs/dog.png",
"version": "hitem3dv1.5",
"model_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb",
"export_format": "glb"
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"poster": "https://static.sandbase.ai/examples/c4501277-43f5-4c6a-ae4b-4f56d42ca2f3/output/9a2b8d5e-4df7-4aa0-ab0c-c571cd319572.webp",
"thumbnail": "https://static.sandbase.ai/examples/c4501277-43f5-4c6a-ae4b-4f56d42ca2f3/output/9a2b8d5e-4df7-4aa0-ab0c-c571cd319572.webp",
"url": "https://static.sandbase.ai/examples/c4501277-43f5-4c6a-ae4b-4f56d42ca2f3/output/657aa660-3d28-4a47-8766-cef206b48303.glb"
}
]