Skip to content
HALOWERK

Codewerk

notebook run

Accepts notebook format 4 with at most ten cells. Code cells execute sequentially in one fresh Python 3.12 standard-library OS sandbox, with shared variables only within that request. Old execution counts and outputs are discarded. Each code cell captures stdout, stderr and the repr of its final expression; the first error aborts the entire request before settlement. The backend validates the returned cell records and constructs a new format-4.5 notebook plus static HTML from the original.

POST https://code.halowerk.com/v1/notebook-run

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
notebookobjectYes
inputSee schemaNoOptional JSON data exposed as input_data.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "notebook"
  ],
  "properties": {
    "notebook": {
      "type": "object",
      "required": [
        "nbformat",
        "cells"
      ],
      "properties": {
        "nbformat": {
          "const": 4
        },
        "nbformat_minor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 5
        },
        "metadata": {
          "type": "object"
        },
        "cells": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "items": {
            "type": "object",
            "required": [
              "cell_type",
              "source"
            ],
            "properties": {
              "cell_type": {
                "enum": [
                  "code",
                  "markdown",
                  "raw"
                ]
              },
              "source": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 8192
                  },
                  {
                    "type": "array",
                    "maxItems": 256,
                    "items": {
                      "type": "string",
                      "maxLength": 8192
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "input": {
      "description": "Optional JSON data exposed as input_data."
    }
  }
}

Open original schema

Published input example

{
  "notebook": {
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {},
    "cells": [
      {
        "cell_type": "code",
        "source": "x = 2 + 3",
        "metadata": {},
        "outputs": [],
        "execution_count": null
      },
      {
        "cell_type": "code",
        "source": "print(\"computed\")\nx * 4",
        "metadata": {},
        "outputs": [],
        "execution_count": null
      }
    ]
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’