GET /v1/template-expandExpand templates with variable substitution
Text Utils lf-text-utils
Fills variables into a text template to produce the finished message. Expand templates with variable substitution
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
template | string | Yes | Template with {{placeholders}} |
values | string | No | JSON object of values |
Response Schema
expanded (string): Substituted text
variables_used (array): Variables replaced
variables_missing (array): Unresolved variables
cURL Example
curl 'https://lf-text-utils.laminarforge.dev/v1/template-expand?template=<template>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-text-utils.laminarforge.dev/v1/template-expand'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'template': '<template>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())