model_urlstringbắt buộc
3D model to texture: .glb, .gltf, .obj, .fbx or .stl URL.
meshy/6.0-lite/retextureMeshy 6 Lite Retexture is the lower-cost Meshy retexturing model: repaint an existing 3D model from a text or image style.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"model_url": "https://static.sandbase.ai/examples/0e3ef03d-79e9-4c67-8540-181fe8251040/input/93745c11-502e-46fa-bc71-ed5454ae3b85.glb",
"text_style_prompt": "weathered bronze robot with green patina and gold trim"
}Meshy 6 Lite Retexture is the lower-cost Meshy retexturing model: repaint an existing 3D model from a text or image style.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | 3D model URL, required | — | .glb, .gltf, .obj, .fbx or .stl. |
text_style_prompt | string | — | Texture style, up to 800 characters. Required when image_style_url is not set. |
image_style_url | image URL | — | JPG or PNG style reference; takes precedence over the text prompt. |
enable_pbr | boolean | false | Also generate metallic, roughness and normal maps. |
enable_original_uv | boolean | true | Keep the model's UV layout. |
$0.40 per retextured model; PBR maps are included.
| Request | Price |
|---|---|
| Retexture | $0.40 |
| Retexture + PBR | $0.40 |
| Failed runs are not charged. |
text_style_prompt or image_style_url.Higher-detail retexture models: meshy/7.0/retexture, meshy/6.0/retexture.
Bắt đầu xây dựng
Gửi model này qua 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": "meshy/6.0-lite/retexture",
"enable_pbr": false,
"text_style_prompt": "red and black chest",
"enable_original_uv": true
}
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"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
model_urlstringbắt buộc3D model to texture: .glb, .gltf, .obj, .fbx or .stl URL.
enable_pbrbooleanAlso generate metallic, roughness and normal maps.
Mặc định: false
image_style_urlstring2D image that guides the texture (JPG or PNG). Takes precedence over text_style_prompt.
text_style_promptstringDescribe the texture style, up to 800 characters. Required when image_style_url is not set.
enable_original_uvbooleanUse the model's existing UV layout instead of generating new UVs.
Mặc định: true
{
"model": "meshy/6.0-lite/retexture",
"enable_pbr": false,
"text_style_prompt": "red and black chest",
"enable_original_uv": true
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"poster": "https://static.sandbase.ai/examples/0e3ef03d-79e9-4c67-8540-181fe8251040/output/66898bc0-20f2-4761-9268-f26e33f04e9a.png",
"thumbnail": "https://static.sandbase.ai/examples/0e3ef03d-79e9-4c67-8540-181fe8251040/output/66898bc0-20f2-4761-9268-f26e33f04e9a.png",
"url": "https://static.sandbase.ai/examples/0e3ef03d-79e9-4c67-8540-181fe8251040/output/7b5d4e75-09e3-481b-b494-1f5c3c0f6cb5.glb"
}
]