model_urlstringจำเป็น
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.
ลองใช้โมเดล
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน 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.
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน 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"สร้าง SandBase API key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
model_urlstringจำเป็น3D model to texture: .glb, .gltf, .obj, .fbx or .stl URL.
enable_pbrbooleanAlso generate metallic, roughness and normal maps.
ค่าเริ่มต้น: 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.
ค่าเริ่มต้น: true
{
"model": "meshy/6.0-lite/retexture",
"enable_pbr": false,
"text_style_prompt": "red and black chest",
"enable_original_uv": true
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"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"
}
]