AI Generation with .prompt
Generate dynamic text and images using AI with the .prompt parameter
Overview
The .prompt parameter enables AI-powered content generation for text and image elements. Instead of providing static content, you can supply a natural language prompt that generates contextual content on-the-fly.
How It Works
When you add .prompt to a parameterized element, Orshot uses AI to generate appropriate content:
- Text elements - Generates text using
openai/gpt-5-nano - Image elements - Generates images using
google/nano-banana
The generated content replaces the element's default content during render.
Syntax
For multi-page templates:
Text Generation
Basic Usage
This generates AI text for the headline element instead of using its template default.
Detailed Prompts
Be specific to get better results:
Multi-Page Example
Image Generation
Basic Usage
Detailed Image Prompts
Include style, mood, and composition details:
Multi-Page Image Generation
Combining with Regular Parameters
You can mix .prompt with regular parameters to refine the output:
The AI generates the text content, while the style parameters control its appearance.
Element Type Validation
The .prompt parameter only works with text and image elements:
✅ Supported:
❌ Not Supported:
If you try to use .prompt on unsupported elements, Orshot will:
- Log a warning
- Skip the prompt generation
- Use the element's default content
Fallback Behavior
When AI generation fails (network issues, API errors, etc.), Orshot falls back gracefully:
-
Regular modification exists - Uses the regular parameter value
If AI fails, it uses "Fallback Title"
-
No regular modification - Uses template default If AI fails and no fallback is provided, the element shows its original template content
Best Practices
Text Prompts
-
Be Specific - Include length, tone, and context
-
Set Constraints - Specify word/sentence count
-
Define Tone - Mention style or emotion
Image Prompts
-
Include Style - Specify artistic style or medium
-
Describe Composition - Mention perspective and layout
-
Add Context - Include mood and atmosphere
Real-World Examples
Social Media Post Generator
Dynamic Report Headers
Personalized Certificates
API Integration Examples
REST API
Dynamic URL
Limitations & Considerations
- AI Credits Required - Text and image generation consumes AI credits based on your plan
- Generation Time - AI prompts add processing time (typically 2-5 seconds per element)
- Rate Limits - Subject to plan-based rate limits for AI generation
- Content Safety - Generated content passes through safety filters
- Determinism - Same prompt may generate slightly different results each time
Next Steps
- Learn about Adding Interactive Links
- Explore Dynamic Parameters Introduction
- Check Pricing & Plans for AI credit limits