auto_sizeboolean
Estimate the object's real-world size and scale the model to it.
Domyślnie: false
meshy/resizeMeshy Resize scales an existing 3D model to a real-world height or longest side, or estimates the size automatically.
Wypróbuj model
Co chcesz zrobić dalej?
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"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.
Zacznij tworzyć
Prześlij ten model przez 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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
auto_sizebooleanEstimate the object's real-world size and scale the model to it.
Domyślnie: false
model_urlstringwymaganeURL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI.
origin_atstringWhere to place the model origin.
Domyślnie: "bottom"
Możliwe wartości: "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"
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
[
{
"url": "https://static.sandbase.ai/examples/406c41fa-77b3-4fc4-86e9-6283e7acf112/output/3c587a2f-14b2-450c-b27b-637e8bce671c.glb"
}
]