APITemplate.io MCP by usefulapi
v1.27.4Generate PDFs and images with APITemplate.io from templates, HTML, Markdown or a URL.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
apitemplate_get_account Get account and quota
The APITemplate.io account behind this key: plan, subscription status and period, and the quota: api_quota, api_used, api_remaining (generations), plus the template quota and count. Check api_remaining before generating. GET /v2/account-information.
apitemplate_list_templates List templates
List the templates of the account (PDF and image): template_id, name, format (PDF or JPEG), status, group and dates. Use the template_id with the create tools. Read-only; templates are never changed. GET /v2/list-templates.
| Parameter | Type | Description |
|---|---|---|
format | string | Only PDF or only image (JPEG) templates. |
group_name | string | Only templates of this group. |
limit | integer | Number of records, 1-500 (default 50). |
offset | integer | Records to skip (default 0). Next page: offset + limit. |
template_id | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
apitemplate_get_template Get PDF template source
One PDF template's HTML body, CSS and print settings (the vendor marks this endpoint experimental, so it can answer with an error for some accounts or image templates). Read-only. GET /v2/get-template.
| Parameter | Type | Description |
|---|---|---|
template_id * | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
apitemplate_list_objects List generated files
List the PDFs and images generated so far, newest first: transaction_ref, template_id, type (PDF, JPEG or MERGE), your meta reference, the hosted file URLs (primary_url, secondary_url for the PNG) and dates. Files already deleted or expired have deletion_status set. Read-only. GET /v2/list-objects.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of records, 1-500 (default 50). |
offset | integer | Records to skip (default 0). Next page: offset + limit. |
template_id | string | Only files generated from this template. |
transaction_type | string | Only this kind of file. |
apitemplate_create_pdf Create a PDF from a template
WRITE: renders one PDF from a saved PDF template and your JSON data (the keys the template uses, e.g. invoice_number, items), and returns the hosted download_url (never the file bytes). Synchronous. COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-pdf (export_type=json).
| Parameter | Type | Description |
|---|---|---|
data * | object | JSON data merged into the template, e.g. {"invoice_number":"INV-1","total":42}. Keys depend on the template. |
template_id * | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
filename | string | Custom file name ending in .pdf (default: a random UUID). |
generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
output_html | boolean | Also return html_url, the rendered HTML. |
apitemplate_create_image Create an image from a template
WRITE: renders one image (JPEG and PNG) from a saved image template, changing the named layers with overrides (e.g. [{"name":"text_1","text":"Hello"},{"name":"image_1","src":"https://..."}]), and returns the hosted download URLs (never the file bytes). COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-image.
| Parameter | Type | Description |
|---|---|---|
overrides * | array | Layer changes: each item has the layer 'name' and the properties to set (text, src, color, textBackgroundColor ...). |
template_id * | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
output_image_type | string | Which formats to render (default all). |
apitemplate_create_pdf_from_html Create a PDF from HTML
WRITE: renders one PDF from HTML (Jinja2 placeholders like {{name}} are filled from data), without a saved template, and returns the hosted download_url (never the file bytes). COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-pdf-from-html (export_type=json).
| Parameter | Type | Description |
|---|---|---|
body * | string | HTML body; may use Jinja2 syntax such as {{name}}. |
css | string | CSS including the <style> tag. |
data | object | Values for the placeholders in body, e.g. {"name":"Jo"}. |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
filename | string | Custom file name ending in .pdf (default: a random UUID). |
generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
settings | object | PDF print settings. |
apitemplate_create_pdf_from_markdown Create a PDF from Markdown
WRITE: renders one PDF from Markdown (Jinja2 placeholders like {{lang}} are filled from data) and returns the hosted download_url (never the file bytes). COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-pdf-from-markdown (export_type=json).
| Parameter | Type | Description |
|---|---|---|
body * | string | Markdown text; may use Jinja2 syntax such as {{lang}}. |
css | string | CSS including the <style> tag. |
data | object | Values for the placeholders in body. |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
filename | string | Custom file name ending in .pdf (default: a random UUID). |
generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
settings | object | PDF print settings. |
apitemplate_create_pdf_from_url Create a PDF from a web page URL
WRITE: APITemplate.io opens one public web page URL and prints it to a PDF, and returns the hosted download_url (never the file bytes). The page is fetched by APITemplate.io, not by this server; pages that need a login cannot be printed. COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/create-pdf-from-url (export_type=json).
| Parameter | Type | Description |
|---|---|---|
url * | string | The public http(s) URL of the page to print. |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
filename | string | Custom file name ending in .pdf (default: a random UUID). |
generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
settings | object | PDF print settings. |
apitemplate_merge_pdfs Merge PDFs
WRITE: joins 2-20 PDFs (public http(s) URLs, in the given order, e.g. earlier download_url values) into one PDF and returns the hosted primary_url (never the file bytes). The source files are not changed or deleted. COST: uses 1 generation of your APITemplate.io plan quota per call (see apitemplate_get_account). Do not retry or repeat it unless needed; every call is counted. POST /v2/merge-pdfs (export_type=json).
| Parameter | Type | Description |
|---|---|---|
urls * | array | The PDF URLs to join, in order. |
expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-43200. |
meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |