estimate_conversion_cost
Estimate credit cost for a document conversion before executing. Returns word count, page estimate, and credit breakdown to prevent insufficient balance errors.
Instructions
Estimate credit cost for a conversion BEFORE running it. Returns word count, page calculation (300 words/page), and a credit breakdown by format and template type. Use this when the user asks 'how much will this cost?' or when you suspect a conversion might exceed their balance — convert_document refuses to run if credits are insufficient, so estimating first is friendlier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Markdown content to estimate credit cost for | |
| templateName | Yes | Template ID or name (UUID for custom templates, name for system templates) | |
| outputFormat | Yes | Output format(s): docx (DOCX only), pdf (DOCX+PDF), html (DOCX+HTML), all/all-formats (DOCX+PDF+HTML) | |
| pageSize | No | Page size for the document | |
| orientation | No | Page orientation |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wordCount | No | Word count of the markdown content | |
| pageCount | No | Estimated page count (300 words/page) | |
| totalCredits | Yes | Total credits required for this conversion | |
| breakdown | No | Human-readable breakdown of how credits are calculated |