model_urlstringจำเป็น
URL of the input textured model. GLB only, up to 200MB.
hitem3d/hi3d/multicolorHi3D Multicolor by Hitem3D converts a textured GLB model into a model with a limited set of flat colors, for multi-color 3D printing.
ลองใช้โมเดล
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"model_url": "https://static.sandbase.ai/examples/cf921390-1a95-45c4-bce7-b2526b3601a9/input/6bef0b95-aca3-4a10-b781-41e037547768.glb"
}Hi3D Multicolor by Hitem3D converts a textured GLB model into a model with a limited set of flat colors, for multi-color 3D printing.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the input textured model. GLB only, up to 200MB. |
number_of_colors | integer 0–8 | 4 | Number of colors (1-8), or 0 for the maximum. |
export_format | glb / obj / fbx | 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.40 per request. Failed runs are not charged.
Other Hitem3D 3D endpoints: hitem3d/hi3d/image-to-3d, hitem3d/hi3d/multi-view-to-3d, hitem3d/hi3d/split, hitem3d/hi3d/texture.
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน 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/multicolor",
"model_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb",
"export_format": "glb",
"number_of_colors": 4
}
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จำเป็นURL of the input textured model. GLB only, up to 200MB.
export_formatstringFile format of the generated model.
ค่าเริ่มต้น: "glb"
ค่าที่เป็นไปได้: "glb", "obj", "fbx"
number_of_colorsintegerNumber of colors (1-8), or 0 for the maximum.
ค่าเริ่มต้น: 4
ขั้นต่ำ: 0
สูงสุด: 8
{
"model": "hitem3d/hi3d/multicolor",
"model_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb",
"export_format": "glb",
"number_of_colors": 4
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/cf921390-1a95-45c4-bce7-b2526b3601a9/output/2c8b8d7e-e9d5-415e-9587-ef81fc3a0f21.webp",
"thumbnail": "https://static.sandbase.ai/examples/cf921390-1a95-45c4-bce7-b2526b3601a9/output/2c8b8d7e-e9d5-415e-9587-ef81fc3a0f21.webp",
"url": "https://static.sandbase.ai/examples/cf921390-1a95-45c4-bce7-b2526b3601a9/output/664113c3-764c-4842-af7b-81865ffef459.glb"
}
]