Documentation
API Reference
Programmatic access to the Polymath CAD translation service.
Authentication
Generate an API key from your dashboard settings. Include it in every request:
X-Api-Key: pw_live_your_key_here
POST
/api/extractUpload an NX .prt file for feature extraction. Returns feature count and pricing.
Request
Content-Type: multipart/form-data Body: file=@your_model.prt
Response
{
"featureCount": 12,
"features": [{"type": "Extrusion", "name": "Extrude1"}, ...],
"totalCents": 120,
"totalFormatted": "$1.20"
}POST
/api/jobsCreate a conversion job. Returns a Stripe checkout URL.
Response
{
"jobId": "uuid",
"checkoutUrl": "https://checkout.stripe.com/...",
"featureCount": 12,
"totalCents": 120
}GET
/api/jobs/:jobIdPoll for job status. Returns result URL when complete.
Status Values
pending_paymentpaidsubmittedprocessingcompletedfailed
GET
/api/jobs/:jobId/downloadRedirects to the S3 presigned URL for the .sldprt file. Only available when status is "completed".
Code Examples
curl
# Extract features from a .prt file curl -X POST https://your-domain.com/api/extract \ -H "X-Api-Key: pw_live_your_key" \ -F "file=@model.prt"
Python
import requests
with open("model.prt", "rb") as f:
resp = requests.post(
"https://your-domain.com/api/extract",
headers={"X-Api-Key": "pw_live_your_key"},
files={"file": f},
)
print(resp.json())Supported Feature Types
| Category | Types |
|---|---|
| Sketch | ProfileFeature3DProfileFeature |
| Extrusion | ExtrusionICE |
| Revolution | RevolutionRevCut |
| Edge | FilletChamfer |
| Body | Shell |
| Hole | HoleWzd |
| Pattern | CirPatternLPatternMirrorPattern |
| Datum | RefPlaneRefAxis |
Error Codes
| Code | Meaning |
|---|---|
| 400 | Invalid file or missing fields |
| 401 | Missing or invalid API key |
| 413 | File exceeds 100 MB |
| 429 | Server busy — retry shortly |
| 503 | Extraction or reconstruction service unavailable |