stylestring
Color-region style.
デフォルト: "realistic"
指定可能な値: "realistic", "cartoon"
meshy/print/multi-colorMeshy Multi-Color Print turns a textured 3D model into color regions and returns a 3MF ready for a multi-color slicer.
モデルを試す
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Meshy Multi-Color Print turns a textured 3D model into color regions and returns a 3MF ready for a multi-color slicer.
| 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. |
style | realistic / cartoon | "realistic" | Color-region style. |
max_colors | integer 1–16 | 4 | Maximum number of colors. |
max_depth | integer 3–6 | 4 | Color detail depth (realistic style only). |
printer_brand | bambu / anycubic / creality / flashforge / snapmaker / elegoo / prusa / qidi / ankermake | "bambu" | Slicer preset written into the 3MF. |
url: Multi-color 3MF.$0.40 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/print/multi-color",
"style": "realistic",
"max_depth": 4,
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb",
"max_colors": 4,
"printer_brand": "bambu"
}
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"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
stylestringColor-region style.
デフォルト: "realistic"
指定可能な値: "realistic", "cartoon"
max_depthintegerColor detail depth (realistic style only).
デフォルト: 4
最小: 3
最大: 6
model_urlstring必須URL of the 3D model (GLB, GLTF, FBX, OBJ or STL) as a public URL or data URI.
max_colorsintegerMaximum number of colors.
デフォルト: 4
最小: 1
最大: 16
printer_brandstringSlicer preset written into the 3MF.
デフォルト: "bambu"
指定可能な値: "bambu", "anycubic", "creality", "flashforge", "snapmaker", "elegoo", "prusa", "qidi", "ankermake"
{
"model": "meshy/print/multi-color",
"style": "realistic",
"max_depth": 4,
"model_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb",
"max_colors": 4,
"printer_brand": "bambu"
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
まだ例の出力は公開されていません。完了したrunのレスポンスを確認するには、Playground → Result → JSON を使用してください。