Inline Parameters
Replace placeholders like {{name}} inside text elements without replacing the entire text content
Inline parameters let you insert dynamic values into specific parts of a text element. Instead of replacing the entire text, you write placeholders like {{name}} and pass values for each one at render time.
This is useful when your text has a fixed structure but certain words change per render — names, dates, prices, locations, or any variable data embedded in a sentence.
How It Works#
- Write placeholders in your text element using double curly braces:
{{paramName}} - Set a Parameter ID on the element (e.g.,
heading) - Pass values via the API using colon notation:
"heading:paramName": "value"
The placeholders get replaced with your values. Everything else in the text stays as-is.
Example#
Say you have a text element with Parameter ID greeting and this content:
Hello {{name}}, welcome to {{city}}!Pass these modifications in your API request:
{
"modifications": {
"greeting:name": "Sarah",
"greeting:city": "New York"
}
}The rendered output becomes: Hello Sarah, welcome to New York!
Setting Up Inline Parameters#
1. Add placeholders to your text#
In Orshot Studio, select a text element and write your content with {{paramName}} where you want dynamic values:
Invoice #{{invoice_id}} — Due: {{due_date}}Placeholder names can contain letters, numbers, hyphens, and underscores.
2. Parameterize the element#
Open the API tab in the sidebar, toggle Parameterize on, and set a Parameter ID (e.g., invoice-header).
3. Pass values via the API#
Use colon notation — parameterId:placeholderName — to set each value:
{
"templateId": "<YOUR_TEMPLATE_ID>",
"modifications": {
"invoice-header:invoice_id": "INV-2024-0042",
"invoice-header:due_date": "May 15, 2025"
},
"response": {
"format": "png",
"type": "url"
}
}Combining with Full Text Replacement#
You can replace the entire text content AND fill inline parameters in the same request. The full text replacement happens first, then inline parameters are resolved.
{
"modifications": {
"body": "Dear {{name}}, your order {{order_id}} has shipped.",
"body:name": "Alex",
"body:order_id": "ORD-9981"
}
}This replaces the element's original text with the new template, then fills in {{name}} and {{order_id}}.
Multiple Placeholders#
A single text element can have as many placeholders as you need:
{
"modifications": {
"certificate:student": "Maria Garcia",
"certificate:course": "Advanced Machine Learning",
"certificate:date": "April 28, 2025",
"certificate:instructor": "Dr. James Chen",
"certificate:hours": "40"
}
}Multi-Page Templates#
For templates with multiple pages, prefix the key with the page number:
{
"modifications": {
"page1@heading:name": "Front Page Name",
"page2@heading:name": "Back Page Name"
}
}Without a page prefix, the value applies to all pages where that element exists.
Unfilled Placeholders#
If you don't pass a value for a placeholder, it stays as {{paramName}} in the output. This makes it easy to spot missing data during development.
Works with Flow Text#
Inline parameters work in flow text elements too. The placeholders are resolved before the text is split across pages, so your values flow naturally with the content.
Tips#
- Naming: use descriptive names like
{{first_name}}instead of{{x}}— they show up in the Studio API tab and make your template self-documenting - Inline styles: you can combine inline parameters with inline text styles — e.g.,
<b>{{name}}</b>will render the replaced name in bold - Text elements only: inline parameters work on text elements. For images, shapes, and other element types, use the standard Parameter ID
Related#
- Setting Parameters — Making elements dynamic with Parameter IDs
- Inline Text Styles — Bold, italic, colors within text
- Render from Studio Template — Full API reference
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 50+ integrations
- White-label embed for your own app
- 60 free renders — no credit card required