API Request Examples (ready to paste)

PowerShell — send raw JSON via profile_text

The examples below show how to correctly call the /convert endpoint of the Meshmatic API. This endpoint runs the Meshmatic CLI on the server to convert your uploaded CAD or 3D file into the desired output format (for example, .glb, .fbx, etc.), using the parameters and tools defined in your profile JSON.

# Build compact JSON
$profileJson = @'
{
"lods": { "numOfSelectedLODs": 0, "saveInSingleFile": false, "values": [] },
"tools": ["AT_OUTLINER_NAME_CLEANUP","AT_CLEANING_UP_SCENE"],
"params": { "tessLinearTolerance": 100, "tessAngularTolerance": 40 }
}
'@ | ConvertFrom-Json | ConvertTo-Json -Compress

# Ensure UTF-8 on the pipe so the server sees valid JSON bytes
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8

# Pipe JSON to curl; @- = read this form part from stdin
$profileJson | curl.exe -X POST "https://api.champion3d.io/convert" `
-F "file=@E:\test.stp" `
-F "license=MMCore-f137670ba3ec" `
-F "export_format=obj" `
-F "dest=test_output" `
--form "profile=@-;filename=profile.json;type=application/json"


PowerShell — send a profile file via profile

curl.exe -sS -X POST "https://api.champion3d.io/convert" `
-F "file=@E:\test.stp" `
-F "license=MMCore-f137670ba3ec" `
-F "export_format=glb" `
-F "profile_name=FileExchanger"


What You’ll Get Back

A successful request returns a JSON response:

{
"status": "ok",
"mesh_url": "https://api.champion3d.io/files/test_output.glb",
"json_url": "https://api.champion3d.io/files/test_output.json"
}

  • mesh_url: direct download link for your converted 3D file.

  • json_url: report generated by Meshmatic CLI (includes tool logs and stats).

If something goes wrong, the response may include:

{
"status": "error",
"stderr": "Error: Invalid JSON profile",
"cmd": "MeshmaticCLI.exe --input ...",
"mesh_exists": false,
"json_exists": false
}

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Understanding Tool Order and Priority in Meshmatic Profiles

Each Meshmatic profile contains a “tools” array — a list of processing operations applied by the...

Profile Parameters Reference

These parameters are supported in JSON profiles sent through the Meshmatic API (/convert).Each...