Analyze Printability API

Suriin ang isang 3D model para sa FDM printability — watertightness, volume, mga butas, non-manifold edges, at degenerate faces.


POST/openapi/v1/print/analyze

Gumawa ng Analyze Printability Task

Ang endpoint na ito ay gumagawa ng bagong Analyze Printability task. Sinusuri ng task ang isang 3D model at iniuulat ang mga sukatan ng printability nito.

Kung ang input task ay mayroon nang naka-cache na printability, agad na handa ang ibinalik na task at ang unang GET dito ay magbabalik ng resulta ng pagsusuri nang hindi dumadaan sa worker.

Mga Parameter

  • Name
    input_task_id
    Type
    string
    Kinakailangan
    Description

    Ang ID ng isang matagumpay na task na pagmamay-ari mo. Mga sinusuportahang uri ng task: Image to 3D, Multi-Image to 3D, Text to 3D, Remesh, at Retexture. Dapat gumamit ang task ng Meshy 6 (o anumang Preview model) at dapat may status na SUCCEEDED.

  • Name
    model_url
    Type
    string
    Kinakailangan
    Description

    URL ng isang 3D model na susuriin. Mga sinusuportahang format: .glb, .gltf, .obj, .fbx, .stl. Pinakamalaking laki ng file: 100 MB. Dapat gumamit ng http, https, o isang data: URL (nilalampasan ng mga data URL ang mga pagsusuri sa extension).

Mga Ibinabalik

Ang result property ng response ay naglalaman ng id ng bagong ginawang Analyze Printability task.

Mga Mode ng Pagkabigo

  • Name
    400 - Bad Request
    Description

    Hindi katanggap-tanggap ang request. Mga karaniwang sanhi:

    • Kulang na parameter: walang ibinigay na input_task_id o model_url.
    • Di-wastong UUID: ang input_task_id ay hindi wastong UUID.
    • Di-wastong model URL: ang model_url ay may maling anyo, gumagamit ng hindi sinusuportahang scheme, o may hindi sinusuportahang file extension.
    • Masyadong malaki ang model file: lumampas sa 100 MB ang body ng model_url.
    • Hindi matagumpay ang task: ang tinukoy na task ay pending pa rin, in progress, o failed.
  • Name
    401 - Unauthorized
    Description

    Nabigo ang authentication. Pakisuri ang iyong API key.

  • Name
    403 - Forbidden
    Description

    Umiiral ang task ngunit pagmamay-ari ito ng ibang user.

  • Name
    404 - Not Found
    Description

    Mga karaniwang sanhi:

    • Hindi umiiral ang task o natanggal na ito.
    • Gumagamit ang task ng model na mas luma kaysa Meshy 6, o ang mode nito ay hindi gumagawa ng 3D asset.
    • Hindi na available sa storage ang pinagbabatayang model file.
  • Name
    429 - Too Many Requests
    Description

    Nalampasan mo na ang iyong pending-task quota o rate limit.

Request

POST
/openapi/v1/print/analyze
# Analyze an existing task
curl https://api.meshy.ai/openapi/v1/print/analyze \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
  }'

# Or analyze a model URL directly
curl https://api.meshy.ai/openapi/v1/print/analyze \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
    "model_url": "https://example.com/model.glb"
  }'

Response

{
  "result": "0193bfc5-ee4f-73f8-8525-44b398884ce9"
}

GET/openapi/v1/print/analyze/:id

Kunin ang Analyze Printability Task

Kinukuha ng endpoint na ito ang task na analyze-printability gamit ang ID nito.

Mga Parameter

  • Name
    id
    Type
    path
    Description

    Ang ID ng task na analyze-printability na kukunin.

Mga Ibinabalik

Ang Analyze Printability Task Object. Ang field na printability ay null hanggang sa umabot ang task sa SUCCEEDED.

Request

GET
/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f
curl https://api.meshy.ai/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response

{
  "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
  "type": "print-analyze",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1699999999000,
  "started_at": 1700000000000,
  "finished_at": 1700000001000,
  "expires_at": 1715725401000,
  "task_error": null,
  "printability": {
    "_version": "v1",
    "status": "warning",
    "issue_count": 1,
    "error_count": 0,
    "warning_count": 1,
    "metrics": {
      "is_watertight": true,
      "volume": 1.316167354292668,
      "non_manifold_edges": 0,
      "degenerate_faces": 43242,
      "holes": 0
    },
    "evaluated_at": 1700000001000
  },
  "consumed_credits": 0
}

DELETE/openapi/v1/print/analyze/:id

Burahin ang isang Analyze Printability na Gawain

Permanenteng binubura ng endpoint na ito ang isang analyze-printability na gawain at ang naka-cache na resulta nito. Hindi na mababawi ang aksyong ito.

Mga Path Parameter

  • Name
    id
    Type
    path
    Description

    Ang ID ng analyze-printability na gawain na buburahin.

Mga Ibinabalik

Ibinabalik ang 200 OK kapag matagumpay.

Request

DELETE
/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

// Returns 200 Ok on success.

GET/openapi/v1/print/analyze

Ilista ang mga Analyze Printability Task

Pinapayagan ka ng endpoint na ito na kunin ang listahan ng mga analyze-printability task.

Mga Parameter

Opsyonal na mga attribute

  • Name
    page_num
    Type
    integer
    Description

    Numero ng page para sa pagination. Nagsisimula at nagde-default sa 1.

  • Name
    page_size
    Type
    integer
    Description

    Limitasyon sa laki ng page. Nagde-default sa 10 item. Ang maximum na pinapayagan ay 50 item.

  • Name
    sort_by
    Type
    string
    Description

    Field na pag-uuriin ayon dito. Mga available na value:

    • +created_at: Ayusin ayon sa oras ng paggawa sa pataas na order.
    • -created_at: Ayusin ayon sa oras ng paggawa sa pababang order.

Mga Ibinabalik

Nagbabalik ng naka-pagination na listahan ng Analyze Printability Task Objects.

Request

GET
/openapi/v1/print/analyze
curl https://api.meshy.ai/openapi/v1/print/analyze?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response

[
  {
    "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
    "type": "print-analyze",
    "status": "SUCCEEDED",
    "progress": 100,
    "preceding_tasks": 0,
    "created_at": 1699999999000,
    "started_at": 1700000000000,
    "finished_at": 1700000001000,
    "expires_at": 1715725401000,
    "task_error": null,
    "printability": {
      "_version": "v1",
      "status": "warning",
      "issue_count": 1,
      "error_count": 0,
      "warning_count": 1,
      "metrics": {
        "is_watertight": true,
        "volume": 1.316167354292668,
        "non_manifold_edges": 0,
        "degenerate_faces": 43242,
        "holes": 0
      },
      "evaluated_at": 1700000001000
    },
    "consumed_credits": 0
  }
]

GET/openapi/v1/print/analyze/:id/stream

I-stream ang Analyze Printability Task

Ang endpoint na ito ay nag-i-stream ng mga real-time na update para sa isang analyze-printability task gamit ang Server-Sent Events (SSE).

Mga Parameter

  • Name
    id
    Type
    path
    Description

    Natatanging identifier para sa analyze-printability task na i-stream.

Mga Ibinabalik

Nagbabalik ng stream ng Mga Object ng Analyze Printability Task bilang Server-Sent Events.

Para sa mga task na PENDING o IN_PROGRESS, isasama lamang ng response stream ang kinakailangang mga field na progress at status. Ipinapadala lamang ang block ng printability kapag umabot na ang task sa SUCCEEDED.

Request

GET
/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream
curl -N https://api.meshy.ai/openapi/v1/print/analyze/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response Stream

// Error event example
event: error
data: {
  "status_code": 404,
  "message": "Task not found"
}

// Message event examples illustrate task progress.
// For PENDING or IN_PROGRESS tasks, the response stream will not include all fields.
event: message
data: {
  "id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
  "type": "print-analyze",
  "status": "SUCCEEDED",
  "progress": 100,
  "preceding_tasks": 0,
  "created_at": 1699999999000,
  "started_at": 1700000000000,
  "finished_at": 1700000001000,
  "expires_at": 1715725401000,
  "task_error": null,
  "printability": {
    "_version": "v1",
    "status": "warning",
    "issue_count": 1,
    "error_count": 0,
    "warning_count": 1,
    "metrics": {
      "is_watertight": true,
      "volume": 1.316167354292668,
      "non_manifold_edges": 0,
      "degenerate_faces": 43242,
      "holes": 0
    },
    "evaluated_at": 1700000001000
  },
  "consumed_credits": 0
}

Ang Analyze Printability Task Object

  • Name
    id
    Type
    string
    Description

    Natatanging identifier para sa task. Bagama't gumagamit kami ng k-sortable UUID para sa mga task id bilang detalye ng implementasyon, hindi ka dapat gumawa ng anumang palagay tungkol sa format ng id.

  • Name
    type
    Type
    string
    Description

    Uri ng analyze-printability task. Ang value ay print-analyze.

  • Name
    status
    Type
    string
    Description

    Status ng task. Ang mga posibleng value ay isa sa PENDING, IN_PROGRESS, SUCCEEDED, FAILED, CANCELED.

  • Name
    progress
    Type
    integer
    Description

    Progress ng task. Kung hindi pa nasisimulan ang task, ang property na ito ay magiging 0. Kapag nagtagumpay na ang task, magiging 100 ito.

  • Name
    preceding_tasks
    Type
    integer
    Description

    Ang bilang ng mga naunang task.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp kung kailan ginawa ang task, sa milliseconds.

  • Name
    started_at
    Type
    timestamp
    Description

    Timestamp kung kailan sinimulan ang task, sa milliseconds. Kung hindi pa nasisimulan ang task, ang property na ito ay magiging 0.

  • Name
    finished_at
    Type
    timestamp
    Description

    Timestamp kung kailan natapos ang task, sa milliseconds. Kung hindi pa natatapos ang task, ang property na ito ay magiging 0.

  • Name
    expires_at
    Type
    timestamp
    Description

    Timestamp kung kailan mag-e-expire ang resulta ng task mula sa system, sa milliseconds. 0 kung hindi pa natatapos ang task.

  • Name
    task_error
    Type
    object
    Description

    Impormasyon ng error kung nabigo ang task. Ang property na ito ay null kung hindi nabigo ang task. Tingnan ang Errors para sa higit pang detalye.

    • Name
      message
      Type
      string
      Description

      Mensahe ng error na naglalarawan kung ano ang nagkamali.

  • Name
    printability
    Type
    object
    Description

    Resulta ng pagsusuri sa printability. null hanggang umabot ang task sa SUCCEEDED.

    • Name
      _version
      Type
      string
      Description

      Bersyon ng schema ng resulta ng printability. Sa kasalukuyan ay v1.

    • Name
      status
      Type
      string
      Description

      Pangkalahatang status. Isa sa:

      • healthy: walang errors at walang warnings.
      • warning: hindi bababa sa isang warning, walang errors.
      • error: hindi bababa sa isang error.
      • unknown: hindi masuri ang model.
    • Name
      issue_count
      Type
      integer
      Description

      Kabuuang bilang ng mga issue, katumbas ng error_count + warning_count.

    • Name
      error_count
      Type
      integer
      Description

      Bilang ng mga issue sa antas na error. Itinataas ang errors kapag ang model ay hindi watertight, may non-positive volume, o may non-manifold edges.

    • Name
      warning_count
      Type
      integer
      Description

      Bilang ng mga issue sa antas na warning. Itinataas ang warnings kapag ang model ay naglalaman ng degenerate faces o holes.

    • Name
      metrics
      Type
      object
      Description

      Raw na heometriya metrics na ibinalik ng evaluator.

      • Name
        is_watertight
        Type
        boolean
        Description

        true kapag ang mesh ay walang boundary edges (ibig sabihin, sarado).

      • Name
        volume
        Type
        number
        Description

        Volume ng model sa cubic meters.

      • Name
        non_manifold_edges
        Type
        integer
        Description

        Bilang ng non-manifold edges.

      • Name
        degenerate_faces
        Type
        integer
        Description

        Bilang ng degenerate faces (zero-area o invalid na faces).

      • Name
        holes
        Type
        integer
        Description

        Bilang ng holes (boundary loops) sa mesh.

    • Name
      evaluated_at
      Type
      timestamp
      Description

      Timestamp kung kailan kinompyut ang analysis, sa milliseconds since epoch.

  • Name
    consumed_credits
    Type
    integer
    Description

    Palaging 0. Libre ang endpoint na ito.

The Analyze Printability Task Object

{
  "id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
  "type": "print-analyze",
  "status": "SUCCEEDED",
  "progress": 100,
  "preceding_tasks": 0,
  "created_at": 1699999999000,
  "started_at": 1700000000000,
  "finished_at": 1700000001000,
  "expires_at": 1715725401000,
  "task_error": null,
  "printability": {
    "_version": "v1",
    "status": "warning",
    "issue_count": 1,
    "error_count": 0,
    "warning_count": 1,
    "metrics": {
      "is_watertight": true,
      "volume": 1.316167354292668,
      "non_manifold_edges": 0,
      "degenerate_faces": 43242,
      "holes": 0
    },
    "evaluated_at": 1700000001000
  },
  "consumed_credits": 0
}