Dynamic parameters allow you to override template styles, content, and behavior at runtime using a simple dot notation syntax. Instead of creating multiple template versions, you can dynamically modify any parameterized element when generating images.
Dynamic parameters enable you to:
.prompt to generate text and images with AI.href to make elements clickable in PDFsWhen you parameterize an element in Orshot Studio (e.g., naming a text element title), you can override its properties using the format:
parameterID.property{
"modifications": {
"title": "New Title Text",
"title.fontSize": "48px",
"title.color": "#ff0000",
"subtitle.fontFamily": "Roboto"
}
}For templates with multiple pages, prefix with the page number:
{
"modifications": {
"page1@title": "First Page Title",
"page2@title": "Second Page Title",
"page1@title.fontSize": "48px"
}
}These properties are available for all parameterized elements (text, image, shape, video):
Position & Dimensions:
x - Horizontal position in px (e.g., "200px")y - Vertical position in px (e.g., "100px")width - Element width in px (e.g., "500px")height - Element height in px (e.g., "300px")Common Effects:
opacity - 0 to 1filter - CSS blur filter (e.g., "blur(2px)")dropShadowX, dropShadowY, dropShadowBlur, dropShadowColor - Drop shadow properties{
"modifications": {
"title.x": "200px",
"title.y": "100px",
"logo.width": "150px",
"logo.height": "150px",
"banner.opacity": "0.8"
}
}Content & Typography:
fontSize - Size in px (e.g., "24px")fontWeight - Weight from 100-900 (e.g., "700")fontStyle - "normal" or "italic"fontFamily - Any Google Font or uploaded custom fontcolor - Hex or rgba colorlineHeight - Line height (e.g., "1.5")letterSpacing - Letter spacing in pxtextAlign - "left", "center", or "right"verticalAlign - "flex-start", "center", or "flex-end"textDecoration - "none", "underline", etc.textTransform - "none", "uppercase", "lowercase", "capitalize"Effects:
textStrokeWidth - Outline width in pxtextStrokeColor - Outline colorbackgroundColor - Background color behind textbackgroundRadius - Border radius for backgroundopacity - 0 to 1filter - CSS blur filter (e.g., "blur(2px)")dropShadowX, dropShadowY, dropShadowBlur, dropShadowColor - Drop shadow propertiesReserved Properties:
.prompt - AI text generation (see AI Generation).href - Add clickable links (see Links)Layout & Styling:
objectFit - "contain", "cover", "fill", etc.objectPosition - Position (e.g., "center center")borderRadius - Corner radius in pxborderWidth - Border width in pxborderColor - Border colorboxShadowX, boxShadowY, boxShadowBlur, boxShadowColor - Box shadow propertiesEffects:
opacity - 0 to 1filter - CSS blur filterdropShadowX, dropShadowY, dropShadowBlur, dropShadowColor - Drop shadow propertiesReserved Properties:
.prompt - AI image generation (see AI Generation).href - Add clickable links (see Links)fill - Fill colorstroke - Stroke colorstrokeWidth - Stroke width in pxborderRadius - Corner radius in pxopacity - 0 to 1filter - CSS blur filterdropShadowX, dropShadowY, dropShadowBlur, dropShadowColor - Drop shadow propertiesDynamic parameters work consistently across all Orshot integrations:
{
"templateId": "your-template-id",
"modifications": {
"title": "Hello World",
"title.fontSize": "48px",
"title.color": "#ff0000"
}
}https://api.orshot.com/v1/studio/dynamic-url/my-image?
title=Hello%20World&
title.fontSize=48px&
title.color=%23ff0000{
"title.color": "#ff0000", // Hex
"subtitle.color": "rgba(255,0,0,1)" // RGBA
}{
"title.fontSize": "48px", // Pixels (recommended)
"title.letterSpacing": "2px"
}{
"title.fontFamily": "Roboto", // Google Font
"subtitle.fontFamily": "MyCustomFont" // Uploaded custom font
}{
"logo": "https://example.com/logo.png",
"banner.href": "https://example.com"
}Property names are case-insensitive for convenience:
{
"title.fontsize": "48px", // Works
"title.fontSize": "48px", // Also works
"title.FONTSIZE": "48px" // Also works
}px for sizes to avoid rendering issues