imagestringจำเป็น
Image URL or base64 data URI of the object. Supports .jpg, .jpeg and .png; AVIF and HEIF are converted automatically.
meshy/t2/image-to-3dMeshy T2 turns a single image into a clean Smart Topology triangle mesh (up to 15,000 triangles), with optional textures, rigging and animation.
ลองใช้โมเดล
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"image": "https://static.sandbase.ai/examples/8748728e-5d42-48ae-93fb-7d05cfa7426c/input/1ab698c4-9bb2-42a6-be0f-b8b6e29a3941.png"
}Meshy T2 turns a single image into a clean Smart Topology triangle mesh (up to 15,000 triangles), with optional textures, rigging and animation.
| Field | Type | Default | Notes |
|---|---|---|---|
image | image URL, required | — | Image URL or base64 data URI of the object. Supports .jpg, .jpeg and .png; AVIF and HEIF are converted automatically. |
should_texture | boolean | true | Generate textures. Untextured meshes cost less. |
target_polycount | integer 100–15000 | 4000 | Target polygon count (100–15,000). |
pose_mode | a-pose / t-pose / `` | "" | Generate the character in an A-pose or T-pose; empty for no specific pose. |
enable_pbr | boolean | false | Generate PBR maps (metallic, roughness, normal) in addition to base color. |
texture_prompt | string | — | Text prompt to guide texturing. Maximum 800 characters. |
texture_image | image URL | — | Image URL to guide texturing. |
enable_rigging | boolean | false | Rig the model as a humanoid character. The rigged GLB is returned as rigged_glb. |
enable_animation | boolean | false | Apply an animation preset to the rigged character (billed together with rigging). The animated GLB is returned as animation_glb. |
animation_action_id | integer 0–696 | 92 | Animation preset ID from Meshy's animation library (0 is Idle). Only used when animation is enabled. |
texture_resolution | 2k / 4k / 8k | "2k" | Base color texture resolution. 8k costs $0.20 more. |
texture_model | meshy-n1 / meshy-6-lite | — | Texture model that paints the mesh; leave empty for the geometry model's default. meshy-n1 textures from the image only (no text prompt, no PBR, 2k only). |
auto_size | boolean | false | Estimate the object's real-world height and scale the model to it. The origin goes to the bottom unless origin_at is set. |
origin_at | bottom / center | — | Where to place the model origin. |
url: Main 3D file (GLB unless another export format is selected).thumbnail: Preview image rendered by the provider.rigged_glb: Additional file returned by the provider.animation_glb: Additional file returned by the provider.$0.60 per request with default settings. Price by option (other settings at default):
| Option | Price |
|---|---|
| enable_animation on | $0.92 |
| enable_animation off | $0.60 |
| enable_rigging on | $0.80 |
| enable_rigging off | $0.60 |
| should_texture on | $0.60 |
| should_texture off | $0.20 |
| 8k textures add $0.20 (textured requests only). | |
| Failed runs are not charged. |
Other Meshy 3D endpoints: meshy/6.0-lite/retexture, meshy/6.0/retexture, meshy/7.0/image-to-3d, meshy/7.0/multi-image-to-3d.
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน 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/t2/image-to-3d",
"image": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png",
"auto_size": false,
"enable_pbr": false,
"enable_rigging": false,
"should_texture": true,
"enable_animation": false,
"target_polycount": 4000,
"texture_resolution": "2k",
"animation_action_id": 92
}
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 ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
imagestringจำเป็นImage URL or base64 data URI of the object. Supports .jpg, .jpeg and .png; AVIF and HEIF are converted automatically.
auto_sizebooleanEstimate the object's real-world height and scale the model to it. The origin goes to the bottom unless origin_at is set.
ค่าเริ่มต้น: false
origin_atstringWhere to place the model origin.
ค่าที่เป็นไปได้: "bottom", "center"
pose_modestringGenerate the character in an A-pose or T-pose; empty for no specific pose.
ค่าเริ่มต้น: ""
ค่าที่เป็นไปได้: "a-pose", "t-pose", ""
enable_pbrbooleanGenerate PBR maps (metallic, roughness, normal) in addition to base color.
ค่าเริ่มต้น: false
texture_imagestringImage URL to guide texturing.
texture_modelstringTexture model that paints the mesh; leave empty for the geometry model's default. meshy-n1 textures from the image only (no text prompt, no PBR, 2k only).
ค่าที่เป็นไปได้: "meshy-n1", "meshy-6-lite"
enable_riggingbooleanRig the model as a humanoid character. The rigged GLB is returned as rigged_glb.
ค่าเริ่มต้น: false
should_texturebooleanGenerate textures. Untextured meshes cost less.
ค่าเริ่มต้น: true
texture_promptstringText prompt to guide texturing. Maximum 800 characters.
enable_animationbooleanApply an animation preset to the rigged character (billed together with rigging). The animated GLB is returned as animation_glb.
ค่าเริ่มต้น: false
target_polycountintegerTarget polygon count (100–15,000).
ค่าเริ่มต้น: 4000
ขั้นต่ำ: 100
สูงสุด: 15000
texture_resolutionstringBase color texture resolution. 8k costs $0.20 more.
ค่าเริ่มต้น: "2k"
ค่าที่เป็นไปได้: "2k", "4k", "8k"
animation_action_idintegerAnimation preset ID from Meshy's animation library (0 is Idle). Only used when animation is enabled.
ค่าเริ่มต้น: 92
ขั้นต่ำ: 0
สูงสุด: 696
{
"model": "meshy/t2/image-to-3d",
"image": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png",
"auto_size": false,
"enable_pbr": false,
"enable_rigging": false,
"should_texture": true,
"enable_animation": false,
"target_polycount": 4000,
"texture_resolution": "2k",
"animation_action_id": 92
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/8748728e-5d42-48ae-93fb-7d05cfa7426c/output/c0a0e7ac-0c9e-442c-83b6-84cd3c7f2e17.png",
"thumbnail": "https://static.sandbase.ai/examples/8748728e-5d42-48ae-93fb-7d05cfa7426c/output/c0a0e7ac-0c9e-442c-83b6-84cd3c7f2e17.png",
"url": "https://static.sandbase.ai/examples/8748728e-5d42-48ae-93fb-7d05cfa7426c/output/979cfb8b-c05f-4ad7-aeb2-4c3fe4d4ae51.glb"
}
]