Skip to main content

Python Examples

All examples use the requests library. Install it with pip install requests.

Basic chat with document

Handle response and preserve HTML

Upload document and edit it

Export a document

Supported formats: docx (default), pdf, html, markdown, txt. See Exporting documents for the full options reference and large-document workflows.

Upload attachment and poll for completion

Async job with polling

SSE streaming

HITL approval flow