Skip to content

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.

TypeDescription
markdownDocumentation text, rendered as formatted markdown
spiceSPICE netlist, executable via the simulation endpoints
pythonPython code (execution planned for future release)
schematicAuto-generated circuit diagram (read-only display)
POST /api/notebooks/{notebook_id}/cells

Request 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": []
}
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 /api/notebooks/{notebook_id}/cells/{cell_id}

Response 204 — no content.

PUT /api/notebooks/{notebook_id}/cells/reorder

Request 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.

{
"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.