Riferimento API di Meshy Relief
Trasforma una foto in una targa in rilievo stampabile, con GLB, STL e mappa di profondità
Con una sola chiave API di PopNow chiami Meshy Relief dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.
Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.
In sintesi
- Sviluppato da
- Meshy
- Risultato
- Immagine
- Da
- $0.96 USD per richiesta
- ID del modello
I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.
Foto in rilievo
meshy/relief/image-to-3d
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.96 per richiesta |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
image_urlObbligatorio | 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_heightFacoltativo | string | low | low, high | Relief style: low carves about 3 mm deep by default, high about 6 mm. |
carving_modeFacoltativo | string | emboss | emboss, engrave | emboss raises the subject from the plate; engrave cuts the nearer parts into it. |
carving_depth_mmFacoltativo | number | — | da 0 a 60 | Carving depth in millimetres. Leave it unset to use the depth of the chosen relief style. |
size_mmFacoltativo | number | 60 | da 20 a 250 | Length of the photo's longer side on the model, in millimetres, measured flat before any bend. |
base_thickness_mmFacoltativo | number | — | da 0.1 a 10 | Thickness of the back plate in millimetres. Leave it unset when remove_base is on. |
remove_baseFacoltativo | boolean | false | — | Cut the background away and build no back plate, leaving only the subject. |
removal_thresholdFacoltativo | number | 0.01 | da 0.01 a 1 | Depth below which the background is cut away, from 0.01 to 1. Only used with remove_base. |
bend_modeFacoltativo | string | off | off, convex, concave | Bend the whole relief: convex bulges the front outward, concave curves it inward. |
bend_axisFacoltativo | string | xz | xz, yz | Which edges curl when bending: xz curls the left and right edges, yz the top and bottom. |
bend_angleFacoltativo | number | 60 | da 0 a 360 | Arc the bend spans, in degrees, from 0 to 360. |
mesh_resolutionFacoltativo | integer | 1024 | da 512 a 1024 | Mesh points along the longer side, from 512 to 1,024. Lower makes smaller files with less fine detail. |
Richiesta di esempio
Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.
L’esempio usa file di prova di PopNow in image_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.
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"
}
}'La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
