+

Generate Word, Excel, PowerPoint and PDF
with Claude

Code

Python or TypeScript

Claude writes. Doconda lays it out.

Give Claude Doconda's tools and it delivers finished, editable, reviewed Word, Excel, PowerPoint and PDF files, from the API, Claude Code or Claude Desktop.

  1. 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
  2. 02Give your agent the toolsDoconda's tools, in Claude's format.
  3. 03Your agent delivers the fileYour agent gets the link to the reviewed file.
import json
import anthropic
from doconda import Doconda

claude = anthropic.Anthropic()
tools = Doconda().tools()
specs = [{"name": t.name, "description": t.description, "input_schema": t.input_schema} for t in tools]
messages = [{"role": "user", "content": "Prepare a short report on remote work in Word"}]

while True:
    res = claude.messages.create(model="claude-sonnet-5-5", max_tokens=4096, tools=specs, messages=messages)
    messages.append({"role": "assistant", "content": res.content})
    if res.stop_reason != "tool_use":
        break
    messages.append({"role": "user", "content": [
        {"type": "tool_result", "tool_use_id": b.id,
         "content": json.dumps(next(t for t in tools if t.name == b.name).run(b.input))}
        for b in res.content if b.type == "tool_use"
    ]})

print("".join(b.text for b in res.content if b.type == "text"))

FAQ

Common questions

01 / 04

How do I generate a Word file with the Claude API?

Install the SDK (pip install doconda or npm install @doconda/sdk) and give doconda.tools() to Claude as tools; in TypeScript they fit the tool runner directly. Doconda returns the link to the Word file and its PDF.

The document API for AI agents, ready for production.