formatstring
Output file format.
Domyślnie: "fbx"
Możliwe wartości: "glb", "obj", "fbx", "stl", "usdz", "blend", "3mf"
meshy/convertMeshy Convert exports an existing 3D model to GLB, OBJ, FBX, STL, USDZ, BLEND or 3MF.
Wypróbuj model
Co chcesz zrobić dalej?
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"format": "glb",
"model_url": "https://static.sandbase.ai/examples/a371e5e4-7b44-4d5a-8811-528602691cf2/input/bcc4daf1-e924-42c6-99a9-2154a14aa1ab.fbx"
}Meshy Convert exports an existing 3D model to GLB, OBJ, FBX, STL, USDZ, BLEND or 3MF.
| 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. |
format | glb / obj / fbx / stl / usdz / blend / 3mf | "fbx" | Output file format. |
url: The converted model file.$0.04 per conversion.
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/convert",
"format": "fbx",
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb"
}
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.
formatstringOutput file format.
Domyślnie: "fbx"
Możliwe wartości: "glb", "obj", "fbx", "stl", "usdz", "blend", "3mf"
model_urlstringwymaganeURL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI.
{
"model": "meshy/convert",
"format": "fbx",
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb"
}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/a371e5e4-7b44-4d5a-8811-528602691cf2/output/33cf31b8-0c16-4233-8291-8198850b3539.glb"
}
]