@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Function batchPreviewFormats

    • Generate batch previews for formats with format_card manifests

      Formats with format_card fields will have their cards rendered via the creative agent. Formats without format_card will be returned with no preview.

      Parameters

      Returns Promise<PreviewResult[]>

      Array of preview results matching input formats

      const creativeAgent = new SingleAgentClient({
      id: 'creative',
      name: 'Creative Agent',
      agent_uri: 'https://creative.adcontextprotocol.org/mcp',
      protocol: 'mcp'
      });

      const previews = await batchPreviewFormats(formats, creativeAgent);
      previews.forEach(p => {
      if (p.previewUrl) {
      console.log(`${(p.item as Format).name}: ${p.previewUrl}`);
      }
      });