---
title: "POST /api/kernel/run"
method: POST
path: "/api/kernel/run"
---

# POST /api/kernel/run

`POST /api/kernel/run`

## Headers

- `Marimo-Session-Id` string, required

## Request body

- ExecuteCellsRequest
  - `cellIds` CellId[], required
  - `codes` string[], required
  - `request` HTTPRequest — Serializable HTTP request representation. Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe subset of data. Excludes session and auth to prevent exposing sensitive data. Attributes: url: Serialized URL with path, port, scheme, netloc, query, hostname. base_url: Serialized base URL. headers: Request headers (marimo-specific headers excluded). query_params: Query parameters mapped to lists of values. path_params: Path parameters from the URL route. cookies: Request cookies. meta: User-defined storage for custom data. user: User info from authentication middleware (e.g., is_authenticated, username).
    - `base_url` object, required
    - `cookies` object, required
    - `headers` object, required
    - `meta` object, required
    - `path_params` object, required
    - `query_params` object, required
    - `url` object, required
    - `user` unknown, required

## Response `200`

Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode.

- SuccessResponse
  - `success` boolean

## Changes

- **2026-03-31** `41bba414df27` — 1 breaking
  - the `cellIds/items/` request property type/format changed from `string`/`` to `string`/`cell-id`
- **2026-03-18** `f29fa637d35b` — 1 info
  - the `cellIds/items/` request property type/format was generalized from `string`/`cell-id` to `string`/``

[Change history](https://skmtc.dev/marimo-team/apis/marimo-api/changes/api/kernel/run/post.md)

---

[API](https://skmtc.dev/marimo-team/apis/marimo-api.md) · [All operations](https://skmtc.dev/marimo-team/apis/marimo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marimo-team/marimo-api/revisions/a39082aac3ce/schema)
