Definition. On-device AI runs a model on the user's own hardware. OfficeAPI supports it by converting Office files into formats a local pipeline can read and by rendering previews, all on the same device and fully offline.
What does OfficeAPI do in this setup?
- Convert the Office file on the device into a format your pipeline reads: PDF, bitmap images (JPEG, PNG, BMP), vector images (SVG, TIFF, EMF), or CSV for spreadsheets.
- Preview the original or a generated document inside your app so the user can see and approve it.
Both steps run offline. OfficeAPI does not upload the file to a conversion service.
Which output format should the model receive?
| You want the model to see | Convert to | Families |
|---|---|---|
| Page layout as an image | JPEG, PNG, or BMP | Word, Excel |
| A single portable document | PDF (vector or image-only) | Word, Excel, PowerPoint |
| Tabular data | CSV | Excel |
| Scalable page graphics | SVG, TIFF, or EMF | Word, Excel |
The full list of 34 input and 15 output formats is in the conversion matrix.
By the numbers
- 42 documented conversion pairs and 32 preview extensions available on the device.
- 6 operating systems: Windows, Linux, macOS, Android, iOS, HarmonyOS.
- 5 named language bindings (Rust, Go, Java, C++, Python) plus process invocation.
- 0 runtime dependencies and 0 files uploaded.
How do you wire OfficeAPI into an on-device AI feature?
- Confirm the input extension is a documented conversion input (for example
.docx,.xlsx,.pptx,.doc,.xls,.ppt). - Choose the output your pipeline reads: PDF, page images, or CSV.
- Call OfficeAPI through the dynamic library or process invocation inside your app.
- Hand the converted file to the model running beside your app.
- Render the source or the generated document with preview so the user can check the result.
On-device versus cloud conversion for AI features
| OfficeAPI on the device | Cloud conversion service | |
|---|---|---|
| Where the document is processed | User's device | Third-party servers |
| Consistent with an on-device model | Yes | No — the file leaves the device |
| Works offline | Yes | No |
| Extra installation | None (zero dependencies) | Network client, credentials |
Where does it run?
OfficeAPI runs on Windows, Linux, macOS, Android, iOS, and HarmonyOS, so the same engine sits beside a desktop or mobile model. It has zero dependencies: no office suite or rendering service needs to be installed on the device.
What does OfficeAPI not do?
OfficeAPI is a document engine. It does not run models, extract semantics, or host an API; it converts and previews documents so that the rest of your on-device pipeline has something it can read.
Frequently asked questions
Does OfficeAPI send documents anywhere for AI processing?
No. Conversion and preview run locally; nothing is uploaded.
Which output is best for a vision model?
Page images (JPEG, PNG, BMP) for Word and Excel documents, or a PDF for any of the three families.
Can the model's generated document be shown to the user?
Yes. If the generated file is a documented preview extension, OfficeAPI renders it inside your app.