Skip to main content
Recipe prompt
Build one source bundle and adapt it to the renderer. Context.dev supplies observed branding and page content; your application supplies approved claims, templates, and publishing.

Gather the source bundle

Start with a verified domain and a server-side key from the Quickstart. Retrieve Brand for company identity and Styleguide for fonts and design styles. Screenshots and images are optional visual inputs; omit calls your template does not need.
Retain successful inputs when an optional call fails. Inspect each Scrape output’s success and data; HTTP 200 alone does not mean every format succeeded. You can combine screenshot and image formats into one Scrape request. For source copy, scrape selected product pages or use a scoped crawl. Store source URLs with claims. Website imagery is an observed asset, not evidence that your application has rights to reuse it.

Approve a small theme

Choose an accent, logo, and font stack rather than copying every observed style. Keep explicit overrides separate from the latest snapshot. Use Brand assets for downloaded exports; Logo Link has different usage restrictions.
Use approveTheme to validate a chosen logo and color. Keep headings and body text on a neutral surface, with an accent for bounded elements.
document-theme.ts
Custom fonts need a loadable, licensed source and a tested fallback. Retain the company name when an image is missing; reserve image dimensions to avoid layout shifts.

Render an editable preview

Use a fixed content schema and renderer. Keep model-generated text as text; do not inject it as executable markup. These React examples accept approved content and theme values:
ClientReport.tsx
report.css
For email, map the same approved theme into your provider’s template. For campaign images, keep text, logo, and source imagery in separate layers so each size can be reviewed and edited. A change to one channel must not overwrite approved content in another.

Review and save a version

Inspect the final PDF, slide deck, browser preview, email, or image at its intended size. Check clipping, logo contrast, font fallback, links, source claims, and the identity of the sender or author. Save the source domain, retrieval time, approved theme, content version, and renderer version. Refresh suggestions independently of approved edits. Publish only after review; a successful API request does not approve the artifact.