Skip to main content

Save Documents

save()

Save a document from LLM output. Accepts a JSON string or a dict.
Parameters:
ParameterTypeRequiredDescription
contentstr or dictYesJSON string or dict with title and blocks
folder_idstrNoTarget folder ID. Uses root folder if omitted.
Returns: SaveResult

save_raw()

Save a document with explicit parameters instead of parsing LLM output.
Parameters:
ParameterTypeRequiredDescription
titlestrYesDocument title
blockslist[dict]YesList of content blocks
folder_idstrNoTarget folder ID
metadatadictNoDocument-level metadata (source, tags, etc.)
Returns: SaveResult

SaveResult

Both save() and save_raw() return a SaveResult: