@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Class CreativeAgentClient

    Creative Agent Client - Specialized client for interacting with creative agents

    Creative agents provide creative assembly and reusable creative-library services. Creative-library reads are canonical by default: each creative is identified by format_kind and, when applicable, format_option_ref.

    // Standard creative agent
    const creativeAgent = new CreativeAgentClient({
    agentUrl: 'https://creative.adcontextprotocol.org/mcp'
    });

    const { creatives } = await creativeAgent.listCreatives({
    filters: { statuses: ['approved'] }
    });
    const images = creatives.filter(creative => creative.format_kind === 'image');
    Index

    Constructors

    Methods

    • List a creative agent's legacy named-format catalog.

      Canonical applications should discover seller-supported declarations through AgentClient.getProducts() and use format_options[]. This method exists for migration tooling that must inspect the old creative-agent catalog.

      Parameters

      Returns Promise<LegacyCreativeFormat[]>

      Promise resolving to array of creative formats

      const formats = await creativeAgent.listFormatsLegacy();

      // Find by dimensions
      const banners = formats.filter(f =>
      f.renders?.[0]?.dimensions?.width === 300 &&
      f.renders?.[0]?.dimensions?.height === 250
      );

      Canonical applications discover format_options[] through seller products.

    • Find formats by dimensions

      Parameters

      • width: number

        Width in pixels

      • height: number

        Height in pixels

      Returns Promise<LegacyCreativeFormat[]>

      Promise resolving to matching formats

      // Find all 300x250 formats
      const mediumRectangles = await creativeAgent.findLegacyByDimensions(300, 250);
    • Find format by ID

      Parameters

      • formatId: string

        Format ID to search for

      Returns Promise<LegacyCreativeFormat | undefined>

      Promise resolving to matching format or undefined

      const format = await creativeAgent.findLegacyById('display_300x250_image');
      if (format) {
      console.log(`Found: ${format.name}`);
      }