documents
API Template IO CLI for Headless Automation
Use the API Template IO CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
5 functions 3 read 2 write API key auth
API Template IO CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The API Template IO CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# API Template IO CLI for Headless Automation
kosmokrator integrations:configure apitemplateio --set api_key="$APITEMPLATEIO_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call apitemplateio.apitemplateio_create_pdf '{"template_id":"example_template_id","data":"example_data","output_html":true,"expire":1,"meta":"example_meta"}' --json Discovery Before Execution
Agents and scripts can inspect API Template IO docs and schemas before choosing a function.
kosmo integrations:docs apitemplateio --json
kosmo integrations:docs apitemplateio.apitemplateio_create_pdf --json
kosmo integrations:schema apitemplateio.apitemplateio_create_pdf --json
kosmo integrations:search "API Template IO" --json
kosmo integrations:list --json Useful API Template IO CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
apitemplateio.apitemplateio_create_pdf | Write | template_id, data, output_html, expire, meta | Generate a PDF document from an API Template IO template. Provide a template ID and the data to merge into the template. |
apitemplateio.apitemplateio_create_image | Write | template_id, data, output_format, output_html, expire, meta | Generate an image (PNG or JPEG) from an API Template IO template. Provide a template ID, data, and the desired output format. |
apitemplateio.apitemplateio_list_templates | Read | limit, offset, filter | List available templates in API Template IO. Returns a paginated list of template IDs, names, and metadata. |
apitemplateio.apitemplateio_get_template | Read | template_id | Get details for a specific API Template IO template by ID. Returns the template definition, schema, and configuration. |
apitemplateio.apitemplateio_get_current_user | Read | none | Get the current authenticated user's account information from API Template IO, including usage and subscription details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.