Common Workflows
Format Showcase Pages
Build a browsable catalog of available formats:Campaign Review Grid
Review all creatives before launch:Web Component Integration
For production applications with lazy loading:- Shadow DOM for CSS isolation
- Lazy loading (only loads when visible)
- Framework agnostic
Choosing Output Format
Useoutput_format: "url" (default) when:
- Security is paramount (third-party creatives)
- Building interactive preview tools
- Need iframe isolation
output_format: "html" when:
- Building format catalogs (10+ formats)
- Creating campaign review grids (20+ creatives)
- Server-side rendering
- Working with trusted creative agents only
Caching Strategy
Cache individual preview results by format_id + manifest hash:- Cache by format_id + manifest hash (not entire batch)
- Request [A,B,C] → cache each separately
- Later request [B,C,D] → only fetch D
- Always check
expires_atbefore using cached previews
Error Handling
Migration from Single to Batch
Before (Sequential):Use Case Patterns
Device Variants
Geographic Variants
Privacy Compliance Testing
AI Content Variants
Implementation Notes
For Creative Agents
Required:- Return complete HTML pages from
preview_url - Handle all media types (images, video, audio, interactive)
- Echo input parameters in response
- Validate manifest before rendering
- Apply macro values (or use defaults)
- Implement security sandboxing
- Set reasonable expiration (24-48 hours)
- Provide
hintsobject (media type, dimensions, duration) - Provide
embeddingmetadata (sandbox policy, CSP) - Support responsive design
- Include accessibility features
For Buyers
- Just iframe the
preview_url- no special rendering needed - Use
inputsarray for specific scenarios - Check
inputfield to confirm macros applied - Share preview URLs with clients for approval
- Use
interactive_urlfor advanced testing
For Publishers
- Return consistent HTML from preview URLs
- Implement responsive preview pages
- Document supported macros via
supported_macrosin formats - Clarify preview vs production differences
- Consider providing
interactive_urlfor testing
Related Documentation
- preview_creative - Basic usage and parameters
- Creative Manifests - Manifest structure
- Universal Macros - Available macro values