@adcp/client API Reference - v4.19.0
    Preparing search index...

    Interface BuildCreativeRequest

    Request to transform, generate, or retrieve a creative manifest. Supports three modes: (1) generation from a brief or seed assets, (2) transformation of an existing manifest, (3) retrieval from a creative library by creative_id. Produces target manifest(s) in the specified format(s). Provide either target_format_id for a single format or target_format_ids for multiple formats.

    interface BuildCreativeRequest {
        message?: string;
        creative_manifest?: CreativeManifest;
        creative_id?: string;
        concept_id?: string;
        media_buy_id?: string;
        package_id?: string;
        target_format_id?: FormatID;
        target_format_ids?: FormatID[];
        brand?: BrandReference;
        quality?: CreativeQuality;
        item_limit?: number;
        include_preview?: boolean;
        preview_inputs?: {
            name: string;
            macros?: { [k: string]: string | undefined };
            context_description?: string;
        }[];
        preview_quality?: CreativeQuality;
        preview_output_format?: PreviewOutputFormat;
        macro_values?: { [k: string]: string
        | undefined };
        idempotency_key?: string;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    message?: string

    Natural language instructions for the transformation or generation. For pure generation, this is the creative brief. For transformation, this provides guidance on how to adapt the creative. For refinement, this describes the desired changes.

    creative_manifest?: CreativeManifest
    creative_id?: string

    Reference to a creative in the agent's library. The creative agent resolves this to a manifest from its library. Use this instead of creative_manifest when retrieving an existing creative for tag generation or format adaptation.

    concept_id?: string

    Creative concept containing the creative. Creative agents SHOULD assign globally unique creative_id values; when they cannot guarantee uniqueness, concept_id is REQUIRED to disambiguate.

    media_buy_id?: string

    Media buy identifier for tag generation context. When the creative agent is also the ad server, this provides the trafficking context needed to generate placement-specific tags (e.g., CM360 placement ID). Not needed when tags are generated at the creative level (most creative platforms).

    package_id?: string

    Package identifier within the media buy. Used with media_buy_id when the creative agent needs line-item-level context for tag generation. Omit to get a tag not scoped to a specific package.

    target_format_id?: FormatID
    target_format_ids?: FormatID[]

    Array of format IDs to generate in a single call. Mutually exclusive with target_format_id. The creative agent produces one manifest per format. Each format definition specifies its own required input assets and output structure.

    quality?: CreativeQuality
    item_limit?: number

    Maximum number of catalog items to use when generating. When a catalog asset contains more items than this limit, the creative agent selects the top items based on relevance or catalog ordering. When item_limit exceeds the format's max_items, the creative agent SHOULD use the lesser of the two. Ignored when the manifest contains no catalog assets.

    include_preview?: boolean

    When true, requests the creative agent to include preview renders in the response alongside the manifest. Agents that support this return a 'preview' object in the response using the same structure as preview_creative. Agents that do not support inline preview simply omit the field. This avoids a separate preview_creative round trip for platforms that generate previews as a byproduct of building.

    preview_inputs?: {
        name: string;
        macros?: { [k: string]: string | undefined };
        context_description?: string;
    }[]

    Input sets for preview generation when include_preview is true. Each input set defines macros and context values for one preview variant. If include_preview is true but this is omitted, the agent generates a single default preview. Only supported with target_format_id (single-format requests). Ignored when using target_format_ids — multi-format requests generate one default preview per format. Ignored when include_preview is false or omitted.

    Type Declaration

    • name: string

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

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

      Macro values to use for this preview variant

    • Optionalcontext_description?: string

      Natural language description of the context for AI-generated content

    preview_quality?: CreativeQuality
    preview_output_format?: PreviewOutputFormat
    macro_values?: { [k: string]: string | undefined }

    Macro values to pre-substitute into the output manifest's assets. Keys are universal macro names (e.g., CLICK_URL, CACHEBUSTER); values are the substitution strings. The creative agent translates universal macros to its platform's native syntax. Substitution is literal — all occurrences of each macro in output assets are replaced with the provided value. The caller is responsible for URL-encoding values if the output context requires it. Macros not provided here remain as {MACRO} placeholders for the sales agent to resolve at serve time. Creative agents MUST ignore keys they do not recognize — unknown macro names are not an error.

    idempotency_key?: string

    Client-generated unique key for this request. Prevents duplicate creative generation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.

    context?: ContextObject
    ext?: ExtensionObject