Meshy Relief API リファレンス
写真をプリント可能なレリーフプレートに変換、GLB、STL、深度マップ付き
PopNow の API キー 1 つで、Meshy Relief を自分のコードから呼び出せます。送るモデル ID、受け付ける入力フィールド、1 回あたりの料金(USD)、ターミナルに貼ってそのまま動くリクエストをこのページにまとめました。
パラメーターの説明はモデルの入力 schema から取っているため、英語のみです。
概要
- 開発元
- Meshy
- 出力
- 画像
- 最安
- $0.96 USD 1 リクエストあたり
- モデル ID
料金は USD で表示され、PopNow の残高から差し引かれます。受付時に最大料金を確保し、完了後に実際の使用量で精算して差額を返却します。失敗したタスクは課金されません。実行前の正確な見積もりは POST /api/v1/jobs/quote で取得できます。
写真レリーフ
meshy/relief/image-to-3d
料金
| オプション | USD |
|---|---|
既定 | $0.96 1 リクエストあたり |
パラメーター
| フィールド | 型 | 既定値 | 指定できる値 | 説明 |
|---|---|---|---|---|
image_url必須 | string | — | — | The photo to carve: JPEG, PNG or WebP, at least 32 × 32 pixels, up to 20 MB. A clear subject on a plain background works best. |
relief_height任意 | string | low | low, high | Relief style: low carves about 3 mm deep by default, high about 6 mm. |
carving_mode任意 | string | emboss | emboss, engrave | emboss raises the subject from the plate; engrave cuts the nearer parts into it. |
carving_depth_mm任意 | number | — | 0〜60 | Carving depth in millimetres. Leave it unset to use the depth of the chosen relief style. |
size_mm任意 | number | 60 | 20〜250 | Length of the photo's longer side on the model, in millimetres, measured flat before any bend. |
base_thickness_mm任意 | number | — | 0.1〜10 | Thickness of the back plate in millimetres. Leave it unset when remove_base is on. |
remove_base任意 | boolean | false | — | Cut the background away and build no back plate, leaving only the subject. |
removal_threshold任意 | number | 0.01 | 0.01〜1 | Depth below which the background is cut away, from 0.01 to 1. Only used with remove_base. |
bend_mode任意 | string | off | off, convex, concave | Bend the whole relief: convex bulges the front outward, concave curves it inward. |
bend_axis任意 | string | xz | xz, yz | Which edges curl when bending: xz curls the left and right edges, yz the top and bottom. |
bend_angle任意 | number | 60 | 0〜360 | Arc the bend spans, in degrees, from 0 to 360. |
mesh_resolution任意 | integer | 1024 | 512〜1024 | Mesh points along the longer side, from 512 to 1,024. Lower makes smaller files with less fine detail. |
リクエスト例
このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。
例の image_url には PopNow のサンプル素材を使っています。自分の公開 HTTPS リンク、アップロードしたファイル、保存済みアセットに置き換えてください。
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "meshy/relief/image-to-3d",
"input": {
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp"
}
}'レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
