Generate Word, Excel, PowerPoint and PDF with Azure OpenAI
Give your Azure OpenAI agent Doconda's tools and it will deliver finished, editable, reviewed Word, Excel, PowerPoint and PDF files.
Azure runs the model. Doconda builds the file.
Azure provides the model. Doconda provides the finished document.
In a few lines, in Python or TypeScript
Your agent uses Doconda's tools and returns the link to the file.
import json
from doconda import Doconda
from openai import AzureOpenAI
client = AzureOpenAI() # AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, OPENAI_API_VERSION
tools = Doconda().tools()
spec = [{"type": "function", "function": {"name": t.name, "description": t.description,
"parameters": t.input_schema}} for t in tools]
msg = client.chat.completions.create(model="my-deployment", tools=spec, messages=[
{"role": "user", "content": "Write a quarterly sales report in Word"}]).choices[0].message
call = msg.tool_calls[0] # create_document
out = next(t for t in tools if t.name == call.function.name).run(json.loads(call.function.arguments))
out["links"] # {"docx": "https://…", "pdf": "https://…"}How it works
Install the SDK
pip install doconda and your API key.
Give your agent the tools
doconda.tools(), in Azure OpenAI's format.
Your agent delivers the file
Your agent gets the link to the reviewed file.
Frequently asked questions
How do I generate a Word document with Azure OpenAI?
Install the SDK (pip install doconda), pass doconda.tools() as tools in the AzureOpenAI client's chat.completions and run the tool the model asks for. Doconda returns the link to the Word file and its PDF.
Does it work with Azure AI Foundry?
Yes, with any deployment that supports function calling. The tools are standard JSON Schema.
Doesn't Code Interpreter already make files?
It can write a file with code, but differently every time, without real Word styles or a review. Doconda always delivers an editable, reviewed file.
How much does it cost?
Creating a document costs from €0.30, depending on quality; reviewing one, €0.03; reading a file to Markdown is free. You get €5 of credit when you sign up and there is no subscription.