Call PiQ. Get a drawing back.
An API for design, estimating, and production systems that need parametric drawings on demand.
ParametrIQ's parametric engine, as a web service
PiQ SaaS runs ParametrIQ drawings for your own software. Send a template (a ParametrIQ drawing, with its sizes as labelled variables) and the values you want, and get the drawing back: complete, exported to the file your printer, die maker or cutting table needs, or worked out as numbers for a quote. It is the same engine that runs ParametrIQ CAD, so a template drawn and tested there runs the same here.
One request, one drawing
Every request is a template and its values, as JSON over HTTPS, with your API key in a header. Only the template's labelled variables can be given values, and each value is checked: a length that isn't a number, a choice that isn't one of the template's, or a value for a variable the template doesn't ask for, is refused, saying which and why. Nothing is kept between requests, so the same request always makes the same drawing.
- Web-to-print and configurators: a customer types their sizes, and gets a proof and a price.
- Estimating: rule length by kind, blank area, sheet usage and the cost of the die, before anything is drawn by hand.
- Production: the cutting file written straight into your workflow, in the format each machine wants.
POST /export/pdf
X-API-KEY: your-api-key
Content-Type: application/json
{
"source": { "storage": "main", "key": "templates/rsc.piq" },
"values": { "L": 500, "W": 320, "D": 250,
"T": "C flute (4 mm)" }
}
A FEFCO 0201 case, 500 × 320 × 250, in C flute: back comes the PDF.
What it gives back
Files
PDF, SVG, EPS and Adobe Illustrator with dieline layers as spot colours, and a print-ready dieline PDF; PNG, JPEG and WebP pictures; G-code, HP-GL and GP-GL for cutting tables and plotters; CF2 and DDES3 for die makers; LightBurn and SVG for lasers, Cricut and Silhouette; print-and-cut PDF and EPS; DSTV NC and IFC for steel; DXF with bend data and STEP for sheet metal; AAMA/ASTM DXF for patterns; tiled, projector and wrap-around template PDFs; mat cutter DXF and HP-GL; DXF for other CAD programs.
Measurements
The drawing's extent, its cut and crease lengths by layer, and the blanks it cuts out, with their area and perimeter. Or any expression worked out in the drawing: AREAOF(@1), DISTANCE(P1,P4), a material's allowance.
The die and its cost
The steel-rule die the drawing needs, as ParametrIQ CAD's Make Die works it out: the rule by kind, bridges, nicks, holes, the sheet and how much of it the blanks use, and an estimate of its cost from your own prices.
What a template asks for
A template's labelled variables, each with its label, the kind of value it takes and, for a choice, what can be chosen: enough to build a form for any template, without writing one by hand.
The drawing itself
The complete drawing as ParametrIQ drawing text, still parametric, with the values given: open it in ParametrIQ CAD to finish by hand, or keep it as the job's record.
A quick preview
A PNG of the drawing, 16 to 4000 pixels across: a picture of what the customer's sizes make, for a configurator, a quote or an order confirmation.
Folded in 3D
The drawing folded as ParametrIQ's 3D view folds it: meshes ready to draw with WebGL, three.js or a game engine, at steps from flat to folded, in the look of its material or any of the built-in appearances (corrugated, paperboard, rigid board, metals, plastics, fabrics, wood).
Your templates and files, in your own storage
Register your own S3-compatible storage (AWS S3, Cloudflare R2, Backblaze B2, Wasabi, MinIO, DigitalOcean Spaces …) once, by a name of your choosing. Then keep your templates there and name one in a request instead of sending it, and have exported files saved straight to it rather than downloaded: the proof to the customer's folder, the cutting file to the machine's.
- Tried before it is kept: a storage that can't be reached, or refuses its keys, isn't registered, and you are told why.
- Kept to its folder: give a prefix, and keys can't reach above it.
- Secrets kept secret: the secret key is stored encrypted, and never given back.
- Only yours: each subscription reaches only the storages it registered.
PUT /storages/main
{
"serviceUrl": "https://ACCOUNT.r2.cloudflarestorage.com",
"region": "auto",
"bucket": "my-bucket",
"prefix": "piq/",
"accessKeyId": "…",
"secretAccessKey": "…"
}
POST /save/pdf
{
"source": { "storage": "main", "key": "templates/rsc.piq" },
"values": { "L": 500 },
"destination": { "storage": "main", "key": "proofs/" }
}
Call it from anything
The API is described by an OpenAPI document, so a client can be generated in most languages, with Kiota, NSwag or OpenAPI Generator. Or start from one of our examples: each lists a template's inputs, measures it, exports a PDF and shows what to do when a request is refused.
Clear answers when it can't
A request that can't be carried out is answered with a standard problem description: what is wrong, by the value it is about. Nothing is guessed.
Limits that protect you
A template is given a fixed time to run, so a mistake in one (a loop that never ends) is stopped and reported rather than left running. Requests beyond what the service can run at once wait their turn, and if too many are waiting, are turned away (429) to try again.
Drawn in ParametrIQ CAD
Templates are ordinary ParametrIQ drawings: draw and test one in ParametrIQ CAD with Run Parametric, label the sizes it asks for, and it is ready for the API.
Get PiQ SaaS
Subscribe, copy your API key from Account › Licenses, and send your first request.