Referencia de la API de Meshy Relief
Convierte una foto en una placa en relieve imprimible, con GLB, STL y mapa de profundidad
Con una sola clave de API de PopNow puedes llamar a Meshy Relief desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuánto cuesta cada solicitud en USD y una petición que puedes pegar tal cual en la terminal.
Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.
De un vistazo
- Creado por
- Meshy
- Resultado
- Imagen
- Desde
- $0.96 USD por solicitud
- ID de modelo
Los precios se muestran en USD y se cobran de tu saldo de PopNow. Al aceptar la tarea se reserva el importe máximo; al terminar se cobra el uso real y se libera el resto. Las tareas fallidas no se cobran. Consulta POST /api/v1/jobs/quote para obtener un presupuesto exacto antes de ejecutar.
Foto en relieve
meshy/relief/image-to-3d
Precio
| Opción | USD |
|---|---|
Predeterminado | $0.96 por solicitud |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
image_urlObligatorio | 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_heightOpcional | string | low | low, high | Relief style: low carves about 3 mm deep by default, high about 6 mm. |
carving_modeOpcional | string | emboss | emboss, engrave | emboss raises the subject from the plate; engrave cuts the nearer parts into it. |
carving_depth_mmOpcional | number | — | de 0 a 60 | Carving depth in millimetres. Leave it unset to use the depth of the chosen relief style. |
size_mmOpcional | number | 60 | de 20 a 250 | Length of the photo's longer side on the model, in millimetres, measured flat before any bend. |
base_thickness_mmOpcional | number | — | de 0.1 a 10 | Thickness of the back plate in millimetres. Leave it unset when remove_base is on. |
remove_baseOpcional | boolean | false | — | Cut the background away and build no back plate, leaving only the subject. |
removal_thresholdOpcional | number | 0.01 | de 0.01 a 1 | Depth below which the background is cut away, from 0.01 to 1. Only used with remove_base. |
bend_modeOpcional | string | off | off, convex, concave | Bend the whole relief: convex bulges the front outward, concave curves it inward. |
bend_axisOpcional | string | xz | xz, yz | Which edges curl when bending: xz curls the left and right edges, yz the top and bottom. |
bend_angleOpcional | number | 60 | de 0 a 360 | Arc the bend spans, in degrees, from 0 to 360. |
mesh_resolutionOpcional | integer | 1024 | de 512 a 1024 | Mesh points along the longer side, from 512 to 1,024. Lower makes smaller files with less fine detail. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en image_url. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
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 respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
