---
canonical_url: "https://docs.composio.dev/toolkits/templatefox"
markdown_url: "https://docs.composio.dev/toolkits/templatefox.md"
product: "platform"
version: null
last_updated: null
---

# TemplateFox

TemplateFox generates PDFs and images from templates, manipulates PDFs, manages template versions and S3 storage, and supports AI-assisted template authoring.

- **Category:** documents
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 24
- **Triggers:** 0
- **Slug:** `TEMPLATEFOX`
- **Version:** 00000000_00

## Tools

### Create Template With Agent

**Slug:** `TEMPLATEFOX_CREATE_AGENT_TEMPLATE`

Queue TemplateFox's authoring agent to create an image template from natural-language instructions. This creates account data and costs 25 credits when queued; TemplateFox refunds the credits if the job fails.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name for the new image template (1-100 characters). |
| `brand` | object | No | Optional nested brand guidance for colors, fonts, and public assets. |
| `width` | integer | No | Custom width in pixels (16-8000). Requires height and cannot accompany preset. |
| `height` | integer | No | Custom height in pixels (16-8000). Requires width and cannot accompany preset. |
| `preset` | string ("instagram-square" | "instagram-story" | "og-image" | "twitter-card" | "pinterest-pin" | "square-512") | No | Standard output size. Provide this or both width and height, never both sizing methods. |
| `instructions` | string | Yes | Detailed natural-language design instructions (10-4000 characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Image

**Slug:** `TEMPLATEFOX_CREATE_IMAGE`

Generate a PNG, JPEG, or WebP image from a TemplateFox image template and return a temporary URL or configured S3 location. This consumes 1 credit on success; failed rendering is documented as refunded. Binary output is not exposed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | No | Template variables keyed by the template's declared fields. |
| `width` | integer | No | Output width in pixels (100-4000); height preserves aspect ratio. |
| `format` | string ("png" | "jpeg" | "webp") | No | Output image format. |
| `quality` | integer | No | JPEG or WebP quality from 1-100; ignored for PNG. |
| `version` | string | No | Optional template version tag or number (max 50 characters). |
| `filename` | string | No | Output filename using only letters, digits, underscore, period, and hyphen (max 100 characters). |
| `store_s3` | boolean | No | Store the image in configured S3-compatible storage instead of only returning a temporary URL. This is documented as Business-plan functionality. |
| `s3_bucket` | string | No | Optional valid lowercase S3 bucket override when store_s3 is true. |
| `expiration` | integer | No | Temporary URL lifetime in seconds (60-604800). |
| `s3_filepath` | string | No | Optional S3 object path when store_s3 is true (max 500 characters). |
| `template_id` | string | Yes | Exactly 12-character ID of the image template. |
| `modifications` | array | No | Up to 100 layer edits. Use LIST_TEMPLATE_LAYERS to discover layer names and modifiable properties. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create PDF

**Slug:** `TEMPLATEFOX_CREATE_PDF`

Generate a PDF synchronously from a TemplateFox template and return a temporary URL or configured S3 location. A successful generation consumes 1 credit; TemplateFox documents failed rendering as refunded. Binary output is intentionally not exposed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Template variables keyed by fields declared on the template. Use LIST_TEMPLATE_FIELDS to discover the accepted fields. |
| `version` | string | No | Optional template version tag or number (maximum 50 characters). |
| `filename` | string | No | Output filename without .pdf; use only letters, digits, underscores, periods, and hyphens (maximum 100 characters). |
| `store_s3` | boolean | No | Store the PDF in configured S3-compatible storage instead of returning a temporary URL. This is documented as Business-plan functionality. |
| `s3_bucket` | string | No | Lowercase destination bucket override when store_s3 is true. It must be a valid S3 bucket name. |
| `expiration` | integer | No | Temporary URL lifetime in seconds (60-604800). |
| `pdf_variant` | string ("pdf/a-1b" | "pdf/a-2b" | "pdf/a-3b") | No | Optional archival PDF conformance variant. |
| `s3_filepath` | string | No | Destination object path when store_s3 is true; use only letters, digits, underscores, periods, slashes, and hyphens. |
| `template_id` | string | Yes | Exactly 12-character ID of the PDF template. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create PDF Asynchronously

**Slug:** `TEMPLATEFOX_CREATE_PDF_ASYNC`

Queue PDF generation and return a job ID for polling. This charges 1 credit when queued and is documented to refund permanently failed jobs; webhook delivery is optional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Template variables keyed by the fields declared on the template. |
| `version` | string | No | Optional template version tag or number (max 50 characters). |
| `filename` | string | No | Output filename without .pdf (max 100 characters). |
| `store_s3` | boolean | No | Store the result in configured S3-compatible storage; documented as Business-plan functionality. |
| `s3_bucket` | string | No | Optional valid lowercase S3 bucket override when store_s3 is true. |
| `expiration` | integer | No | Result URL lifetime in seconds (60-604800). |
| `pdf_variant` | string ("pdf/a-1b" | "pdf/a-2b" | "pdf/a-3b") | No | Optional archival PDF conformance variant. |
| `s3_filepath` | string | No | Optional S3 object path when store_s3 is true (max 500 characters). |
| `template_id` | string | Yes | Exactly 12-character ID of the PDF template. |
| `webhook_url` | string | No | Public HTTPS callback URL for job completion (max 2083 characters). |
| `webhook_secret` | string | No | Secret used to HMAC-SHA256-sign webhook delivery; only valid with webhook_url. Treat this value as sensitive. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Template Version

**Slug:** `TEMPLATEFOX_CREATE_TEMPLATE_VERSION`

Create an immutable snapshot of an existing TemplateFox template with a unique lowercase tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | Yes | Unique lowercase version tag. Use letters or digits at both ends and only lowercase letters, digits, underscores, or hyphens inside. |
| `description` | string | No | Optional description of this immutable template snapshot. |
| `template_id` | string | Yes | Exactly 12-character ID of the template to snapshot. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete S3 Configuration

**Slug:** `TEMPLATEFOX_DELETE_S3_CONFIG`

Permanently remove the connected account's saved S3-compatible storage credentials. This destructive operation disables future S3 uploads and cannot be undone. S3 integration is documented as Business-plan functionality, and successful deletion was not live-verified.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Template Version

**Slug:** `TEMPLATEFOX_DELETE_TEMPLATE_VERSION`

Permanently delete one immutable template version. This is destructive and cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | Exactly 12-character ID of the template whose version to delete. |
| `version_number` | integer | Yes | Positive version number to permanently delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extract PDF Pages

**Slug:** `TEMPLATEFOX_EXTRACT_PDF_PAGES`

Extract, reorder, or split selected pages from one PDF and return a temporary result URL. Successful extraction consumes 1 TemplateFox credit.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pages` | string | Yes | 1-indexed page singles and ranges in the desired output order, for example '1-3, 5, 7-9'. |
| `pdf_url` | string | No | Public HTTPS URL of the source PDF. Provide exactly one PDF source: pdf_url or pdf_base64. |
| `filename` | string | No | Result filename without .pdf (maximum 100 characters). |
| `expiration` | integer | No | Result URL lifetime in seconds (60-604800). |
| `pdf_base64` | string | No | Base64-encoded source PDF. Provide exactly one PDF source: pdf_base64 or pdf_url. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Account

**Slug:** `TEMPLATEFOX_GET_ACCOUNT`

Get the connected TemplateFox account identity and remaining credit balance without consuming credits.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Agent Job

**Slug:** `TEMPLATEFOX_GET_AGENT_JOB`

Get an authoring-agent job's status, resulting template ID, preview, charged credits, or failure details. Tier availability is unknown.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `job_id` | string | Yes | UUID returned by CREATE_AGENT_TEMPLATE or REVISE_AGENT_TEMPLATE. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get PDF Job

**Slug:** `TEMPLATEFOX_GET_PDF_JOB`

Get the status, result location, or failure details of an asynchronous PDF generation job.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `job_id` | string | Yes | UUID returned by CREATE_PDF_ASYNC. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get S3 Configuration

**Slug:** `TEMPLATEFOX_GET_S3_CONFIG`

Get the connected account's S3-compatible storage configuration. S3 upload is documented as Business-plan functionality. The returned secret access key is masked and is not usable credential material.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Account Transactions

**Slug:** `TEMPLATEFOX_LIST_ACCOUNT_TRANSACTIONS`

List credit purchases, consumption, refunds, and bonuses one offset page at a time. Positive credit values mean credits consumed; negative values mean credits added.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum transactions to return on this page (1-1000). |
| `offset` | integer | No | Zero-based result offset. Increase it by the number of returned transactions to fetch the next page. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List PDF Jobs

**Slug:** `TEMPLATEFOX_LIST_PDF_JOBS`

List asynchronous PDF generation jobs, optionally filtered by status, one offset page at a time.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum jobs to return on this page (1-100). |
| `offset` | integer | No | Zero-based result offset. Increase it by the number of returned jobs to fetch the next page. |
| `status` | string ("pending" | "processing" | "completed" | "failed") | No | Only return jobs in this state. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Template Fields

**Slug:** `TEMPLATEFOX_LIST_TEMPLATE_FIELDS`

List the dynamic variables a template accepts so an agent can construct valid generation data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | Exactly 12-character template ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Template Layers

**Slug:** `TEMPLATEFOX_LIST_TEMPLATE_LAYERS`

List addressable image-template layers and their modifiable properties for CREATE_IMAGE.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | Exactly 12-character image template ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Templates

**Slug:** `TEMPLATEFOX_LIST_TEMPLATES`

List PDF or image templates belonging to the connected TemplateFox team.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `kind` | string ("pdf" | "image") | No | Only return templates of this kind. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Template Versions

**Slug:** `TEMPLATEFOX_LIST_TEMPLATE_VERSIONS`

List immutable snapshots of a template, including version numbers and optional tags.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | Exactly 12-character ID of the template whose versions to list. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Merge PDFs

**Slug:** `TEMPLATEFOX_MERGE_PDFS`

Concatenate two or more PDFs in the supplied order and return a temporary result URL. Each successful merge consumes 1 TemplateFox credit.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pdfs` | array | Yes | PDFs to concatenate in order; each item must contain exactly one source. |
| `filename` | string | No | Result filename without .pdf (maximum 100 characters). |
| `expiration` | integer | No | Result URL lifetime in seconds (60-604800). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Revise Template With Agent

**Slug:** `TEMPLATEFOX_REVISE_AGENT_TEMPLATE`

Queue TemplateFox's authoring agent to revise an existing image template from feedback. This irreversibly mutates account content and costs 10 credits when queued; TemplateFox refunds the credits if the job fails. Use a template ID returned by the list-templates tool because TemplateFox may return a server error when it cannot verify template access.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `brand` | object | No | Optional nested brand guidance for the revision. |
| `feedback` | string | Yes | Natural-language revision request (5-4000 characters). |
| `template_id` | string | Yes | Exactly 12-character ID of an existing account-owned image template. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rotate PDF

**Slug:** `TEMPLATEFOX_ROTATE_PDF`

Rotate all pages or selected pages in a PDF and return a temporary result URL. Each successful rotation consumes 1 TemplateFox credit.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pdf_url` | string | No | Public HTTPS URL of the source PDF; provide exactly one source field. |
| `filename` | string | No | Result filename without .pdf (maximum 100 characters). |
| `rotation` | integer ("0" | "90" | "180" | "270") | No | Clockwise rotation applied to every page. Provide exactly one of rotation or page_rotations; 0 counts as provided. |
| `expiration` | integer | No | Result URL lifetime in seconds (60-604800). |
| `pdf_base64` | string | No | Base64-encoded source PDF; provide exactly one source field. |
| `page_rotations` | object | No | Map of positive 1-indexed page-number strings to clockwise rotations of 0, 90, 180, or 270. Mutually exclusive with rotation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save and Test S3 Configuration

**Slug:** `TEMPLATEFOX_SAVE_S3_CONFIG`

Create or update the connected account's S3-compatible storage credentials, then test access to the configured bucket. This sensitive Business-plan operation persists third-party credentials in TemplateFox. If validation fails, the credentials remain saved; credential values are never returned.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `bucket_name` | string | Yes | Lowercase S3 bucket name (3-63 characters). Use only letters, digits, periods, and hyphens; it must not resemble an IP address. |
| `endpoint_url` | string | Yes | Absolute HTTPS endpoint of the S3-compatible service (10-200 characters). |
| `access_key_id` | string | Yes | Sensitive third-party S3 access key ID (16-128 characters). It is sent to and persisted by TemplateFox and is never returned by this action. |
| `default_prefix` | string | No | Default object-key prefix (maximum 500 characters). Use only letters, digits, underscores, periods, slashes, and hyphens. |
| `secret_access_key` | string | No | Sensitive third-party S3 secret access key (16-128 characters). Required for initial setup; omit it during an update to retain the saved secret. It is never returned by this action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Template Version

**Slug:** `TEMPLATEFOX_UPDATE_TEMPLATE_VERSION`

Change or clear the tag and/or description metadata of a template version; the immutable snapshot content is not changed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | New lowercase tag, or null to clear it. Omit this field to leave the tag unchanged. |
| `description` | string | No | New version description, or null to clear it. Omit this field to leave the description unchanged. |
| `template_id` | string | Yes | Exactly 12-character ID of the template whose version to update. |
| `version_number` | integer | Yes | Positive version number returned by listing or creating template versions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Validate S3 Configuration

**Slug:** `TEMPLATEFOX_VALIDATE_S3_CONFIG`

Validate that TemplateFox can access and write a small test object to the configured S3-compatible bucket without changing the saved credentials. Use this after SAVE_S3_CONFIG reports that credentials were saved but validation was interrupted. S3 integration is documented as Business-plan functionality.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
