Skip to main content

CAD - execute a chained pipeline

POST 

/api/v1/cad/pipeline

Runs multiple operations sequentially. Use '$ref:N' in params to reference step N's result.

Request​

Responses​

Task accepted

Reference​

POST /api/v1/cad/pipeline

Runs multiple operations sequentially. Use '$ref:N' in params to reference step N's result.

Request body​

Content type: application/json (required)

FieldTypeRequiredDescription
stepsarray of objectyesOrdered list of CAD operations executed sequentially. Later steps can reference earlier results using '$ref:N' syntax. Supports map and choice control-flow steps.
inputFilesarray of objectnoReferences to previously uploaded files. Use '$file:N' in step params to inject file contents (optionally '$file:N:<format>:<codec>' to pick a read format and/or decompress - see PipelineStep.params).
inputFiles[].fileIdstringyesID of a previously uploaded file (from POST /files/upload)
inputFiles[].rolestringyesRole identifier for the file (e.g. 'step-model', 'coordinates-csv')
outputsobjectnoControls which output formats are generated for pipeline results. Supports additional formats (json, csv, stl, 3mf, brep, brep-binary) beyond standard model outputs.
outputs.formatsarray of objectyesOutput formats to generate. Supports standard CAD formats (step, stpz, gltf, decomposed-mesh) plus pipeline-specific formats (json, csv, stl, 3mf, brep, brep-binary).
outputs.meshPrecisionnumbernoMesh tessellation precision (lower = finer). Range: [0.0001, 10]
outputs.gltfMeshPrecisionnumbernoMesh tessellation precision (lower = finer). Range: [0.0001, 10]
outputs.adjustYtoZbooleannoTurns a decomposed-mesh output from Y-up, as the server models, to Z-up. It applies to decomposed-mesh only: a STEP output is always written Z-up, so a STEP sent in comes back as it went in, a glTF output is always Y-up, as glTF asks, and a BREP output keeps the frame the shapes were modelled in, as occt.io.loadBrep reads it back.
outputs.includePipelineInMetadatabooleannoInclude the full pipeline definition in metadata.json. Defaults to true. Set to false to exclude it for smaller metadata.
outputs.unitmm | cm | m | innoA unit of length: 'mm' (millimetres), 'cm' (centimetres), 'm' (metres) or 'in' (inches).

Responses​

StatusDescription
202Task accepted
400Validation error
500Server error

Example request​

curl -X POST "https://api.bitbybit.dev/api/v1/cad/pipeline" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'

Authentication: send your key in the x-api-key header. The full machine-readable specification is at openapi.json.