PopNowDocs de la API
Contenido principal

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

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ónUSD
Predeterminado$0.96 por solicitud

Parámetros

CampoTipoValor predeterminadoValores admitidosPara qué sirve
image_urlObligatoriostring——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_heightOpcionalstringlowlow, highRelief style: low carves about 3 mm deep by default, high about 6 mm.
carving_modeOpcionalstringembossemboss, engraveemboss raises the subject from the plate; engrave cuts the nearer parts into it.
carving_depth_mmOpcionalnumber—de 0 a 60Carving depth in millimetres. Leave it unset to use the depth of the chosen relief style.
size_mmOpcionalnumber60de 20 a 250Length of the photo's longer side on the model, in millimetres, measured flat before any bend.
base_thickness_mmOpcionalnumber—de 0.1 a 10Thickness of the back plate in millimetres. Leave it unset when remove_base is on.
remove_baseOpcionalbooleanfalse—Cut the background away and build no back plate, leaving only the subject.
removal_thresholdOpcionalnumber0.01de 0.01 a 1Depth below which the background is cut away, from 0.01 to 1. Only used with remove_base.
bend_modeOpcionalstringoffoff, convex, concaveBend the whole relief: convex bulges the front outward, concave curves it inward.
bend_axisOpcionalstringxzxz, yzWhich edges curl when bending: xz curls the left and right edges, yz the top and bottom.
bend_angleOpcionalnumber60de 0 a 360Arc the bend spans, in degrees, from 0 to 360.
mesh_resolutionOpcionalinteger1024de 512 a 1024Mesh 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Siguientes pasos

En esta página