Deepnote research: our notes on building agents
Get started
All endpoint groups

Deepnote Public API v2

Sessions API

Long-lived interactive sessions for running notebooks and blocks.

Base URL

https://api.deepnote.com/v2

Create an interactive session

Creates an interactive session that runs the specified notebook and stays alive to accept further submissions. The session ends after a period of inactivity.

post/sessions

Request body

required
application/jsonobject
notebookIdrequiredstring

ID of the source notebook the session is anchored to.

inputsobject

Input values for the initial run, keyed by input block `name`. Same shape as `POST /v2/runs`.

storageMode"read_write" | "readonly"

Storage mode for the session. `read_write` (default) allows the session to write to project storage. `readonly` makes project storage read-only for the session; the session can still create temporary files.

Responses

202Session created with initial run
application/jsonCreateSessionResponse
sessionrequiredSession
runrequiredobject
400Validation error
application/jsonErrorResponse
messagerequiredstring
401Unauthorized
application/jsonErrorResponse
messagerequiredstring
403Insufficient permissions, or sessions are not enabled for this workspace
application/jsonErrorResponse
messagerequiredstring
404Notebook not found
application/jsonErrorResponse
messagerequiredstring
409Project is suspended
application/jsonErrorResponse
messagerequiredstring
500Hardware unable to start
application/jsonErrorResponse
messagerequiredstring