auto_sizeboolean
Estimate the object's real-world size and scale the model to it.
Default: false
meshy/resizeMeshy Resize scales an existing 3D model to a real-world height or longest side, or estimates the size automatically.
Coba model ini
Pilih contoh untuk memuat input dan hasilnya ke playground.
{
"model_url": "https://static.sandbase.ai/examples/406c41fa-77b3-4fc4-86e9-6283e7acf112/input/b463e310-7d5f-447f-8be2-d053fcdeef1c.glb",
"resize_height": 1.8
}{
"model_url": "https://static.sandbase.ai/examples/eb08a657-0af2-4636-99f6-f7d6acf87ef4/input/c2f43e93-7e34-4b95-961c-99f48c21e3d4.glb",
"origin_at": "bottom",
"resize_longest_side": 0.45
}Meshy Resize scales an existing 3D model to a real-world height or longest side, or estimates the size automatically.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | β | URL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI. |
resize_height | number 0β | β | Target height in meters. Send exactly one of resize_height, resize_longest_side or auto_size. |
resize_longest_side | number 0β | β | Target length of the longest side in meters. |
auto_size | boolean | false | Estimate the object's real-world size and scale the model to it. |
origin_at | bottom / center | "bottom" | Where to place the model origin. |
url: Resized GLB.$0.04 per model.
Mulai membangun
Kirim model ini melalui 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/resize",
"auto_size": false,
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb",
"origin_at": "bottom"
}
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"Buat SandBase API key dan atur di environment server Anda. Semua permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key di server. Jangan tampilkan di kode browser atau commit ke repository.
POST ke /v1/run dengan ID model ini dan inputnya. Contoh permintaan di atas mencakup pengiriman dan polling.
Gunakan run ID yang dikembalikan untuk polling sampai status completed, failed, atau timeout. Baca output hanya setelah completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Kirim URL file yang dapat diakses publik di field image, video, atau audio model. Format dan batas yang didukung ditampilkan di samping setiap input Playground.
Gunakan kontrol upload atau replace pada field gambar yang didukung di Playground. Field URL video menerima video driving yang di-host; ini tidak berarti dukungan upload video.
auto_sizebooleanEstimate the object's real-world size and scale the model to it.
Default: false
model_urlstringwajibURL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI.
origin_atstringWhere to place the model origin.
Default: "bottom"
Nilai yang mungkin: "bottom", "center"
resize_heightnumberTarget height in meters. Send exactly one of resize_height, resize_longest_side or auto_size.
Minimum: 0
resize_longest_sidenumberTarget length of the longest side in meters.
Minimum: 0
{
"model": "meshy/resize",
"auto_size": false,
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb",
"origin_at": "bottom"
}Run yang selesai menampilkan hasilnya di output. Berikut adalah contoh tersimpan model ini, bukan generasi baru.
[
{
"url": "https://static.sandbase.ai/examples/406c41fa-77b3-4fc4-86e9-6283e7acf112/output/3c587a2f-14b2-450c-b27b-637e8bce671c.glb"
}
]