> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Test Document Generation Without Consuming Credits

You can specify the parameter "testing" in the payload to generate a document preview without counting the generation as part of your monthly usage. This option will add a large PREVIEW watermark across your document. This will allow you to generate and preview test documents without worrying about your monthly usage increase. Please find this option in our [API v4 documentation](https://docs.pdfgeneratorapi.com/v4/#tag/Documents/operation/generateDocument). 

**Example payload**

```json
{
    "template": {
        "id": 123412,
        "data": {
            "Name": "John Smith"
        }
    },
    "format": "pdf",
    "output": "file",
    "name": "preview-20230325-CYM6VQ-711120426.pdf",
    "testing": true
}
```

**Result**

![Preview result](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot-2024-12-11-083958_1idsufv.png)
---
### Related articles you may find helpful

* [Common use-cases of the Expression language](https://support.pdfgeneratorapi.com/en/article/common-use-cases-of-the-expression-language-1seclga/)
* [How Credit Usage Is Calculated](/en/article/how-credit-usage-is-calculated-5820vc/)
* [Table component](https://support.pdfgeneratorapi.com/en/article/table-component-1fuaafc/)
