auto_sizeboolean
Estimate the object's real-world size and scale the model to it.
По умолчанию: false
meshy/resizeMeshy Resize scales an existing 3D model to a real-world height or longest side, or estimates the size automatically.
Попробовать модель
Что вы хотите сделать дальше?
Выберите пример, чтобы загрузить его входные данные и результат в 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.
Начните разработку
Отправьте эту модель через 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"Создайте ключ SandBase API и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
auto_sizebooleanEstimate the object's real-world size and scale the model to it.
По умолчанию: false
model_urlstringобязательноURL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI.
origin_atstringWhere to place the model origin.
По умолчанию: "bottom"
Возможные значения: "bottom", "center"
resize_heightnumberTarget height in meters. Send exactly one of resize_height, resize_longest_side or auto_size.
Минимум: 0
resize_longest_sidenumberTarget length of the longest side in meters.
Минимум: 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"
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
[
{
"url": "https://static.sandbase.ai/examples/406c41fa-77b3-4fc4-86e9-6283e7acf112/output/3c587a2f-14b2-450c-b27b-637e8bce671c.glb"
}
]