Welcome to Agent Office API
Agent Office API allows you to programmatically edit Microsoft Word and PDF documents using AI. Upload documents, apply edits via natural language instructions, and download the modified files.Base URL
All API requests should be made to:Authentication
All API endpoints require authentication using a Bearer token. You can generate API keys from your Agent Office Dashboard.Keep your API keys secure and never share them publicly. API keys should be
stored as environment variables.
Using Your API Key
Include your API key in theAuthorization
header of every request:
Example Authentication
Request Latency
Most document edits complete in under 5 seconds. Response times vary based on document complexity and edit instructions.Pro and Enterprise users benefit from dedicated infrastructure with faster
request processing and priority queue handling for optimal performance.
Error Handling
The API uses standard HTTP status codes:Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Check your request parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - API key doesn’t have access |
404 | Not Found - Resource doesn’t exist |
422 | Validation Error - Request body validation failed |
500 | Server Error - Something went wrong on our end |
API Workflow
- Upload Document - Upload a Word (.docx) or PDF file to create a document
- Apply Edits - Send natural language instructions to edit the document
- Download Result - Get a presigned URL to download the edited document
Documents are automatically stored for 1 hour (configurable) and the TTL is
refreshed after each edit.
Supported File Types
- Microsoft Word (.docx)
- PDF (.pdf)
- Maximum file size: 10MB