---
title: "Preview Document with Creator Agent"
method: POST
path: "/document_generation/creator-agent-preview"
tags: ["Document AI — DMS"]
---

# Preview Document with Creator Agent

`POST /document_generation/creator-agent-preview`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/document_generation/creator-agent-preview`
- Auth: HTTP bearer

Let a Creator Agent prepare a document from a free-text request, e.g. "Create a grating quotation for Muster GmbH: 3 pressed gratings 1000 x 500 galvanised". The agent reads its knowledge bases (prices, rules), Relations AI (recipient...

## Request body

- object
  - `agent_id` string, required: Creator Agent ID from po_documents_creator_agents_list.
  - `prompt` string: What to create, with all facts the user gave (recipient, items, quantities, numbers).
  - `variables` object: Known values that must be used as given (they win over the agent).
  - `source_pofid` string: Optional document whose text serves as a fact source (e.g. an inquiry).
  - `workspace_id` integer: Target workspace (default: agent configuration).
  - `locale` string: Locale for numbers, dates and currency (e.g. de_DE).
  - `output` 'pdf' | 'none': none skips the preview PDF.

## Response `200`

Success

- SuccessEnvelope: Success envelope. Payload fields are endpoint-specific (top-level fields, `result`/`job_result` for jobs, `data` on some account endpoints).
  - `status` 'success', required
  - `processing_time` union
    - string
    - number
  - `_billing` object

## Other responses

- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api.md) · [All operations](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/revisions/c6a6228a4509?raw)
