Generate PDFs and images with APITemplate.io from templates, HTML, Markdown or a URL.
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
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.
Layer changes: each item has the layer 'name' and the properties to set (text, src, color, textBackgroundColor ...).
The template id (apitemplate_list_templates, or the web console, Manage Templates).
Your own reference id for this file; it shows up in apitemplate_list_objects.
Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080.
Milliseconds to wait before rendering (0-30000), for pages that load content late.
Which formats to render (default all).
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
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.
| Argument | Type | Description |
|---|---|---|
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| overrides* | array | Layer changes: each item has the layer 'name' and the properties to set (text, src, color, textBackgroundColor ...). |
| expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
| template_id* | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
| generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
| output_image_type | string | Which formats to render (default all). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"template_id",
"overrides"
],
"properties": {
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"overrides": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Layer name in the template, e.g. text_1."
}
},
"additionalProperties": {}
},
"maxItems": 100,
"minItems": 1,
"description": "Layer changes: each item has the layer 'name' and the properties to set (text, src, color, textBackgroundColor ...)."
},
"expiration": {
"type": "integer",
"maximum": 10080,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080."
},
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "The template id (apitemplate_list_templates, or the web console, Manage Templates)."
},
"generation_delay": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late."
},
"output_image_type": {
"enum": [
"all",
"jpegOnly",
"pngOnly"
],
"type": "string",
"description": "Which formats to render (default all)."
}
}
}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).
| Argument | Type | Description |
|---|---|---|
| data* | object | JSON data merged into the template, e.g. {"invoice_number":"INV-1","total":42}. Keys depend on the template. |
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| filename | string | Custom file name ending in .pdf (default: a random UUID). |
| expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080. |
| output_html | boolean | Also return html_url, the rendered HTML. |
| template_id* | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
| generation_delay | integer | Milliseconds to wait before rendering (0-30000), for pages that load content late. |
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).
| Argument | Type | Description |
|---|---|---|
| css | string | CSS including the <style> tag. |
| body* | string | HTML body; may use Jinja2 syntax such as {{name}}. |
| data | object | Values for the placeholders in body, e.g. {"name":"Jo"}. |
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| filename | string | Custom file name ending in .pdf (default: a random UUID). |
| settings | object | PDF print settings. |
| 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. |
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).
| Argument | Type | Description |
|---|---|---|
| css | string | CSS including the <style> tag. |
| body* | string | Markdown text; may use Jinja2 syntax such as {{lang}}. |
| data | object | Values for the placeholders in body. |
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| filename | string | Custom file name ending in .pdf (default: a random UUID). |
| settings | object | PDF print settings. |
| 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. |
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).
| Argument | Type | Description |
|---|---|---|
| url* | string | The public http(s) URL of the page to print. |
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| filename | string | Custom file name ending in .pdf (default: a random UUID). |
| settings | object | PDF print settings. |
| 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "The public http(s) URL of the page to print."
},
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"filename": {
"type": "string",
"pattern": "^[\\w .()-]+\\.pdf$",
"maxLength": 150,
"minLength": 1,
"description": "Custom file name ending in .pdf (default: a random UUID)."
},
"settings": {
"type": "object",
"properties": {
"margin_top": {
"type": "string",
"maxLength": 10,
"description": "Top margin, e.g. '40' (the vendor reference says mm)."
},
"paper_size": {
"enum": [
"Letter",
"Legal",
"Tabloid",
"Ledger",
"A0",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"custom"
],
"type": "string",
"description": "Paper size; 'custom' needs custom_width and custom_height."
},
"margin_left": {
"type": "string",
"maxLength": 10,
"description": "Left margin."
},
"orientation": {
"enum": [
"1",
"2"
],
"type": "string",
"description": "1 = portrait, 2 = landscape."
},
"custom_width": {
"type": "string",
"maxLength": 20,
"description": "Width for paper_size custom, with a unit (mm, px or cm), e.g. 210mm."
},
"margin_right": {
"type": "string",
"maxLength": 10,
"description": "Right margin."
},
"custom_footer": {
"type": "string",
"maxLength": 20000,
"description": "Footer HTML (with its CSS)."
},
"custom_header": {
"type": "string",
"maxLength": 20000,
"description": "Header HTML (with its CSS)."
},
"custom_height": {
"type": "string",
"maxLength": 20,
"description": "Height for paper_size custom, with a unit (mm, px or cm), e.g. 297mm."
},
"margin_bottom": {
"type": "string",
"maxLength": 10,
"description": "Bottom margin."
},
"header_font_size": {
"type": "string",
"maxLength": 10,
"description": "Header font size, e.g. '9px'."
},
"print_background": {
"enum": [
"0",
"1"
],
"type": "string",
"description": "1 = print background colors and images."
},
"preferCSSPageSize": {
"type": "boolean",
"description": "Let the CSS @page rule set page size and orientation (engine 153 only)."
},
"displayHeaderFooter": {
"type": "boolean",
"description": "Show the header and footer."
},
"rendering_engine_version": {
"enum": [
"97",
"153"
],
"type": "string",
"description": "Rendering engine: 153 (default) or 97 (legacy)."
}
},
"description": "PDF print settings."
},
"expiration": {
"type": "integer",
"maximum": 10080,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080."
},
"generation_delay": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late."
}
}
}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.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}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.
| Argument | Type | Description |
|---|---|---|
| template_id* | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"template_id"
],
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "The template id (apitemplate_list_templates, or the web console, Manage Templates)."
}
}
}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.
| Argument | 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 500,
"minimum": 1,
"description": "Number of records, 1-500 (default 50)."
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Records to skip (default 0). Next page: offset + limit."
},
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "Only files generated from this template."
},
"transaction_type": {
"enum": [
"PDF",
"JPEG",
"MERGE"
],
"type": "string",
"description": "Only this kind of file."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Number of records, 1-500 (default 50). |
| format | string | Only PDF or only image (JPEG) templates. |
| offset | integer | Records to skip (default 0). Next page: offset + limit. |
| group_name | string | Only templates of this group. |
| template_id | string | The template id (apitemplate_list_templates, or the web console, Manage Templates). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 500,
"minimum": 1,
"description": "Number of records, 1-500 (default 50)."
},
"format": {
"enum": [
"PDF",
"JPEG"
],
"type": "string",
"description": "Only PDF or only image (JPEG) templates."
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Records to skip (default 0). Next page: offset + limit."
},
"group_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Only templates of this group."
},
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "The template id (apitemplate_list_templates, or the web console, Manage Templates)."
}
}
}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).
| Argument | Type | Description |
|---|---|---|
| meta | string | Your own reference id for this file; it shows up in apitemplate_list_objects. |
| urls* | array | The PDF URLs to join, in order. |
| expiration | integer | Minutes until the hosted file expires: 0 = keep permanently (default), or 1-43200. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"urls"
],
"properties": {
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"urls": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048
},
"maxItems": 20,
"minItems": 2,
"description": "The PDF URLs to join, in order."
},
"expiration": {
"type": "integer",
"maximum": 43200,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-43200."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"template_id",
"data"
],
"properties": {
"data": {
"type": "object",
"description": "JSON data merged into the template, e.g. {\"invoice_number\":\"INV-1\",\"total\":42}. Keys depend on the template.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"filename": {
"type": "string",
"pattern": "^[\\w .()-]+\\.pdf$",
"maxLength": 150,
"minLength": 1,
"description": "Custom file name ending in .pdf (default: a random UUID)."
},
"expiration": {
"type": "integer",
"maximum": 10080,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080."
},
"output_html": {
"type": "boolean",
"description": "Also return html_url, the rendered HTML."
},
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "The template id (apitemplate_list_templates, or the web console, Manage Templates)."
},
"generation_delay": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"body"
],
"properties": {
"css": {
"type": "string",
"maxLength": 200000,
"description": "CSS including the <style> tag."
},
"body": {
"type": "string",
"maxLength": 1000000,
"minLength": 1,
"description": "HTML body; may use Jinja2 syntax such as {{name}}."
},
"data": {
"type": "object",
"description": "Values for the placeholders in body, e.g. {\"name\":\"Jo\"}.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"filename": {
"type": "string",
"pattern": "^[\\w .()-]+\\.pdf$",
"maxLength": 150,
"minLength": 1,
"description": "Custom file name ending in .pdf (default: a random UUID)."
},
"settings": {
"type": "object",
"properties": {
"margin_top": {
"type": "string",
"maxLength": 10,
"description": "Top margin, e.g. '40' (the vendor reference says mm)."
},
"paper_size": {
"enum": [
"Letter",
"Legal",
"Tabloid",
"Ledger",
"A0",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"custom"
],
"type": "string",
"description": "Paper size; 'custom' needs custom_width and custom_height."
},
"margin_left": {
"type": "string",
"maxLength": 10,
"description": "Left margin."
},
"orientation": {
"enum": [
"1",
"2"
],
"type": "string",
"description": "1 = portrait, 2 = landscape."
},
"custom_width": {
"type": "string",
"maxLength": 20,
"description": "Width for paper_size custom, with a unit (mm, px or cm), e.g. 210mm."
},
"margin_right": {
"type": "string",
"maxLength": 10,
"description": "Right margin."
},
"custom_footer": {
"type": "string",
"maxLength": 20000,
"description": "Footer HTML (with its CSS)."
},
"custom_header": {
"type": "string",
"maxLength": 20000,
"description": "Header HTML (with its CSS)."
},
"custom_height": {
"type": "string",
"maxLength": 20,
"description": "Height for paper_size custom, with a unit (mm, px or cm), e.g. 297mm."
},
"margin_bottom": {
"type": "string",
"maxLength": 10,
"description": "Bottom margin."
},
"header_font_size": {
"type": "string",
"maxLength": 10,
"description": "Header font size, e.g. '9px'."
},
"print_background": {
"enum": [
"0",
"1"
],
"type": "string",
"description": "1 = print background colors and images."
},
"preferCSSPageSize": {
"type": "boolean",
"description": "Let the CSS @page rule set page size and orientation (engine 153 only)."
},
"displayHeaderFooter": {
"type": "boolean",
"description": "Show the header and footer."
},
"rendering_engine_version": {
"enum": [
"97",
"153"
],
"type": "string",
"description": "Rendering engine: 153 (default) or 97 (legacy)."
}
},
"description": "PDF print settings."
},
"expiration": {
"type": "integer",
"maximum": 10080,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080."
},
"generation_delay": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"body"
],
"properties": {
"css": {
"type": "string",
"maxLength": 200000,
"description": "CSS including the <style> tag."
},
"body": {
"type": "string",
"maxLength": 1000000,
"minLength": 1,
"description": "Markdown text; may use Jinja2 syntax such as {{lang}}."
},
"data": {
"type": "object",
"description": "Values for the placeholders in body.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"meta": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Your own reference id for this file; it shows up in apitemplate_list_objects."
},
"filename": {
"type": "string",
"pattern": "^[\\w .()-]+\\.pdf$",
"maxLength": 150,
"minLength": 1,
"description": "Custom file name ending in .pdf (default: a random UUID)."
},
"settings": {
"type": "object",
"properties": {
"margin_top": {
"type": "string",
"maxLength": 10,
"description": "Top margin, e.g. '40' (the vendor reference says mm)."
},
"paper_size": {
"enum": [
"Letter",
"Legal",
"Tabloid",
"Ledger",
"A0",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"custom"
],
"type": "string",
"description": "Paper size; 'custom' needs custom_width and custom_height."
},
"margin_left": {
"type": "string",
"maxLength": 10,
"description": "Left margin."
},
"orientation": {
"enum": [
"1",
"2"
],
"type": "string",
"description": "1 = portrait, 2 = landscape."
},
"custom_width": {
"type": "string",
"maxLength": 20,
"description": "Width for paper_size custom, with a unit (mm, px or cm), e.g. 210mm."
},
"margin_right": {
"type": "string",
"maxLength": 10,
"description": "Right margin."
},
"custom_footer": {
"type": "string",
"maxLength": 20000,
"description": "Footer HTML (with its CSS)."
},
"custom_header": {
"type": "string",
"maxLength": 20000,
"description": "Header HTML (with its CSS)."
},
"custom_height": {
"type": "string",
"maxLength": 20,
"description": "Height for paper_size custom, with a unit (mm, px or cm), e.g. 297mm."
},
"margin_bottom": {
"type": "string",
"maxLength": 10,
"description": "Bottom margin."
},
"header_font_size": {
"type": "string",
"maxLength": 10,
"description": "Header font size, e.g. '9px'."
},
"print_background": {
"enum": [
"0",
"1"
],
"type": "string",
"description": "1 = print background colors and images."
},
"preferCSSPageSize": {
"type": "boolean",
"description": "Let the CSS @page rule set page size and orientation (engine 153 only)."
},
"displayHeaderFooter": {
"type": "boolean",
"description": "Show the header and footer."
},
"rendering_engine_version": {
"enum": [
"97",
"153"
],
"type": "string",
"description": "Rendering engine: 153 (default) or 97 (legacy)."
}
},
"description": "PDF print settings."
},
"expiration": {
"type": "integer",
"maximum": 10080,
"minimum": 0,
"description": "Minutes until the hosted file expires: 0 = keep permanently (default), or 1-10080."
},
"generation_delay": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Milliseconds to wait before rendering (0-30000), for pages that load content late."
}
}
}