# First request — starts a new session
curl -X POST https://api.superdocs.app/v1/chat \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Add an introduction section",
"session_id": "project-proposal-v1",
"document_html": "<h1>Project Proposal</h1>"
}'
# Second request — continues the same session
curl -X POST https://api.superdocs.app/v1/chat \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Now add a budget section",
"session_id": "project-proposal-v1",
"document_html": "<div data-chunk-id=\"...\">...updated HTML from previous response...</div>"
}'