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

    Interface PreviewCreativeRequest

    Request to generate previews of creative manifests. Uses request_type to select single, batch, or variant mode.

    interface PreviewCreativeRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        request_type: "single" | "batch" | "variant";
        creative_manifest?: CreativeManifest;
        format_id?: FormatReferenceStructuredObject;
        inputs?: {
            name: string;
            macros?: { [k: string]: string | undefined };
            context_description?: string;
        }[];
        template_id?: string;
        quality?: CreativeQuality;
        output_format?: PreviewOutputFormat;
        item_limit?: number;
        requests?: {
            format_id?: FormatReferenceStructuredObject;
            creative_manifest: CreativeManifest;
            inputs?: {
                name: string;
                macros?: { [k: string]: string
                | undefined };
                context_description?: string;
            }[];
            template_id?: string;
            quality?: CreativeQuality;
            output_format?: PreviewOutputFormat;
            item_limit?: number;
        }[];
        variant_id?: string;
        creative_id?: string;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    adcp_version?: string

    Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.

    adcp_major_version?: number

    DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.

    request_type: "single" | "batch" | "variant"

    Preview mode. 'single' previews one creative manifest. 'batch' previews multiple creatives in one call. 'variant' replays a post-flight variant by ID.

    creative_manifest?: CreativeManifest
    format_id?: FormatReferenceStructuredObject
    inputs?: {
        name: string;
        macros?: { [k: string]: string | undefined };
        context_description?: string;
    }[]

    Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. Used in single mode.

    Type Declaration

    • name: string

      Human-readable name for this input set (e.g., 'Sunny morning on mobile', 'Evening podcast ad', 'Desktop dark mode')

    • Optionalmacros?: { [k: string]: string | undefined }

      Macro values to use for this preview. Supports all universal macros from the format's supported_macros list.

    • Optionalcontext_description?: string

      Natural language description of the context for AI-generated content (e.g., 'User just searched for running shoes', 'Podcast discussing weather patterns')

    template_id?: string

    Specific template ID for custom format rendering. Used in single mode.

    quality?: CreativeQuality
    output_format?: PreviewOutputFormat
    item_limit?: number

    Maximum number of catalog items to render per preview variant. Used in single mode. Creative agents SHOULD default to a reasonable sample when omitted and the catalog is large.

    1

    requests?: {
        format_id?: FormatReferenceStructuredObject;
        creative_manifest: CreativeManifest;
        inputs?: {
            name: string;
            macros?: { [k: string]: string | undefined };
            context_description?: string;
        }[];
        template_id?: string;
        quality?: CreativeQuality;
        output_format?: PreviewOutputFormat;
        item_limit?: number;
    }[]

    Array of preview requests (1-50 items). Required when request_type is 'batch'. Each item follows the single request structure.

    Type Declaration

    • Optionalformat_id?: FormatReferenceStructuredObject
    • creative_manifest: CreativeManifest
    • Optionalinputs?: {
          name: string;
          macros?: { [k: string]: string | undefined };
          context_description?: string;
      }[]

      Array of input sets for generating multiple preview variants

    • Optionaltemplate_id?: string

      Specific template ID for custom format rendering

    • Optionalquality?: CreativeQuality
    • Optionaloutput_format?: PreviewOutputFormat
    • Optionalitem_limit?: number

      Maximum number of catalog items to render in this preview.

      1

    variant_id?: string

    Platform-assigned variant identifier from get_creative_delivery response. Required when request_type is 'variant'.

    creative_id?: string

    Creative identifier for context. Used in variant mode.

    context?: ContextObject
    ext?: ExtensionObject