Save Documents
save()
Save a document from LLM output. Accepts a JSON string or a dict.| Parameter | Type | Required | Description |
|---|---|---|---|
content | str or dict | Yes | JSON string or dict with title and blocks |
folder_id | str | No | Target folder ID. Uses root folder if omitted. |
SaveResult
save_raw()
Save a document with explicit parameters instead of parsing LLM output.| Parameter | Type | Required | Description |
|---|---|---|---|
title | str | Yes | Document title |
blocks | list[dict] | Yes | List of content blocks |
folder_id | str | No | Target folder ID |
metadata | dict | No | Document-level metadata (source, tags, etc.) |
SaveResult
SaveResult
Bothsave() and save_raw() return a SaveResult: