Cells
Cells are ordered elements within a notebook. Each cell has a type and source (text content). The API lets you manipulate cells individually without replacing the entire notebook.
Cell Types
Section titled “Cell Types”| Type | Description |
|---|---|
markdown | Documentation text, rendered as formatted markdown |
spice | SPICE netlist, executable via the simulation endpoints |
python | Python code (execution planned for future release) |
schematic | Auto-generated circuit diagram (read-only display) |
Add Cell
Section titled “Add Cell”POST /api/notebooks/{notebook_id}/cellsRequest body:
{ "type": "spice", "source": "V1 1 0 DC 5\nR1 1 0 1k\n.op\n.end", "after_cell_id": "cell-a1b2c3d4e5f6"}after_cell_id is optional — omit it to append the cell at the end.
Response 201:
{ "id": "cell-b2c3d4e5f6a7", "type": "spice", "source": "V1 1 0 DC 5\nR1 1 0 1k\n.op\n.end", "outputs": []}Update Cell
Section titled “Update Cell”PUT /api/notebooks/{notebook_id}/cells/{cell_id}Request body:
{ "source": "V1 1 0 DC 10\nR1 1 0 2k\n.op\n.end", "type": "spice"}Both fields are optional — only provided fields are updated. Changing source does not automatically re-run the simulation; call the run endpoint to execute.
Response 200 — updated cell object.
Delete Cell
Section titled “Delete Cell”DELETE /api/notebooks/{notebook_id}/cells/{cell_id}Response 204 — no content.
Reorder Cells
Section titled “Reorder Cells”PUT /api/notebooks/{notebook_id}/cells/reorderRequest body:
{ "cell_ids": ["cell-b2c3d4e5f6a7", "cell-a1b2c3d4e5f6"]}The array must include every cell ID in the notebook exactly once. This replaces the cell order entirely.
Response 200 — array of cell objects in the new order.
Cell Data Model
Section titled “Cell Data Model”{ "id": "cell-a1b2c3d4e5f6", "type": "spice", "source": "V1 1 0 DC 5\n.op\n.end", "outputs": [ { "output_type": "simulation_result", "data": { "success": true, "waveform": { "..." }, "log": "...", "error": null, "elapsed_seconds": 0.3 }, "timestamp": "2026-02-13T18:35:00+00:00" } ]}The outputs array contains results from previous simulation runs. Each entry includes a timestamp so you can track when the cell was last executed.