Build a pipeline in Studio
Studio's Pipelines screen builds a pipeline one step at a time: you pick operations, fill in their inputs, feed each step the results of earlier ones and run it, and the result opens in 3D. Beside the steps it writes the pipeline as JSON, the same request a script sends, so what you build here runs from your own code unchanged.

1. Start from an example
Open Pipelines, choose Examples and then Translate, Union + Fillet. The example makes a box, moves a copy of it, joins the two and rounds every edge of the result.
2. Read the steps
Each step is a card, numbered in the order the steps run, with the operation's name and its full path, such as
occt.shapes.solid.createBox. Below them are its inputs:
- a number, a point or a choice is typed in or picked;
- an input that takes a shape lists the steps before it: Step 1: createBox hands the second step the box. In
the JSON it is
$ref:0, the results being counted from 0; - the link button, Use output from a step or file, turns any input into such a list;
- an input that takes several shapes, such as the union's, has a box for each earlier step.
At the top of each card, Output adds the step's result to the result.json the task returns, beside the
shape; the question mark opens the operation's documentation, and the arrows and the cross move or remove the step.
The Pipeline JSON panel beside the steps follows every change.
3. Add steps

Below the last step, every operation waits by its namespace: Occt for exact CAD, Manifold and Jscad for meshes, Json, Csv, Lists and Math for data, and OcctPro for the Pro algorithms. Open a namespace and pick an operation; the path above the buttons goes back up. Map adds a step that repeats its own steps for every item of a list, as the batch tutorial does, and Choice one that runs one branch or the other.
4. Run it
Under the steps:
- Add File uploads a file the steps read as
$file:0,$file:1and so on, in the order they were added; - the output formats choose what the shape is written as: Compressed STEP (.stpz), Uncompressed STEP (.step), glTF (.glb) and Decomposed Mesh (JSON), with the Mesh Precision of the meshes;
- Include pipeline in metadata keeps the pipeline in the task's metadata, so you can see later what ran.
Execute Pipeline starts the task and opens its page. When it completes, Preview glb in 3D opens the result in the Viewer.

5. Take it into your code
Download saves the Pipeline JSON as pipeline.json, and the copy button on the panel puts it on the
clipboard. Import loads a pipeline back into the screen: a pipeline.json, or a task's metadata file, which
holds the pipeline that task ran.
This script runs a downloaded pipeline.json and saves what it returns, with the API key in BITBYBIT_API_KEY and
the SDK installed as in the first tutorial:
import { readFileSync, writeFileSync } from "node:fs";
import { BitbybitClient } from "@bitbybit-dev/cad-cloud-sdk";
import type { PipelineBody } from "@bitbybit-dev/cad-cloud-sdk";
const apiKey = process.env["BITBYBIT_API_KEY"];
if (!apiKey) throw new Error("Set BITBYBIT_API_KEY to your CAD Cloud API key");
const baseUrl = process.env["BITBYBIT_API_URL"];
const client = new BitbybitClient(baseUrl ? { apiKey, baseUrl } : { apiKey });
const pipeline = JSON.parse(readFileSync(process.argv[2] ?? "pipeline.json", "utf8")) as PipelineBody;
const { taskId, downloads } = await client.cad.pipelineAndPoll(pipeline);
console.log(`task ${taskId}`);
for (const download of downloads) {
const name = download.format === "metadata" ? "metadata.json" : download.filename;
writeFileSync(name, Buffer.from(await (await fetch(download.downloadUrl)).arrayBuffer()));
console.log(`saved ${name}`);
}
node run-pipeline-json.ts pipeline.json prints the task's id and saves each result under its own name, the task's
metadata as metadata.json. Change a number in the file, or in the object before it is sent, and the same pipeline
makes another part.
Next
- From a parametric bracket to a cut file writes a pipeline in code from the start.
- Pipelines lists every kind of step and reference.