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) 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).
outputs.meshPrecisionnumbernoMesh tessellation precision (lower = finer). Range: [0.0001, 10]
outputs.gltfMeshPrecisionnumbernoMesh tessellation precision (lower = finer). Range: [0.0001, 10]
outputs.adjustYtoZbooleannoConvert from Y-up to Z-up coordinate system in the output. Useful for software that expects Z-up.
outputs.includePipelineInMetadatabooleannoInclude the full pipeline definition in metadata.json. Defaults to true. Set to false to exclude it for smaller metadata.

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.