Kalpana Docs
Reference

From design to batch

How a template made with Kalpana Designer is filled with rows by Kalpana Batch.

An assistant connected to both servers can design a template and then fill it. A template's ID is the same on both.

sequenceDiagram
    participant User
    participant Agent as Assistant
    participant Designer as Kalpana Designer
    participant Batch as Kalpana Batch

    User->>Agent: A festive sale post, square and story
    Agent->>Designer: create_design, create_layers, check_layout, render_design
    Agent->>Designer: duplicate (story size), set_template_info
    Designer-->>Agent: template_id, page_ids
    Agent->>Batch: get_template_inputs, validate_batch, create_batch
    Batch-->>Agent: A draft batch and its credit cost
    User->>Agent: Yes, run it
    Agent->>Batch: run_batch, get_batch_outputs

What carries over

  • IDs. The designer writes template_id, page_id and flow_id. The batch tools take the same values: a page_id goes in pages, a template_id in templates (or as templateId for get_template_inputs), and a flow_id in flow. They are short text ids such as k7fq2m8a, not UUIDs.
  • Every text and image layer is an input. Its layer name is the input's label, so name layers by what they hold: "Headline", "Price", "Product photo". Rows key a layer by name, or by id when two layers share a name.
  • Each page has its own inputs. In a template with several pages, a row fills one page by prefixing the layer with the page id: k7fq2m8a@title. A plain title fills every page that has that layer, such as a logo shared by all pages.
  • Images. An image placed in a design by its image key from find_images is the same image a batch row names by its asset id or file name.
  • Styled text. Text with several styles takes style tags in rows: its styles are s1, s2, and so on in order of first use, as in <s1>Masala chai, </s1><s2>₹49</s2>.
  • Input descriptions. What set_template_info writes about each input ("Headline: up to 2 lines, about 45 characters") is what get_template_inputs shows the assistant that fills the template.
Was this page helpful?

Updated 9 Nov 2026

On this page