Agentic Platform
Documentation API reference Tools Skills

Tools

Template Generator

template_generator

Generate a template based on HTML structure and available variables.

Playground

Your organization, project and token stay in this browser's local storage and are sent straight to the API — this page never sees them.

POST
item
url required An example URL of the page to generate the template for.
template_engine Template engine to target (nunjucks or liquid)
element_type Type of element for which to generate the template. Can be one of: title, description, h1, canonical or customHtml.
variables_description required Describe the available variables and their structure.
template_requirements required Describe what you want to generate in the template.

Billing

Fixed cost per item requested, plus whatever fetching each sample page costs and one model call that writes the template. The cost grows with the number of sample pages you pass.

These usage SKUs can be charged on a call, including SKUs from tools this one may call.

SKU Credits Description Used by
Tool call 1 per request Charged once per successful item, on top of any usage below.
  • This tool
GPT-5 mini (flex), input 125 per million tokens Tokens the model reads from the prompt you send.
  • This tool
GPT-5 mini (flex), output 1,000 per million tokens Tokens the model writes in its answer.
  • This tool
GPT-5 mini (flex), read from cache 12.5 per million tokens Tokens the model reads from a cached prompt. Cheaper than a fresh read.
  • This tool
GPT-5 mini (standard), input 250 per million tokens Tokens the model reads from the prompt you send.
  • This tool
GPT-5 mini (standard), output 2,000 per million tokens Tokens the model writes in its answer.
  • This tool
GPT-5 mini (standard), read from cache 25 per million tokens Tokens the model reads from a cached prompt. Cheaper than a fresh read.
  • This tool
Live page fetch 495 per 1,000 page Fetches a page from the live web as an ordinary visitor would.
Live page fetch, hard-blocked page 7,425 per 1,000 page A page that refused every gentler attempt. Charged on top of them, so a hard-blocked page costs the whole sequence.
Live page fetch, protected page 2,475 per 1,000 page A page that refused an ordinary fetch and had to be retried. Charged on top of the ordinary attempt, not instead of it.

Schemas

item is what you send, config how the tool behaves, and the response is what you get back.

Item

object
Properties
url string required

An example URL of the page to generate the template for.

template_engine string

Template engine to target (nunjucks or liquid)

Values: nunjucks liquid

Default: "nunjucks"

element_type string

Type of element for which to generate the template. Can be one of: title, description, h1, canonical or customHtml.

Values: title description h1 canonical customHtml

Default: "customHtml"

variables_description string (textarea) required

Describe the available variables and their structure.

template_requirements string (textarea) required

Describe what you want to generate in the template.

Example
{
  "url": "string",
  "template_engine": "nunjucks",
  "element_type": "customHtml",
  "variables_description": "string",
  "template_requirements": "string"
}

Response

object
Properties
template string required

The template code

explanation string required

A brief explanation of the template

Example
{
  "template": "string",
  "explanation": "string"
}

Endpoints

POST http://agents.botify.com/{organization}/{project}/template_generator/process
POST http://agents.botify.com/{organization}/{project}/template_generator/batch_process
POST http://agents.botify.com/{organization}/{project}/template_generator/async_process
POST http://agents.botify.com/{organization}/{project}/template_generator/async_batch_process

See running a long job in the background for the polling flow.

cURL

curl -X POST "http://agents.botify.com/{organization}/{project}/template_generator/process" \
  -H "Authorization: Bearer $BOTIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "item": {
    "url": "<url>",
    "variables_description": "<variables_description>",
    "template_requirements": "<template_requirements>"
  }
}'

Raw metadata