> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/document-ai/document-ai-1/document-generation.md).

# Document Generation

Document Generation turns structured section data into a finished DOCX report — for example, a credit memo or financial summary built from [Document Extraction](/document-ai/document-ai-1/document-extraction.md) and [Document Classification](/document-ai/document-ai-1/document-classification.md) results. This page covers the end-user surface: submitting a generation job, tracking its status, and reviewing or downloading the result. Report templates and section authoring are configured separately and aren't covered here.

In the UI, Document Generation lives under **Capabilities > Generation** (also reachable from the Home dashboard's Start Something card).

<figure><img src="/files/Z9LXil6SOkCtHrWa4A38" alt=""><figcaption></figcaption></figure>

| Capability           | Description                                                                                       | Limit                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| Generate a report    | Submit section data to produce a DOCX report                                                      | 1 section minimum; section keys must be unique within a request |
| Track job status     | Poll or view a generation job's progress                                                          | —                                                               |
| Download             | Download the finished DOCX                                                                        | 15 MB max download size                                         |
| Signed URL retrieval | Get a time-limited link to the generated document                                                 | 1–168 hours (default 24)                                        |
| List generations     | Browse past generations for the account; search by title, ID, or request ID, and filter by status | 100 results max per page (default 20)                           |
| Webhook notification | Get notified when a job completes                                                                 | Optional, via `webhookUrl` on the request                       |

{% hint style="info" %}
Only DOCX output is supported currently.
{% endhint %}

### Workflow

1. **Submit** — send section data (title, content blocks, styling) to start a generation job.
2. **Processing** — the job moves from `Pending` to `Processing`. Up to 3 retries happen automatically if a processing attempt fails.
3. **Result** — the job reaches `Processed` (with the file ready to download) or `Failed` (with an error message and structured error details).
4. **Review** — open the generation from the list to see its status, metadata, and a preview.
5. **Download** — download the DOCX directly, or request a signed URL to share a time-limited link.

```
Pending → Processing → Processed
                     → Failed
```

Confirmed for all four roles (Owner, Admin, Member, Viewer): the Document Generations list is fully visible, showing the same empty state for each. Since the **Create Generation** button is a placeholder (see below), job creation itself couldn't be role-tested through the UI.

{% hint style="warning" %} <mark style="color:$warning;">In the current build, the UI's</mark> <mark style="color:$warning;">**Create Generation**</mark> <mark style="color:$warning;">button does not open a form or navigate anywhere — it appears to be a placeholder, with job submission only reachable via the</mark> <mark style="color:$warning;">`POST /document-generations/`</mark> <mark style="color:$warning;">endpoint below.</mark>
{% endhint %}

### Related pages

* [Document Extraction](/document-ai/document-ai-1/document-extraction.md) provides the structured source data most generation jobs depend on.
* [Webhooks & Integrations](/document-ai/document-ai-1/webhooks-and-integrations.md) notifies downstream systems when a generation finishes.
* [Workspace](/document-ai/document-ai-1/workspace.md) gives operators a quick entry point into generation and job monitoring.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uptiq.ai/document-ai/document-ai-1/document-generation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
