Module adcp.types.stable

Stable public API for AdCP types.

This module provides a stable, versioned API that shields users from internal implementation details and schema evolution. All types exported here are guaranteed to be stable within a major version.

Internal Implementation: - Types are generated from JSON schemas into adcp.types.generated_poc - The generator may create numbered variants (e.g., BrandManifest1, BrandManifest2) when schema evolution creates multiple valid structures - This module provides clean, unnumbered aliases pointing to the canonical version

IMPORTANT: Never import directly from adcp.types.generated_poc or adcp.types.generated. Always import from adcp.types or adcp.types.stable.

Schema Evolution: - When schemas change, we update the alias targets here - Users see stable names (BrandManifest, Product, etc.) - Breaking changes require major version bumps

Classes

class Action (*args, **kwds)
Expand source code
class Action(Enum):
    created = 'created'
    updated = 'updated'
    unchanged = 'unchanged'
    failed = 'failed'
    deleted = 'deleted'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var created
var deleted
var failed
var unchanged
var updated
class ActivateSignalRequest (**data: Any)
Expand source code
class ActivateSignalRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    destinations: Annotated[
        list[destination.Destination1 | destination.Destination2],
        Field(
            description='Target destination(s) for activation. If the authenticated caller matches one of these destinations, activation keys will be included in the response.',
            min_length=1,
        ),
    ]
    signal_agent_segment_id: Annotated[
        str, Field(description='The universal identifier for the signal to activate')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var destinations : list[Destination1 | Destination2]
var model_config
var signal_agent_segment_id : str

Inherited members

class ActivateSignalResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class ActivateSignalResponse(RootModel[ActivateSignalResponse1 | ActivateSignalResponse2]):
    root: Annotated[
        ActivateSignalResponse1 | ActivateSignalResponse2,
        Field(
            description='Response payload for activate_signal task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the signal is either fully activated or not activated at all.',
            title='Activate Signal Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[ActivateSignalResponse1, ActivateSignalResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootActivateSignalResponse1 | ActivateSignalResponse2
class AffectedPackage (**data: Any)
Expand source code
class AffectedPackage(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    buyer_ref: Annotated[str, Field(description="Buyer's reference for the package")]
    package_id: Annotated[str, Field(description="Publisher's package identifier")]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buyer_ref : str
var model_config
var package_id : str

Inherited members

class AggregatedTotals (**data: Any)
Expand source code
class AggregatedTotals(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    clicks: Annotated[
        float | None,
        Field(description='Total clicks across all media buys (if applicable)', ge=0.0),
    ] = None
    impressions: Annotated[
        float, Field(description='Total impressions delivered across all media buys', ge=0.0)
    ]
    media_buy_count: Annotated[
        int, Field(description='Number of media buys included in the response', ge=0)
    ]
    spend: Annotated[float, Field(description='Total amount spent across all media buys', ge=0.0)]
    video_completions: Annotated[
        float | None,
        Field(description='Total video completions across all media buys (if applicable)', ge=0.0),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var clicks : float | None
var impressions : float
var media_buy_count : int
var model_config
var spend : float
var video_completions : float | None

Inherited members

class Asset (**data: Any)
Expand source code
class Asset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_id: Annotated[str, Field(description='Unique identifier for this asset')]
    asset_type: Annotated[AssetType, Field(description='Type of asset')]
    description: Annotated[str | None, Field(description='Asset description or usage notes')] = None
    duration_seconds: Annotated[
        float | None, Field(description='Video/audio duration in seconds')
    ] = None
    file_size_bytes: Annotated[int | None, Field(description='File size in bytes')] = None
    format: Annotated[str | None, Field(description="File format (e.g., 'jpg', 'mp4', 'mp3')")] = (
        None
    )
    height: Annotated[int | None, Field(description='Image/video height in pixels')] = None
    metadata: Annotated[
        dict[str, Any] | None, Field(description='Additional asset-specific metadata')
    ] = None
    name: Annotated[str | None, Field(description='Human-readable asset name')] = None
    tags: Annotated[
        list[str] | None,
        Field(
            description="Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')"
        ),
    ] = None
    url: Annotated[AnyUrl, Field(description='URL to CDN-hosted asset file')]
    width: Annotated[int | None, Field(description='Image/video width in pixels')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_id : str
var asset_typeAssetType
var description : str | None
var duration_seconds : float | None
var file_size_bytes : int | None
var format : str | None
var height : int | None
var metadata : dict[str, typing.Any] | None
var model_config
var name : str | None
var tags : list[str] | None
var url : pydantic.networks.AnyUrl
var width : int | None

Inherited members

class AssetSelectors (**data: Any)
Expand source code
class AssetSelectors(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_types: Annotated[
        list[AssetType] | None, Field(description="Filter by asset type (e.g., ['image', 'video'])")
    ] = None
    exclude_tags: Annotated[
        list[str] | None, Field(description='Exclude assets with these tags')
    ] = None
    tags: Annotated[
        list[str] | None,
        Field(description="Select assets with specific tags (e.g., ['holiday', 'premium'])"),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_types : list[AssetType] | None
var exclude_tags : list[str] | None
var model_config
var tags : list[str] | None

Inherited members

class AssetType (*args, **kwds)
Expand source code
class AssetType(Enum):
    image = 'image'
    video = 'video'
    audio = 'audio'
    text = 'text'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var audio
var image
var text
var video
class AssetTypeSchema (**data: Any)
Expand source code
class AssetTypeSchema(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_role: Annotated[
        str,
        Field(
            description="Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')"
        ),
    ]
    constraints: Annotated[
        list[str] | None,
        Field(description='Additional constraints or requirements (human-readable)'),
    ] = None
    examples: Annotated[
        list[str] | None, Field(description='Example values or descriptions for this asset')
    ] = None
    required: Annotated[
        bool | None, Field(description='Whether this asset is mandatory for the format')
    ] = True
    requirements: Annotated[
        Requirements | None, Field(description='Technical requirements for this asset type')
    ] = None
    type: Annotated[Type, Field(description='Type of asset')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_role : str
var constraints : list[str] | None
var examples : list[str] | None
var model_config
var required : bool | None
var requirementsRequirements | None
var typeType

Inherited members

class AssetsRequired (**data: Any)
Expand source code
class AssetsRequired(AdCPBaseModel):
    asset_id: Annotated[
        str,
        Field(
            description='Unique identifier for this asset. Creative manifests MUST use this exact value as the key in the assets object.'
        ),
    ]
    asset_role: Annotated[
        str | None,
        Field(
            description="Optional descriptive label for this asset's purpose (e.g., 'hero_image', 'logo'). Not used for referencing assets in manifests—use asset_id instead. This field is for human-readable documentation and UI display only."
        ),
    ] = None
    asset_type: Annotated[AssetType, Field(description='Type of asset')]
    item_type: Annotated[
        Literal['individual'],
        Field(description='Discriminator indicating this is an individual asset requirement'),
    ]
    required: Annotated[bool | None, Field(description='Whether this asset is required')] = None
    requirements: Annotated[
        dict[str, Any] | None,
        Field(
            description='Technical requirements for this asset (dimensions, file size, duration, etc.)'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_id : str
var asset_role : str | None
var asset_typeAssetType
var item_type : Literal['individual']
var model_config
var required : bool | None
var requirements : dict[str, typing.Any] | None

Inherited members

class AssignedPackage (**data: Any)
Expand source code
class AssignedPackage(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assigned_date: Annotated[AwareDatetime, Field(description='When this assignment was created')]
    package_id: Annotated[str, Field(description='Package identifier')]
    package_name: Annotated[str | None, Field(description='Human-readable package name')] = None
    status: Annotated[Status, Field(description='Status of this specific assignment')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assigned_date : pydantic.types.AwareDatetime
var model_config
var package_id : str
var package_name : str | None
var statusStatus

Inherited members

class Assignments (**data: Any)
Expand source code
class Assignments(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assigned_packages: Annotated[
        list[AssignedPackage] | None,
        Field(description='List of packages this creative is assigned to'),
    ] = None
    assignment_count: Annotated[
        int, Field(description='Total number of active package assignments', ge=0)
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assigned_packages : list[AssignedPackage] | None
var assignment_count : int
var model_config

Inherited members

class AudioAsset (**data: Any)
Expand source code
class AudioAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    bitrate_kbps: Annotated[
        int | None, Field(description='Audio bitrate in kilobits per second', ge=1)
    ] = None
    duration_ms: Annotated[
        int | None, Field(description='Audio duration in milliseconds', ge=0)
    ] = None
    format: Annotated[str | None, Field(description='Audio file format (mp3, wav, aac, etc.)')] = (
        None
    )
    url: Annotated[AnyUrl, Field(description='URL to the audio asset')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bitrate_kbps : int | None
var duration_ms : int | None
var format : str | None
var model_config
var url : pydantic.networks.AnyUrl

Inherited members

class Authentication (**data: Any)
Expand source code
class Authentication(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    credentials: Annotated[
        str,
        Field(
            description='Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.',
            min_length=32,
        ),
    ]
    schemes: Annotated[
        list[Scheme],
        Field(
            description="Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)",
            max_length=1,
            min_length=1,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var credentials : str
var model_config
var schemes : list[Scheme]

Inherited members

class AuthorizedAgents (**data: Any)
Expand source code
class AuthorizedAgents(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    authorization_type: Annotated[
        Literal['property_ids'],
        Field(description='Discriminator indicating authorization by specific property IDs'),
    ]
    authorized_for: Annotated[
        str,
        Field(
            description='Human-readable description of what this agent is authorized to sell',
            max_length=500,
            min_length=1,
        ),
    ]
    property_ids: Annotated[
        list[PropertyId],
        Field(
            description='Property IDs this agent is authorized for. Resolved against the top-level properties array in this file',
            min_length=1,
        ),
    ]
    url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var authorization_type : Literal['property_ids']
var authorized_for : str
var model_config
var property_ids : list[PropertyId]
var url : pydantic.networks.AnyUrl

Inherited members

class AuthorizedSalesAgents (**data: Any)
Expand source code
class AuthorizedSalesAgents(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    field_schema: Annotated[
        str | None,
        Field(alias='$schema', description='JSON Schema identifier for this adagents.json file'),
    ] = 'https://adcontextprotocol.org/schemas/v1/adagents.json'
    authorized_agents: Annotated[
        list[AuthorizedAgents | AuthorizedAgents1 | AuthorizedAgents2 | AuthorizedAgents3],
        Field(
            description='Array of sales agents authorized to sell inventory for properties in this file',
            min_length=1,
        ),
    ]
    contact: Annotated[
        Contact | None,
        Field(
            description='Contact information for the entity managing this adagents.json file (may be publisher or third-party operator)'
        ),
    ] = None
    last_updated: Annotated[
        AwareDatetime | None,
        Field(description='ISO 8601 timestamp indicating when this file was last updated'),
    ] = None
    properties: Annotated[
        list[property.Property] | None,
        Field(
            description='Array of all properties covered by this adagents.json file. Same structure as list_authorized_properties response.',
            min_length=1,
        ),
    ] = None
    tags: Annotated[
        dict[str, Tags] | None,
        Field(
            description='Metadata for each tag referenced by properties. Same structure as list_authorized_properties response.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var authorized_agents : list[AuthorizedAgents | AuthorizedAgents1 | AuthorizedAgents2 | AuthorizedAgents3]
var contactContact | None
var field_schema : str | None
var last_updated : pydantic.types.AwareDatetime | None
var model_config
var properties : list[Property] | None
var tags : dict[str, Tags] | None

Inherited members

class AvailableMetric (*args, **kwds)
Expand source code
class AvailableMetric(Enum):
    impressions = 'impressions'
    spend = 'spend'
    clicks = 'clicks'
    ctr = 'ctr'
    video_completions = 'video_completions'
    completion_rate = 'completion_rate'
    conversions = 'conversions'
    viewability = 'viewability'
    engagement_rate = 'engagement_rate'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var clicks
var completion_rate
var conversions
var ctr
var engagement_rate
var impressions
var spend
var video_completions
var viewability
class AvailableReportingFrequency (*args, **kwds)
Expand source code
class AvailableReportingFrequency(Enum):
    hourly = 'hourly'
    daily = 'daily'
    monthly = 'monthly'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var daily
var hourly
var monthly
class BrandManifest (**data: Any)
Expand source code
class BrandManifest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assets: Annotated[
        list[Asset] | None,
        Field(
            description='Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files.'
        ),
    ] = None
    colors: Annotated[Colors | None, Field(description='Brand color palette')] = None
    contact: Annotated[Contact | None, Field(description='Brand contact information')] = None
    disclaimers: Annotated[
        list[Disclaimer] | None,
        Field(description='Legal disclaimers or required text that must appear in creatives'),
    ] = None
    fonts: Annotated[Fonts | None, Field(description='Brand typography guidelines')] = None
    industry: Annotated[
        str | None,
        Field(
            description="Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')"
        ),
    ] = None
    logos: Annotated[
        list[Logo] | None,
        Field(description='Brand logo assets with semantic tags for different use cases'),
    ] = None
    metadata: Annotated[Metadata | None, Field(description='Additional brand metadata')] = None
    name: Annotated[str, Field(description='Brand or business name')]
    product_catalog: Annotated[
        ProductCatalog | None,
        Field(
            description='Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection.'
        ),
    ] = None
    tagline: Annotated[str | None, Field(description='Brand tagline or slogan')] = None
    target_audience: Annotated[
        str | None, Field(description='Primary target audience description')
    ] = None
    tone: Annotated[
        str | None,
        Field(
            description="Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')"
        ),
    ] = None
    url: Annotated[
        AnyUrl | None,
        Field(
            description='Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assets : list[Asset] | None
var colorsColors | None
var contactContact | None
var disclaimers : list[Disclaimer] | None
var fontsFonts | None
var industry : str | None
var logos : list[Logo] | None
var metadataMetadata | None
var model_config
var name : str
var product_catalogProductCatalog | None
var tagline : str | None
var target_audience : str | None
var tone : str | None
var url : pydantic.networks.AnyUrl | None

Inherited members

class BuildCreativeRequest (**data: Any)
Expand source code
class BuildCreativeRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    creative_manifest: Annotated[
        creative_manifest_1.CreativeManifest | None,
        Field(
            description='Creative manifest to transform or generate from. For pure generation, this should include the target format_id and any required input assets (e.g., promoted_offerings for generative formats). For transformation (e.g., resizing, reformatting), this is the complete creative to adapt.'
        ),
    ] = None
    message: Annotated[
        str | None,
        Field(
            description='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.'
        ),
    ] = None
    target_format_id: Annotated[
        format_id.FormatId,
        Field(
            description='Format ID to generate. The format definition specifies required input assets and output structure.'
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var creative_manifestCreativeManifest | None
var message : str | None
var model_config
var target_format_idFormatId

Inherited members

class BuildCreativeResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class BuildCreativeResponse(RootModel[BuildCreativeResponse1 | BuildCreativeResponse2]):
    root: Annotated[
        BuildCreativeResponse1 | BuildCreativeResponse2,
        Field(
            description='Response containing the transformed or generated creative manifest, ready for use with preview_creative or sync_creatives. Returns either the complete creative manifest OR error information, never both.',
            title='Build Creative Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[BuildCreativeResponse1, BuildCreativeResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootBuildCreativeResponse1 | BuildCreativeResponse2
class ByPackageItem (**data: Any)
Expand source code
class ByPackageItem(DeliveryMetrics):
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference identifier for this package")
    ] = None
    currency: Annotated[
        str,
        Field(
            description="ISO 4217 currency code (e.g., USD, EUR, GBP) for this package's pricing. Indicates the currency in which the rate and spend values are denominated. Different packages can use different currencies when supported by the publisher.",
            pattern='^[A-Z]{3}$',
        ),
    ]
    pacing_index: Annotated[
        float | None,
        Field(description='Delivery pace (1.0 = on track, <1.0 = behind, >1.0 = ahead)', ge=0.0),
    ] = None
    package_id: Annotated[str, Field(description="Publisher's package identifier")]
    pricing_model: Annotated[
        pricing_model_1.PricingModel,
        Field(
            description='The pricing model used for this package (e.g., cpm, cpcv, cpp). Indicates how the package is billed and which metrics are most relevant for optimization.'
        ),
    ]
    rate: Annotated[
        float,
        Field(
            description='The pricing rate for this package in the specified currency. For fixed-rate pricing, this is the agreed rate (e.g., CPM rate of 12.50 means $12.50 per 1,000 impressions). For auction-based pricing, this represents the effective rate based on actual delivery.',
            ge=0.0,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buyer_ref : str | None
var currency : str
var model_config
var pacing_index : float | None
var package_id : str
var pricing_modelPricingModel
var rate : float

Inherited members

class Capability (*args, **kwds)
Expand source code
class Capability(Enum):
    validation = 'validation'
    assembly = 'assembly'
    generation = 'generation'
    preview = 'preview'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var assembly
var generation
var preview
var validation
class CatalogType (*args, **kwds)
Expand source code
class CatalogType(Enum):
    marketplace = 'marketplace'
    custom = 'custom'
    owned = 'owned'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var custom
var marketplace
var owned
class CoBranding (*args, **kwds)
Expand source code
class CoBranding(Enum):
    required = 'required'
    optional = 'optional'
    none = 'none'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var none
var optional
var required
class Colors (**data: Any)
Expand source code
class Colors(AdCPBaseModel):
    accent: Annotated[
        str | None, Field(description='Accent color (hex format)', pattern='^#[0-9A-Fa-f]{6}$')
    ] = None
    background: Annotated[
        str | None, Field(description='Background color (hex format)', pattern='^#[0-9A-Fa-f]{6}$')
    ] = None
    primary: Annotated[
        str | None,
        Field(description='Primary brand color (hex format)', pattern='^#[0-9A-Fa-f]{6}$'),
    ] = None
    secondary: Annotated[
        str | None,
        Field(description='Secondary brand color (hex format)', pattern='^#[0-9A-Fa-f]{6}$'),
    ] = None
    text: Annotated[
        str | None, Field(description='Text color (hex format)', pattern='^#[0-9A-Fa-f]{6}$')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var accent : str | None
var background : str | None
var model_config
var primary : str | None
var secondary : str | None
var text : str | None

Inherited members

class Contact (**data: Any)
Expand source code
class Contact(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    domain: Annotated[
        str | None,
        Field(
            description='Primary domain of the entity managing this file',
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ] = None
    email: Annotated[
        EmailStr | None,
        Field(
            description='Contact email for questions or issues with this authorization file',
            max_length=255,
            min_length=1,
        ),
    ] = None
    name: Annotated[
        str,
        Field(
            description="Name of the entity managing this file (e.g., 'Meta Advertising Operations', 'Clear Channel Digital')",
            max_length=255,
            min_length=1,
        ),
    ]
    seller_id: Annotated[
        str | None,
        Field(
            description='Seller ID from IAB Tech Lab sellers.json (if applicable)',
            max_length=255,
            min_length=1,
        ),
    ] = None
    tag_id: Annotated[
        str | None,
        Field(
            description='TAG Certified Against Fraud ID for verification (if applicable)',
            max_length=100,
            min_length=1,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var domain : str | None
var email : pydantic.networks.EmailStr | None
var model_config
var name : str
var seller_id : str | None
var tag_id : str | None

Inherited members

class ContentLength (**data: Any)
Expand source code
class ContentLength(AdCPBaseModel):
    max_characters: Annotated[int | None, Field(ge=1)] = None
    max_words: Annotated[int | None, Field(ge=1)] = None
    min_characters: Annotated[int | None, Field(ge=0)] = None
    min_words: Annotated[int | None, Field(ge=0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_characters : int | None
var max_words : int | None
var min_characters : int | None
var min_words : int | None
var model_config

Inherited members

class Country (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class Country(RootModel[str]):
    root: Annotated[str, Field(pattern='^[A-Z]{2}$')]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[str]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : str
class CpcPricingOption (**data: Any)
Expand source code
class CpcPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    pricing_model: Annotated[Literal['cpc'], Field(description='Cost per click')]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpc_usd_fixed')"
        ),
    ]
    rate: Annotated[float, Field(description='Fixed CPC rate (cost per click)', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var pricing_model : Literal['cpc']
var pricing_option_id : str
var rate : float

Inherited members

class CpcvPricingOption (**data: Any)
Expand source code
class CpcvPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    pricing_model: Annotated[
        Literal['cpcv'], Field(description='Cost per completed view (100% completion)')
    ]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpcv_usd_guaranteed')"
        ),
    ]
    rate: Annotated[float, Field(description='Fixed CPCV rate (cost per 100% completion)', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var pricing_model : Literal['cpcv']
var pricing_option_id : str
var rate : float

Inherited members

class CpmAuctionPricingOption (**data: Any)
Expand source code
class CpmAuctionPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[False],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    price_guidance: Annotated[
        PriceGuidance, Field(description='Pricing guidance for auction-based CPM bidding')
    ]
    pricing_model: Annotated[Literal['cpm'], Field(description='Cost per 1,000 impressions')]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpm_usd_auction')"
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[False]
var min_spend_per_package : float | None
var model_config
var price_guidancePriceGuidance
var pricing_model : Literal['cpm']
var pricing_option_id : str

Inherited members

class CpmFixedRatePricingOption (**data: Any)
Expand source code
class CpmFixedRatePricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    pricing_model: Annotated[Literal['cpm'], Field(description='Cost per 1,000 impressions')]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpm_usd_guaranteed')"
        ),
    ]
    rate: Annotated[float, Field(description='Fixed CPM rate (cost per 1,000 impressions)', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var pricing_model : Literal['cpm']
var pricing_option_id : str
var rate : float

Inherited members

class CppPricingOption (**data: Any)
Expand source code
class CppPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    parameters: Annotated[
        Parameters,
        Field(description='CPP-specific parameters for demographic targeting and GRP requirements'),
    ]
    pricing_model: Annotated[Literal['cpp'], Field(description='Cost per Gross Rating Point')]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpp_usd_p18-49')"
        ),
    ]
    rate: Annotated[float, Field(description='Fixed CPP rate (cost per rating point)', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var parametersParameters
var pricing_model : Literal['cpp']
var pricing_option_id : str
var rate : float

Inherited members

class CpvPricingOption (**data: Any)
Expand source code
class CpvPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    parameters: Annotated[
        Parameters, Field(description='CPV-specific parameters defining the view threshold')
    ]
    pricing_model: Annotated[Literal['cpv'], Field(description='Cost per view at threshold')]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'cpv_usd_50pct')"
        ),
    ]
    rate: Annotated[float, Field(description='Fixed CPV rate (cost per view)', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var parametersParameters
var pricing_model : Literal['cpv']
var pricing_option_id : str
var rate : float

Inherited members

class CreateMediaBuyRequest (**data: Any)
Expand source code
class CreateMediaBuyRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    brand_manifest: Annotated[
        brand_manifest_1.BrandManifest | AnyUrl,
        Field(
            description='Brand information manifest serving as the namespace and identity for this media buy. Provides brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest. Can be cached and reused across multiple requests.',
            examples=[
                {
                    'data': {
                        'colors': {'primary': '#FF6B35'},
                        'name': 'ACME Corporation',
                        'url': 'https://acmecorp.com',
                    },
                    'description': 'Inline brand manifest',
                },
                {
                    'data': 'https://cdn.acmecorp.com/brand-manifest.json',
                    'description': 'URL string reference to hosted manifest',
                },
            ],
            title='Brand Manifest Reference',
        ),
    ]
    buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    end_time: Annotated[
        AwareDatetime, Field(description='Campaign end date/time in ISO 8601 format')
    ]
    packages: Annotated[
        list[package_request.PackageRequest], Field(description='Array of package configurations')
    ]
    po_number: Annotated[str | None, Field(description='Purchase order number for tracking')] = None
    reporting_webhook: ReportingWebhook | None = None
    start_time: Annotated[
        str | AwareDatetime,
        Field(
            description="Campaign start timing: 'asap' or ISO 8601 date-time", title='Start Timing'
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var brand_manifestBrandManifest | pydantic.networks.AnyUrl
var buyer_ref : str
var context : dict[str, typing.Any] | None
var end_time : pydantic.types.AwareDatetime
var model_config
var packages : list[PackageRequest]
var po_number : str | None
var reporting_webhookReportingWebhook | None
var start_time : str | pydantic.types.AwareDatetime

Inherited members

class CreateMediaBuyResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class CreateMediaBuyResponse(RootModel[CreateMediaBuyResponse1 | CreateMediaBuyResponse2]):
    root: Annotated[
        CreateMediaBuyResponse1 | CreateMediaBuyResponse2,
        Field(
            description='Response payload for create_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the media buy is either fully created or not created at all.',
            title='Create Media Buy Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[CreateMediaBuyResponse1, CreateMediaBuyResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootCreateMediaBuyResponse1 | CreateMediaBuyResponse2
class Creative (**data: Any)
Expand source code
class Creative(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assets: Annotated[
        dict[
            str,
            image_asset.ImageAsset
            | video_asset.VideoAsset
            | audio_asset.AudioAsset
            | text_asset.TextAsset
            | html_asset.HtmlAsset
            | css_asset.CssAsset
            | javascript_asset.JavascriptAsset
            | promoted_offerings.PromotedOfferings
            | url_asset.UrlAsset
            | vast_asset.VastAsset1
            | vast_asset.VastAsset2
            | daast_asset.DaastAsset1
            | daast_asset.DaastAsset2,
        ]
        | None,
        Field(description='Assets for this creative, keyed by asset_role'),
    ] = None
    assignments: Annotated[
        Assignments | None,
        Field(description='Current package assignments (included when include_assignments=true)'),
    ] = None
    created_date: Annotated[
        AwareDatetime, Field(description='When the creative was uploaded to the library')
    ]
    creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
    format_id: Annotated[
        format_id_1.FormatId,
        Field(description='Format identifier specifying which format this creative conforms to'),
    ]
    name: Annotated[str, Field(description='Human-readable creative name')]
    performance: Annotated[
        Performance | None,
        Field(
            description='Aggregated performance metrics (included when include_performance=true)'
        ),
    ] = None
    status: Annotated[
        creative_status.CreativeStatus, Field(description='Current approval status of the creative')
    ]
    sub_assets: Annotated[
        list[sub_asset.SubAsset1 | sub_asset.SubAsset2] | None,
        Field(
            description='Sub-assets for multi-asset formats (included when include_sub_assets=true)'
        ),
    ] = None
    tags: Annotated[
        list[str] | None, Field(description='User-defined tags for organization and searchability')
    ] = None
    updated_date: Annotated[AwareDatetime, Field(description='When the creative was last modified')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assets : dict[str, ImageAsset | VideoAsset | AudioAsset | TextAsset | HtmlAsset | CssAsset | JavascriptAsset | PromotedOfferings | UrlAsset | VastAsset1 | VastAsset2 | DaastAsset1 | DaastAsset2] | None
var assignmentsAssignments | None
var created_date : pydantic.types.AwareDatetime
var creative_id : str
var format_idFormatId
var model_config
var name : str
var performancePerformance | None
var statusCreativeStatus
var sub_assets : list[SubAsset1 | SubAsset2] | None
var tags : list[str] | None
var updated_date : pydantic.types.AwareDatetime

Inherited members

class CreativeAgent (**data: Any)
Expand source code
class CreativeAgent(AdCPBaseModel):
    agent_name: Annotated[
        str | None, Field(description='Human-readable name for the creative agent')
    ] = None
    agent_url: Annotated[
        AnyUrl,
        Field(
            description="Base URL for the creative agent (e.g., 'https://reference.adcp.org', 'https://dco.example.com'). Call list_creative_formats on this URL to get its formats."
        ),
    ]
    capabilities: Annotated[
        list[Capability] | None, Field(description='Capabilities this creative agent provides')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var agent_name : str | None
var agent_url : pydantic.networks.AnyUrl
var capabilities : list[Capability] | None
var model_config

Inherited members

class CreativeAsset (**data: Any)
Expand source code
class CreativeAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    approved: Annotated[
        bool | None,
        Field(
            description='For generative creatives: set to true to approve and finalize, false to request regeneration with updated assets/message. Omit for non-generative creatives.'
        ),
    ] = None
    assets: Annotated[
        dict[
            str,
            image_asset.ImageAsset
            | video_asset.VideoAsset
            | audio_asset.AudioAsset
            | text_asset.TextAsset
            | html_asset.HtmlAsset
            | css_asset.CssAsset
            | javascript_asset.JavascriptAsset
            | promoted_offerings.PromotedOfferings
            | url_asset.UrlAsset
            | vast_asset.VastAsset1
            | vast_asset.VastAsset2
            | daast_asset.DaastAsset1
            | daast_asset.DaastAsset2,
        ],
        Field(description='Assets required by the format, keyed by asset_role'),
    ]
    creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
    format_id: Annotated[
        format_id_1.FormatId,
        Field(description='Format identifier specifying which format this creative conforms to'),
    ]
    inputs: Annotated[
        list[Input] | None,
        Field(
            description='Preview contexts for generative formats - defines what scenarios to generate previews for'
        ),
    ] = None
    name: Annotated[str, Field(description='Human-readable creative name')]
    tags: Annotated[
        list[str] | None, Field(description='User-defined tags for organization and searchability')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var approved : bool | None
var assets : dict[str, ImageAsset | VideoAsset | AudioAsset | TextAsset | HtmlAsset | CssAsset | JavascriptAsset | PromotedOfferings | UrlAsset | VastAsset1 | VastAsset2 | DaastAsset1 | DaastAsset2]
var creative_id : str
var format_idFormatId
var inputs : list[Input] | None
var model_config
var name : str
var tags : list[str] | None

Inherited members

class CreativeAssignment (**data: Any)
Expand source code
class CreativeAssignment(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
    placement_ids: Annotated[
        list[str] | None,
        Field(
            description="Optional array of placement IDs where this creative should run. When omitted, the creative runs on all placements in the package. References placement_id values from the product's placements array.",
            min_length=1,
        ),
    ] = None
    weight: Annotated[
        float | None, Field(description='Delivery weight for this creative', ge=0.0, le=100.0)
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var creative_id : str
var model_config
var placement_ids : list[str] | None
var weight : float | None

Inherited members

class CreativeManifest (**data: Any)
Expand source code
class CreativeManifest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assets: Annotated[
        dict[
            str,
            image_asset.ImageAsset
            | video_asset.VideoAsset
            | audio_asset.AudioAsset
            | text_asset.TextAsset
            | url_asset.UrlAsset
            | html_asset.HtmlAsset
            | javascript_asset.JavascriptAsset
            | webhook_asset.WebhookAsset
            | css_asset.CssAsset
            | promoted_offerings.PromotedOfferings
            | vast_asset.VastAsset1
            | vast_asset.VastAsset2
            | daast_asset.DaastAsset1
            | daast_asset.DaastAsset2,
        ],
        Field(
            description="Map of asset IDs to actual asset content. Each key MUST match an asset_id from the format's assets_required array (e.g., 'banner_image', 'clickthrough_url', 'video_file', 'vast_tag'). The asset_id is the technical identifier used to match assets to format requirements.\n\nIMPORTANT: Creative manifest validation MUST be performed in the context of the format specification. The format defines what type each asset_id should be, which eliminates any validation ambiguity."
        ),
    ]
    format_id: Annotated[
        format_id_1.FormatId, Field(description='Format identifier this manifest is for')
    ]
    promoted_offering: Annotated[
        str | None,
        Field(
            description='Product name or offering being advertised. Maps to promoted_offerings in create_media_buy request to associate creative with the product being promoted.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assets : dict[str, ImageAsset | VideoAsset | AudioAsset | TextAsset | UrlAsset | HtmlAsset | JavascriptAsset | WebhookAsset | CssAsset | PromotedOfferings | VastAsset1 | VastAsset2 | DaastAsset1 | DaastAsset2]
var format_idFormatId
var model_config
var promoted_offering : str | None

Inherited members

class CreativePolicy (**data: Any)
Expand source code
class CreativePolicy(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    co_branding: Annotated[CoBranding, Field(description='Co-branding requirement')]
    landing_page: Annotated[LandingPage, Field(description='Landing page requirements')]
    templates_available: Annotated[
        bool, Field(description='Whether creative templates are provided')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var co_brandingCoBranding
var landing_pageLandingPage
var model_config
var templates_available : bool

Inherited members

class CreativeStatus (*args, **kwds)
Expand source code
class CreativeStatus(Enum):
    processing = 'processing'
    approved = 'approved'
    rejected = 'rejected'
    pending_review = 'pending_review'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var approved
var pending_review
var processing
var rejected
class CssAsset (**data: Any)
Expand source code
class CssAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content: Annotated[str, Field(description='CSS content')]
    media: Annotated[
        str | None, Field(description="CSS media query context (e.g., 'screen', 'print')")
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content : str
var media : str | None
var model_config

Inherited members

class DaastVersion (*args, **kwds)
Expand source code
class DaastVersion(Enum):
    field_1_0 = '1.0'
    field_1_1 = '1.1'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var field_1_0
var field_1_1
class DailyBreakdownItem (**data: Any)
Expand source code
class DailyBreakdownItem(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    date: Annotated[str, Field(description='Date (YYYY-MM-DD)', pattern='^\\d{4}-\\d{2}-\\d{2}$')]
    impressions: Annotated[float, Field(description='Daily impressions', ge=0.0)]
    spend: Annotated[float, Field(description='Daily spend', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var date : str
var impressions : float
var model_config
var spend : float

Inherited members

class DeliverTo (**data: Any)
Expand source code
class DeliverTo(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    countries: Annotated[
        list[Country], Field(description='Countries where signals will be used (ISO codes)')
    ]
    destinations: Annotated[
        list[destination.Destination1 | destination.Destination2],
        Field(
            description='List of destination platforms (DSPs, sales agents, etc.). If the authenticated caller matches one of these destinations, activation keys will be included in the response.',
            min_length=1,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var countries : list[Country]
var destinations : list[Destination1 | Destination2]
var model_config

Inherited members

class DeliveryMeasurement (**data: Any)
Expand source code
class DeliveryMeasurement(AdCPBaseModel):
    notes: Annotated[
        str | None,
        Field(
            description="Additional details about measurement methodology in plain language (e.g., 'MRC-accredited viewability. 50% in-view for 1s display / 2s video', 'Panel-based demographic measurement updated monthly')"
        ),
    ] = None
    provider: Annotated[
        str,
        Field(
            description="Measurement provider(s) used for this product (e.g., 'Google Ad Manager with IAS viewability', 'Nielsen DAR', 'Geopath for DOOH impressions')"
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var notes : str | None
var provider : str

Inherited members

class DeliveryMetrics (**data: Any)
Expand source code
class DeliveryMetrics(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    clicks: Annotated[float | None, Field(description='Total clicks', ge=0.0)] = None
    completed_views: Annotated[
        float | None, Field(description='100% completions (for CPCV)', ge=0.0)
    ] = None
    completion_rate: Annotated[
        float | None,
        Field(description='Completion rate (completed_views/impressions)', ge=0.0, le=1.0),
    ] = None
    conversions: Annotated[
        float | None,
        Field(description='Conversions (reserved for future CPA pricing support)', ge=0.0),
    ] = None
    ctr: Annotated[
        float | None, Field(description='Click-through rate (clicks/impressions)', ge=0.0, le=1.0)
    ] = None
    dooh_metrics: Annotated[
        DoohMetrics | None,
        Field(description='DOOH-specific metrics (only included for DOOH campaigns)'),
    ] = None
    frequency: Annotated[
        float | None,
        Field(
            description='Average frequency per individual (typically measured over campaign duration, but can vary by measurement provider)',
            ge=0.0,
        ),
    ] = None
    grps: Annotated[
        float | None, Field(description='Gross Rating Points delivered (for CPP)', ge=0.0)
    ] = None
    impressions: Annotated[float | None, Field(description='Impressions delivered', ge=0.0)] = None
    leads: Annotated[
        float | None,
        Field(description='Leads generated (reserved for future CPL pricing support)', ge=0.0),
    ] = None
    quartile_data: Annotated[
        QuartileData | None, Field(description='Video quartile completion data')
    ] = None
    reach: Annotated[
        float | None,
        Field(
            description='Unique reach - units depend on measurement provider (e.g., individuals, households, devices, cookies). See delivery_measurement.provider for methodology.',
            ge=0.0,
        ),
    ] = None
    spend: Annotated[float | None, Field(description='Amount spent', ge=0.0)] = None
    views: Annotated[float | None, Field(description='Views at threshold (for CPV)', ge=0.0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var clicks : float | None
var completed_views : float | None
var completion_rate : float | None
var conversions : float | None
var ctr : float | None
var dooh_metricsDoohMetrics | None
var frequency : float | None
var grps : float | None
var impressions : float | None
var leads : float | None
var model_config
var quartile_dataQuartileData | None
var reach : float | None
var spend : float | None
var views : float | None

Inherited members

class DeliveryType (*args, **kwds)
Expand source code
class DeliveryType(Enum):
    guaranteed = 'guaranteed'
    non_guaranteed = 'non_guaranteed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var guaranteed
var non_guaranteed
class Details (**data: Any)
Expand source code
class Details(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    domain: Annotated[Domain | None, Field(description='AdCP domain where error occurred')] = None
    operation: Annotated[str | None, Field(description='Specific operation that failed')] = None
    specific_context: Annotated[
        dict[str, Any] | None, Field(description='Domain-specific error context')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var domainDomain | None
var model_config
var operation : str | None
var specific_context : dict[str, typing.Any] | None

Inherited members

class Dimensions (**data: Any)
Expand source code
class Dimensions(AdCPBaseModel):
    aspect_ratio: str | None = None
    height: Annotated[int | None, Field(ge=1)] = None
    max_height: Annotated[int | None, Field(ge=1)] = None
    max_width: Annotated[int | None, Field(ge=1)] = None
    min_height: Annotated[int | None, Field(ge=1)] = None
    min_width: Annotated[int | None, Field(ge=1)] = None
    width: Annotated[int | None, Field(ge=1)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var aspect_ratio : str | None
var height : int | None
var max_height : int | None
var max_width : int | None
var min_height : int | None
var min_width : int | None
var model_config
var width : int | None

Inherited members

class Direction (*args, **kwds)
Expand source code
class Direction(Enum):
    asc = 'asc'
    desc = 'desc'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var asc
var desc
class Disclaimer (**data: Any)
Expand source code
class Disclaimer(AdCPBaseModel):
    context: Annotated[
        str | None,
        Field(
            description="When this disclaimer applies (e.g., 'financial_products', 'health_claims', 'all')"
        ),
    ] = None
    required: Annotated[bool | None, Field(description='Whether this disclaimer must appear')] = (
        True
    )
    text: Annotated[str, Field(description='Disclaimer text')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : str | None
var model_config
var required : bool | None
var text : str

Inherited members

class Domain (*args, **kwds)
Expand source code
class Domain(Enum):
    media_buy = 'media-buy'
    signals = 'signals'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var media_buy
var signals
class DomainBreakdown (**data: Any)
Expand source code
class DomainBreakdown(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    media_buy: Annotated[
        int | None,
        Field(alias='media-buy', description='Number of media-buy tasks in results', ge=0),
    ] = None
    signals: Annotated[
        int | None, Field(description='Number of signals tasks in results', ge=0)
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var media_buy : int | None
var model_config
var signals : int | None

Inherited members

class DoohMetrics (**data: Any)
Expand source code
class DoohMetrics(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    calculation_notes: Annotated[
        str | None, Field(description='Explanation of how DOOH impressions were calculated')
    ] = None
    loop_plays: Annotated[
        int | None, Field(description='Number of times ad played in rotation', ge=0)
    ] = None
    screen_time_seconds: Annotated[
        int | None, Field(description='Total display time in seconds', ge=0)
    ] = None
    screens_used: Annotated[
        int | None, Field(description='Number of unique screens displaying the ad', ge=0)
    ] = None
    sov_achieved: Annotated[
        float | None,
        Field(description='Actual share of voice delivered (0.0 to 1.0)', ge=0.0, le=1.0),
    ] = None
    venue_breakdown: Annotated[
        list[VenueBreakdownItem] | None, Field(description='Per-venue performance breakdown')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var calculation_notes : str | None
var loop_plays : int | None
var model_config
var screen_time_seconds : int | None
var screens_used : int | None
var sov_achieved : float | None
var venue_breakdown : list[VenueBreakdownItem] | None

Inherited members

class Duration (**data: Any)
Expand source code
class Duration(AdCPBaseModel):
    exact_seconds: Annotated[float | None, Field(ge=0.0)] = None
    max_seconds: Annotated[float | None, Field(ge=0.0)] = None
    min_seconds: Annotated[float | None, Field(ge=0.0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var exact_seconds : float | None
var max_seconds : float | None
var min_seconds : float | None
var model_config

Inherited members

class Embedding (**data: Any)
Expand source code
class Embedding(AdCPBaseModel):
    csp_policy: Annotated[
        str | None, Field(description='Content Security Policy requirements for embedding')
    ] = None
    recommended_sandbox: Annotated[
        str | None,
        Field(
            description="Recommended iframe sandbox attribute value (e.g., 'allow-scripts allow-same-origin')"
        ),
    ] = None
    requires_https: Annotated[
        bool | None, Field(description='Whether this output requires HTTPS for secure embedding')
    ] = None
    supports_fullscreen: Annotated[
        bool | None, Field(description='Whether this output supports fullscreen mode')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var csp_policy : str | None
var model_config
var recommended_sandbox : str | None
var requires_https : bool | None
var supports_fullscreen : bool | None

Inherited members

class Error (**data: Any)
Expand source code
class Error(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    code: Annotated[str, Field(description='Error code for programmatic handling')]
    details: Annotated[Any | None, Field(description='Additional task-specific error details')] = (
        None
    )
    field: Annotated[
        str | None,
        Field(description="Field path associated with the error (e.g., 'packages[0].targeting')"),
    ] = None
    message: Annotated[str, Field(description='Human-readable error message')]
    retry_after: Annotated[
        float | None, Field(description='Seconds to wait before retrying the operation', ge=0.0)
    ] = None
    suggestion: Annotated[str | None, Field(description='Suggested fix for the error')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var code : str
var details : typing.Any | None
var field : str | None
var message : str
var model_config
var retry_after : float | None
var suggestion : str | None

Inherited members

class FeedFormat (*args, **kwds)
Expand source code
class FeedFormat(Enum):
    google_merchant_center = 'google_merchant_center'
    facebook_catalog = 'facebook_catalog'
    custom = 'custom'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var custom
var facebook_catalog
var google_merchant_center
class FeedbackSource (*args, **kwds)
Expand source code
class FeedbackSource(Enum):
    buyer_attribution = 'buyer_attribution'
    third_party_measurement = 'third_party_measurement'
    platform_analytics = 'platform_analytics'
    verification_partner = 'verification_partner'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var buyer_attribution
var platform_analytics
var third_party_measurement
var verification_partner
class FieldModel (*args, **kwds)
Expand source code
class FieldModel(Enum):
    creative_id = 'creative_id'
    name = 'name'
    format = 'format'
    status = 'status'
    created_date = 'created_date'
    updated_date = 'updated_date'
    tags = 'tags'
    assignments = 'assignments'
    performance = 'performance'
    sub_assets = 'sub_assets'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var assignments
var created_date
var creative_id
var format
var name
var performance
var status
var sub_assets
var tags
var updated_date
class FileSize (**data: Any)
Expand source code
class FileSize(AdCPBaseModel):
    max_bytes: Annotated[int | None, Field(ge=1)] = None
    min_bytes: Annotated[int | None, Field(ge=0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_bytes : int | None
var min_bytes : int | None
var model_config

Inherited members

class Filters (**data: Any)
Expand source code
class Filters(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    delivery_type: delivery_type_1.DeliveryType | None = None
    format_ids: Annotated[
        list[format_id.FormatId] | None, Field(description='Filter by specific format IDs')
    ] = None
    format_types: Annotated[
        list[FormatType] | None, Field(description='Filter by format types')
    ] = None
    is_fixed_price: Annotated[
        bool | None, Field(description='Filter for fixed price vs auction products')
    ] = None
    min_exposures: Annotated[
        int | None,
        Field(description='Minimum exposures/impressions needed for measurement validity', ge=1),
    ] = None
    standard_formats_only: Annotated[
        bool | None, Field(description='Only return products accepting IAB standard formats')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var delivery_typeDeliveryType | None
var format_ids : list[FormatId] | None
var format_types : list[FormatType] | None
var is_fixed_price : bool | None
var min_exposures : int | None
var model_config
var standard_formats_only : bool | None

Inherited members

class FlatRatePricingOption (**data: Any)
Expand source code
class FlatRatePricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    parameters: Annotated[
        Parameters | None,
        Field(description='Flat rate parameters for DOOH and time-based campaigns'),
    ] = None
    pricing_model: Annotated[
        Literal['flat_rate'], Field(description='Fixed cost regardless of delivery volume')
    ]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'flat_rate_usd_24h_takeover')"
        ),
    ]
    rate: Annotated[float, Field(description='Flat rate cost', ge=0.0)]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var parametersParameters | None
var pricing_model : Literal['flat_rate']
var pricing_option_id : str
var rate : float

Inherited members

class Fonts (**data: Any)
Expand source code
class Fonts(AdCPBaseModel):
    font_urls: Annotated[
        list[AnyUrl] | None, Field(description='URLs to web font files if using custom fonts')
    ] = None
    primary: Annotated[str | None, Field(description='Primary font family name')] = None
    secondary: Annotated[str | None, Field(description='Secondary font family name')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var font_urls : list[pydantic.networks.AnyUrl] | None
var model_config
var primary : str | None
var secondary : str | None

Inherited members

class Format (**data: Any)
Expand source code
class Format(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assets_required: Annotated[
        list[AssetsRequired | AssetsRequired1] | None,
        Field(
            description='Array of required assets or asset groups for this format. Each asset is identified by its asset_id, which must be used as the key in creative manifests. Can contain individual assets or repeatable asset sequences (e.g., carousel products, slideshow frames).'
        ),
    ] = None
    delivery: Annotated[
        dict[str, Any] | None,
        Field(description='Delivery method specifications (e.g., hosted, VAST, third-party tags)'),
    ] = None
    description: Annotated[
        str | None,
        Field(
            description='Plain text explanation of what this format does and what assets it requires'
        ),
    ] = None
    example_url: Annotated[
        AnyUrl | None,
        Field(
            description='Optional URL to showcase page with examples and interactive demos of this format'
        ),
    ] = None
    format_card: Annotated[
        FormatCard | None,
        Field(
            description='Optional standard visual card (300x400px) for displaying this format in user interfaces. Can be rendered via preview_creative or pre-generated.'
        ),
    ] = None
    format_card_detailed: Annotated[
        FormatCardDetailed | None,
        Field(
            description='Optional detailed card with carousel and full specifications. Provides rich format documentation similar to ad spec pages.'
        ),
    ] = None
    format_id: Annotated[
        format_id_1.FormatId,
        Field(description='Structured format identifier with agent URL and format name'),
    ]
    name: Annotated[str, Field(description='Human-readable format name')]
    output_format_ids: Annotated[
        list[format_id_1.FormatId] | None,
        Field(
            description='For generative formats: array of format IDs that this format can generate. When a format accepts inputs like brand_manifest and message, this specifies what concrete output formats can be produced (e.g., a generative banner format might output standard image banner formats).'
        ),
    ] = None
    preview_image: Annotated[
        AnyUrl | None,
        Field(
            description='DEPRECATED: Use format_card instead. Optional preview image URL for format browsing/discovery UI. Should be 400x300px (4:3 aspect ratio) PNG or JPG. Used as thumbnail/card image in format browsers. This field is maintained for backward compatibility but format_card provides a more flexible, structured approach.'
        ),
    ] = None
    renders: Annotated[
        list[Render] | None,
        Field(
            description='Specification of rendered pieces for this format. Most formats produce a single render. Companion ad formats (video + banner), adaptive formats, and multi-placement formats produce multiple renders. Each render specifies its role and dimensions.',
            min_length=1,
        ),
    ] = None
    supported_macros: Annotated[
        list[str] | None,
        Field(
            description='List of universal macros supported by this format (e.g., MEDIA_BUY_ID, CACHEBUSTER, DEVICE_ID). Used for validation and developer tooling.'
        ),
    ] = None
    type: Annotated[
        Type,
        Field(
            description='Media type of this format - determines rendering method and asset requirements'
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assets_required : list[AssetsRequired | AssetsRequired1] | None
var delivery : dict[str, typing.Any] | None
var description : str | None
var example_url : pydantic.networks.AnyUrl | None
var format_cardFormatCard | None
var format_card_detailedFormatCardDetailed | None
var format_idFormatId
var model_config
var name : str
var output_format_ids : list[FormatId] | None
var preview_image : pydantic.networks.AnyUrl | None
var renders : list[Render] | None
var supported_macros : list[str] | None
var typeType

Inherited members

class FormatCard (**data: Any)
Expand source code
class FormatCard(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    format_id: Annotated[
        format_id_1.FormatId,
        Field(
            description='Creative format defining the card layout (typically format_card_standard)'
        ),
    ]
    manifest: Annotated[
        dict[str, Any],
        Field(description='Asset manifest for rendering the card, structure defined by the format'),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var format_idFormatId
var manifest : dict[str, typing.Any]
var model_config

Inherited members

class FormatCardDetailed (**data: Any)
Expand source code
class FormatCardDetailed(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    format_id: Annotated[
        format_id_1.FormatId,
        Field(
            description='Creative format defining the detailed card layout (typically format_card_detailed)'
        ),
    ]
    manifest: Annotated[
        dict[str, Any],
        Field(
            description='Asset manifest for rendering the detailed card, structure defined by the format'
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var format_idFormatId
var manifest : dict[str, typing.Any]
var model_config

Inherited members

class FormatId (**data: Any)
Expand source code
class FormatId(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    agent_url: Annotated[
        AnyUrl,
        Field(
            description="URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)"
        ),
    ]
    id: Annotated[
        str,
        Field(
            description="Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')",
            pattern='^[a-zA-Z0-9_-]+$',
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var agent_url : pydantic.networks.AnyUrl
var id : str
var model_config

Inherited members

class FormatType (*args, **kwds)
Expand source code
class FormatType(Enum):
    video = 'video'
    display = 'display'
    audio = 'audio'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var audio
var display
var video
class FrequencyCap (**data: Any)
Expand source code
class FrequencyCap(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    suppress_minutes: Annotated[
        float, Field(description='Minutes to suppress after impression', ge=0.0)
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var suppress_minutes : float

Inherited members

class FrequencyCapScope (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class FrequencyCapScope(RootModel[Literal['package']]):
    root: Annotated[
        Literal['package'],
        Field(description='Scope for frequency cap application', title='Frequency Cap Scope'),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Literal['package']]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : Literal['package']
class GeoCountryAnyOfItem (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class GeoCountryAnyOfItem(RootModel[str]):
    root: Annotated[str, Field(pattern='^[A-Z]{2}$')]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[str]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : str
class GetMediaBuyDeliveryRequest (**data: Any)
Expand source code
class GetMediaBuyDeliveryRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    buyer_refs: Annotated[
        list[str] | None, Field(description='Array of buyer reference IDs to get delivery data for')
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='End date for reporting period (YYYY-MM-DD)',
            pattern='^\\d{4}-\\d{2}-\\d{2}$',
        ),
    ] = None
    media_buy_ids: Annotated[
        list[str] | None,
        Field(description='Array of publisher media buy IDs to get delivery data for'),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='Start date for reporting period (YYYY-MM-DD)',
            pattern='^\\d{4}-\\d{2}-\\d{2}$',
        ),
    ] = None
    status_filter: Annotated[
        StatusFilter | list[StatusFilterEnum] | None,
        Field(description='Filter by status. Can be a single status or array of statuses'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buyer_refs : list[str] | None
var context : dict[str, typing.Any] | None
var end_date : str | None
var media_buy_ids : list[str] | None
var model_config
var start_date : str | None
var status_filterStatusFilter | list[StatusFilterEnum] | None

Inherited members

class GetMediaBuyDeliveryResponse (**data: Any)
Expand source code
class GetMediaBuyDeliveryResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    aggregated_totals: Annotated[
        AggregatedTotals | None,
        Field(
            description='Combined metrics across all returned media buys. Only included in API responses (get_media_buy_delivery), not in webhook notifications.'
        ),
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    currency: Annotated[str, Field(description='ISO 4217 currency code', pattern='^[A-Z]{3}$')]
    errors: Annotated[
        list[error.Error] | None,
        Field(
            description='Task-specific errors and warnings (e.g., missing delivery data, reporting platform issues)'
        ),
    ] = None
    media_buy_deliveries: Annotated[
        list[MediaBuyDelivery],
        Field(
            description='Array of delivery data for media buys. When used in webhook notifications, may contain multiple media buys aggregated by publisher. When used in get_media_buy_delivery API responses, typically contains requested media buys.'
        ),
    ]
    next_expected_at: Annotated[
        AwareDatetime | None,
        Field(
            description="ISO 8601 timestamp for next expected notification (only present in webhook deliveries when notification_type is not 'final')"
        ),
    ] = None
    notification_type: Annotated[
        NotificationType | None,
        Field(
            description='Type of webhook notification (only present in webhook deliveries): scheduled = regular periodic update, final = campaign completed, delayed = data not yet available, adjusted = resending period with updated data'
        ),
    ] = None
    partial_data: Annotated[
        bool | None,
        Field(
            description='Indicates if any media buys in this webhook have missing/delayed data (only present in webhook deliveries)'
        ),
    ] = None
    reporting_period: Annotated[
        ReportingPeriod,
        Field(description='Date range for the report. All periods use UTC timezone.'),
    ]
    sequence_number: Annotated[
        int | None,
        Field(
            description='Sequential notification number (only present in webhook deliveries, starts at 1)',
            ge=1,
        ),
    ] = None
    unavailable_count: Annotated[
        int | None,
        Field(
            description='Number of media buys with reporting_delayed or failed status (only present in webhook deliveries when partial_data is true)',
            ge=0,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var aggregated_totalsAggregatedTotals | None
var context : dict[str, typing.Any] | None
var currency : str
var errors : list[Error] | None
var media_buy_deliveries : list[MediaBuyDelivery]
var model_config
var next_expected_at : pydantic.types.AwareDatetime | None
var notification_typeNotificationType | None
var partial_data : bool | None
var reporting_periodReportingPeriod
var sequence_number : int | None
var unavailable_count : int | None

Inherited members

class GetProductsRequest (**data: Any)
Expand source code
class GetProductsRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    brand_manifest: Annotated[
        brand_manifest_1.BrandManifest | AnyUrl | None,
        Field(
            description='Brand information manifest providing brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest.',
            examples=[
                {
                    'data': {
                        'colors': {'primary': '#FF6B35'},
                        'name': 'ACME Corporation',
                        'url': 'https://acmecorp.com',
                    },
                    'description': 'Inline brand manifest',
                },
                {
                    'data': 'https://cdn.acmecorp.com/brand-manifest.json',
                    'description': 'URL string reference to hosted manifest',
                },
            ],
            title='Brand Manifest Reference',
        ),
    ] = None
    brief: Annotated[
        str | None, Field(description='Natural language description of campaign requirements')
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    filters: Annotated[
        Filters | None, Field(description='Structured filters for product discovery')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var brand_manifestBrandManifest | pydantic.networks.AnyUrl | None
var brief : str | None
var context : dict[str, typing.Any] | None
var filtersFilters | None
var model_config

Inherited members

class GetProductsResponse (**data: Any)
Expand source code
class GetProductsResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None,
        Field(description='Task-specific errors and warnings (e.g., product filtering issues)'),
    ] = None
    products: Annotated[list[product.Product], Field(description='Array of matching products')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var errors : list[Error] | None
var model_config
var products : list[Product]

Inherited members

class GetSignalsRequest (**data: Any)
Expand source code
class GetSignalsRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    deliver_to: Annotated[
        DeliverTo, Field(description='Destination platforms where signals need to be activated')
    ]
    filters: Annotated[Filters | None, Field(description='Filters to refine results')] = None
    max_results: Annotated[
        int | None, Field(description='Maximum number of results to return', ge=1)
    ] = None
    signal_spec: Annotated[
        str, Field(description='Natural language description of the desired signals')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var deliver_toDeliverTo
var filtersFilters | None
var max_results : int | None
var model_config
var signal_spec : str

Inherited members

class GetSignalsResponse (**data: Any)
Expand source code
class GetSignalsResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None,
        Field(
            description='Task-specific errors and warnings (e.g., signal discovery or pricing issues)'
        ),
    ] = None
    signals: Annotated[list[Signal], Field(description='Array of matching signals')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var errors : list[Error] | None
var model_config
var signals : list[Signal]

Inherited members

class HistoryItem (**data: Any)
Expand source code
class HistoryItem(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    data: Annotated[dict[str, Any], Field(description='The full request or response payload')]
    timestamp: Annotated[AwareDatetime, Field(description='When this exchange occurred (ISO 8601)')]
    type: Annotated[
        Type, Field(description='Whether this was a request from client or response from server')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var data : dict[str, typing.Any]
var model_config
var timestamp : pydantic.types.AwareDatetime
var typeType

Inherited members

class HtmlAsset (**data: Any)
Expand source code
class HtmlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content: Annotated[str, Field(description='HTML content')]
    version: Annotated[str | None, Field(description="HTML version (e.g., 'HTML5')")] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content : str
var model_config
var version : str | None

Inherited members

class Identifier (**data: Any)
Expand source code
class Identifier(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    type: Annotated[
        identifier_types.PropertyIdentifierTypes,
        Field(description='Type of identifier for this property'),
    ]
    value: Annotated[
        str,
        Field(
            description="The identifier value. For domain type: 'example.com' matches base domain plus www and m subdomains; 'edition.example.com' matches that specific subdomain; '*.example.com' matches ALL subdomains but NOT base domain"
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var typePropertyIdentifierTypes
var value : str

Inherited members

class ImageAsset (**data: Any)
Expand source code
class ImageAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    alt_text: Annotated[str | None, Field(description='Alternative text for accessibility')] = None
    format: Annotated[
        str | None, Field(description='Image file format (jpg, png, gif, webp, etc.)')
    ] = None
    height: Annotated[int | None, Field(description='Image height in pixels', ge=1)] = None
    url: Annotated[AnyUrl, Field(description='URL to the image asset')]
    width: Annotated[int | None, Field(description='Image width in pixels', ge=1)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var alt_text : str | None
var format : str | None
var height : int | None
var model_config
var url : pydantic.networks.AnyUrl
var width : int | None

Inherited members

class Input (**data: Any)
Expand source code
class Input(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context_description: Annotated[
        str | None,
        Field(description='Natural language description of the context for AI-generated content'),
    ] = None
    macros: Annotated[
        dict[str, str] | None, Field(description='Macro values to apply for this preview')
    ] = None
    name: Annotated[str, Field(description='Human-readable name for this preview variant')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_description : str | None
var macros : dict[str, str] | None
var model_config
var name : str

Inherited members

class JavascriptAsset (**data: Any)
Expand source code
class JavascriptAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content: Annotated[str, Field(description='JavaScript content')]
    module_type: Annotated[ModuleType | None, Field(description='JavaScript module type')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content : str
var model_config
var module_typeModuleType | None

Inherited members

class LandingPage (*args, **kwds)
Expand source code
class LandingPage(Enum):
    any = 'any'
    retailer_site_only = 'retailer_site_only'
    must_include_retailer = 'must_include_retailer'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var any
var must_include_retailer
var retailer_site_only
class ListAuthorizedPropertiesRequest (**data: Any)
Expand source code
class ListAuthorizedPropertiesRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    publisher_domains: Annotated[
        list[PublisherDomain] | None,
        Field(
            description='Filter to specific publisher domains (optional). If omitted, returns all publishers this agent represents.',
            min_length=1,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var model_config
var publisher_domains : list[PublisherDomain] | None

Inherited members

class ListAuthorizedPropertiesResponse (**data: Any)
Expand source code
class ListAuthorizedPropertiesResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    advertising_policies: Annotated[
        str | None,
        Field(
            description="Publisher's advertising content policies, restrictions, and guidelines in natural language. May include prohibited categories, blocked advertisers, restricted tactics, brand safety requirements, or links to full policy documentation.",
            max_length=10000,
            min_length=1,
        ),
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None,
        Field(description='Task-specific errors and warnings (e.g., property availability issues)'),
    ] = None
    last_updated: Annotated[
        AwareDatetime | None,
        Field(
            description="ISO 8601 timestamp of when the agent's publisher authorization list was last updated. Buyers can use this to determine if their cached publisher adagents.json files might be stale."
        ),
    ] = None
    portfolio_description: Annotated[
        str | None,
        Field(
            description='Markdown-formatted description of the property portfolio, including inventory types, audience characteristics, and special features.',
            max_length=5000,
            min_length=1,
        ),
    ] = None
    primary_channels: Annotated[
        list[channels.AdvertisingChannels] | None,
        Field(
            description='Primary advertising channels represented in this property portfolio. Helps buying agents quickly filter relevance.',
            min_length=1,
        ),
    ] = None
    primary_countries: Annotated[
        list[PrimaryCountry] | None,
        Field(
            description='Primary countries (ISO 3166-1 alpha-2 codes) where properties are concentrated. Helps buying agents quickly filter relevance.',
            min_length=1,
        ),
    ] = None
    publisher_domains: Annotated[
        list[PublisherDomain],
        Field(
            description="Publisher domains this agent is authorized to represent. Buyers should fetch each publisher's adagents.json to see property definitions and verify this agent is in their authorized_agents list with authorization scope.",
            min_length=1,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var advertising_policies : str | None
var context : dict[str, typing.Any] | None
var errors : list[Error] | None
var last_updated : pydantic.types.AwareDatetime | None
var model_config
var portfolio_description : str | None
var primary_channels : list[AdvertisingChannels] | None
var primary_countries : list[PrimaryCountry] | None
var publisher_domains : list[PublisherDomain]

Inherited members

class ListCreativeFormatsRequest (**data: Any)
Expand source code
class ListCreativeFormatsRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_types: Annotated[
        list[AssetType] | None,
        Field(
            description="Filter to formats that include these asset types. For third-party tags, search for 'html' or 'javascript'. E.g., ['image', 'text'] returns formats with images and text, ['javascript'] returns formats accepting JavaScript tags."
        ),
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    format_ids: Annotated[
        list[format_id.FormatId] | None,
        Field(
            description='Return only these specific format IDs (e.g., from get_products response)'
        ),
    ] = None
    is_responsive: Annotated[
        bool | None,
        Field(
            description='Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions.'
        ),
    ] = None
    max_height: Annotated[
        int | None,
        Field(
            description='Maximum height in pixels (inclusive). Returns formats where ANY render has height <= this value. For multi-render formats, matches if at least one render fits.'
        ),
    ] = None
    max_width: Annotated[
        int | None,
        Field(
            description='Maximum width in pixels (inclusive). Returns formats where ANY render has width <= this value. For multi-render formats, matches if at least one render fits.'
        ),
    ] = None
    min_height: Annotated[
        int | None,
        Field(
            description='Minimum height in pixels (inclusive). Returns formats where ANY render has height >= this value.'
        ),
    ] = None
    min_width: Annotated[
        int | None,
        Field(
            description='Minimum width in pixels (inclusive). Returns formats where ANY render has width >= this value.'
        ),
    ] = None
    name_search: Annotated[
        str | None, Field(description='Search for formats by name (case-insensitive partial match)')
    ] = None
    type: Annotated[
        Type | None,
        Field(
            description='Filter by format type (technical categories with distinct requirements)'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_types : list[AssetType] | None
var context : dict[str, typing.Any] | None
var format_ids : list[FormatId] | None
var is_responsive : bool | None
var max_height : int | None
var max_width : int | None
var min_height : int | None
var min_width : int | None
var model_config
var typeType | None

Inherited members

class ListCreativeFormatsResponse (**data: Any)
Expand source code
class ListCreativeFormatsResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    creative_agents: Annotated[
        list[CreativeAgent] | None,
        Field(
            description='Optional: Creative agents that provide additional formats. Buyers can recursively query these agents to discover more formats. No authentication required for list_creative_formats.'
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None,
        Field(description='Task-specific errors and warnings (e.g., format availability issues)'),
    ] = None
    formats: Annotated[
        list[format.Format],
        Field(
            description="Full format definitions for all formats this agent supports. Each format's authoritative source is indicated by its agent_url field."
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var creative_agents : list[CreativeAgent] | None
var errors : list[Error] | None
var formats : list[Format]
var model_config

Inherited members

class ListCreativesRequest (**data: Any)
Expand source code
class ListCreativesRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    fields: Annotated[
        list[FieldModel] | None,
        Field(description='Specific fields to include in response (omit for all fields)'),
    ] = None
    filters: Annotated[
        Filters | None, Field(description='Filter criteria for querying creatives')
    ] = None
    include_assignments: Annotated[
        bool | None, Field(description='Include package assignment information in response')
    ] = True
    include_performance: Annotated[
        bool | None, Field(description='Include aggregated performance metrics in response')
    ] = False
    include_sub_assets: Annotated[
        bool | None,
        Field(description='Include sub-assets (for carousel/native formats) in response'),
    ] = False
    pagination: Annotated[Pagination | None, Field(description='Pagination parameters')] = None
    sort: Annotated[Sort | None, Field(description='Sorting parameters')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var fields : list[FieldModel] | None
var filtersFilters | None
var include_assignments : bool | None
var include_performance : bool | None
var include_sub_assets : bool | None
var model_config
var paginationPagination | None
var sortSort | None

Inherited members

class ListCreativesResponse (**data: Any)
Expand source code
class ListCreativesResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    creatives: Annotated[
        list[Creative], Field(description='Array of creative assets matching the query')
    ]
    format_summary: Annotated[
        dict[str, int] | None, Field(description='Breakdown of creatives by format type')
    ] = None
    pagination: Annotated[
        Pagination, Field(description='Pagination information for navigating results')
    ]
    query_summary: Annotated[
        QuerySummary, Field(description='Summary of the query that was executed')
    ]
    status_summary: Annotated[
        StatusSummary | None, Field(description='Breakdown of creatives by status')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var creatives : list[Creative]
var format_summary : dict[str, int] | None
var model_config
var paginationPagination
var query_summaryQuerySummary
var status_summaryStatusSummary | None

Inherited members

Expand source code
class Logo(AdCPBaseModel):
    height: Annotated[int | None, Field(description='Logo height in pixels')] = None
    tags: Annotated[
        list[str] | None,
        Field(
            description="Semantic tags describing the logo variant (e.g., 'dark', 'light', 'square', 'horizontal', 'icon')"
        ),
    ] = None
    url: Annotated[AnyUrl, Field(description='URL to the logo asset')]
    width: Annotated[int | None, Field(description='Logo width in pixels')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var height : int | None
var model_config
var tags : list[str] | None
var url : pydantic.networks.AnyUrl
var width : int | None

Inherited members

class MarkdownAsset (**data: Any)
Expand source code
class MarkdownAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    allow_raw_html: Annotated[
        bool | None,
        Field(
            description='Whether raw HTML blocks are allowed in the markdown. False recommended for security.'
        ),
    ] = False
    content: Annotated[
        str,
        Field(
            description='Markdown content following CommonMark spec with optional GitHub Flavored Markdown extensions'
        ),
    ]
    language: Annotated[str | None, Field(description="Language code (e.g., 'en', 'es', 'fr')")] = (
        None
    )
    markdown_flavor: Annotated[
        MarkdownFlavor | None,
        Field(
            description='Markdown flavor used. CommonMark for strict compatibility, GFM for tables/task lists/strikethrough.'
        ),
    ] = MarkdownFlavor.commonmark

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var allow_raw_html : bool | None
var content : str
var language : str | None
var markdown_flavorMarkdownFlavor | None
var model_config

Inherited members

class MarkdownFlavor (*args, **kwds)
Expand source code
class MarkdownFlavor(Enum):
    commonmark = 'commonmark'
    gfm = 'gfm'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var commonmark
var gfm
class Measurement (**data: Any)
Expand source code
class Measurement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    attribution: Annotated[
        str,
        Field(
            description='Attribution methodology',
            examples=['deterministic_purchase', 'probabilistic'],
        ),
    ]
    reporting: Annotated[
        str,
        Field(
            description='Reporting frequency and format',
            examples=['weekly_dashboard', 'real_time_api'],
        ),
    ]
    type: Annotated[
        str,
        Field(
            description='Type of measurement',
            examples=['incremental_sales_lift', 'brand_lift', 'foot_traffic'],
        ),
    ]
    window: Annotated[
        str | None, Field(description='Attribution window', examples=['30_days', '7_days'])
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var attribution : str
var model_config
var reporting : str
var type : str
var window : str | None

Inherited members

class MeasurementPeriod (**data: Any)
Expand source code
class MeasurementPeriod(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    end: Annotated[
        AwareDatetime, Field(description='ISO 8601 end timestamp for measurement period')
    ]
    start: Annotated[
        AwareDatetime, Field(description='ISO 8601 start timestamp for measurement period')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var end : pydantic.types.AwareDatetime
var model_config
var start : pydantic.types.AwareDatetime

Inherited members

class MediaBuy (**data: Any)
Expand source code
class MediaBuy(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference identifier for this media buy")
    ] = None
    created_at: Annotated[AwareDatetime | None, Field(description='Creation timestamp')] = None
    creative_deadline: Annotated[
        AwareDatetime | None, Field(description='ISO 8601 timestamp for creative upload deadline')
    ] = None
    media_buy_id: Annotated[
        str, Field(description="Publisher's unique identifier for the media buy")
    ]
    packages: Annotated[
        list[package.Package], Field(description='Array of packages within this media buy')
    ]
    promoted_offering: Annotated[
        str, Field(description='Description of advertiser and what is being promoted')
    ]
    status: media_buy_status.MediaBuyStatus
    total_budget: Annotated[float, Field(description='Total budget amount', ge=0.0)]
    updated_at: Annotated[AwareDatetime | None, Field(description='Last update timestamp')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buyer_ref : str | None
var created_at : pydantic.types.AwareDatetime | None
var creative_deadline : pydantic.types.AwareDatetime | None
var media_buy_id : str
var model_config
var packages : list[Package]
var promoted_offering : str
var statusMediaBuyStatus
var total_budget : float
var updated_at : pydantic.types.AwareDatetime | None

Inherited members

class MediaBuyDelivery (**data: Any)
Expand source code
class MediaBuyDelivery(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference identifier for this media buy")
    ] = None
    by_package: Annotated[list[ByPackageItem], Field(description='Metrics broken down by package')]
    daily_breakdown: Annotated[
        list[DailyBreakdownItem] | None, Field(description='Day-by-day delivery')
    ] = None
    expected_availability: Annotated[
        AwareDatetime | None,
        Field(
            description='When delayed data is expected to be available (only present when status is reporting_delayed)'
        ),
    ] = None
    is_adjusted: Annotated[
        bool | None,
        Field(
            description='Indicates this delivery contains updated data for a previously reported period. Buyer should replace previous period data with these totals.'
        ),
    ] = None
    media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
    pricing_model: Annotated[
        pricing_model_1.PricingModel | None,
        Field(description='Pricing model used for this media buy'),
    ] = None
    status: Annotated[
        Status,
        Field(
            description='Current media buy status. In webhook context, reporting_delayed indicates data temporarily unavailable.'
        ),
    ]
    totals: Totals

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buyer_ref : str | None
var by_package : list[ByPackageItem]
var daily_breakdown : list[DailyBreakdownItem] | None
var expected_availability : pydantic.types.AwareDatetime | None
var is_adjusted : bool | None
var media_buy_id : str
var model_config
var pricing_modelPricingModel | None
var statusStatus
var totalsTotals

Inherited members

class MediaBuyStatus (*args, **kwds)
Expand source code
class MediaBuyStatus(Enum):
    pending_activation = 'pending_activation'
    active = 'active'
    paused = 'paused'
    completed = 'completed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var completed
var paused
var pending_activation
class Metadata (**data: Any)
Expand source code
class Metadata(AdCPBaseModel):
    created_date: Annotated[
        AwareDatetime | None, Field(description='When this brand manifest was created')
    ] = None
    updated_date: Annotated[
        AwareDatetime | None, Field(description='When this brand manifest was last updated')
    ] = None
    version: Annotated[str | None, Field(description='Brand card version number')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var created_date : pydantic.types.AwareDatetime | None
var model_config
var updated_date : pydantic.types.AwareDatetime | None
var version : str | None

Inherited members

class Method (*args, **kwds)
Expand source code
class Method(Enum):
    GET = 'GET'
    POST = 'POST'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var GET
var POST
class MetricType (*args, **kwds)
Expand source code
class MetricType(Enum):
    overall_performance = 'overall_performance'
    conversion_rate = 'conversion_rate'
    brand_lift = 'brand_lift'
    click_through_rate = 'click_through_rate'
    completion_rate = 'completion_rate'
    viewability = 'viewability'
    brand_safety = 'brand_safety'
    cost_efficiency = 'cost_efficiency'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var brand_lift
var brand_safety
var click_through_rate
var completion_rate
var conversion_rate
var cost_efficiency
var overall_performance
var viewability
class ModuleType (*args, **kwds)
Expand source code
class ModuleType(Enum):
    esm = 'esm'
    commonjs = 'commonjs'
    script = 'script'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var commonjs
var esm
var script
class NotificationType (*args, **kwds)
Expand source code
class NotificationType(Enum):
    scheduled = 'scheduled'
    final = 'final'
    delayed = 'delayed'
    adjusted = 'adjusted'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var adjusted
var delayed
var final
var scheduled
class Offering (**data: Any)
Expand source code
class Offering(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assets: Annotated[
        list[dict[str, Any]] | None, Field(description='Assets specific to this offering')
    ] = None
    description: Annotated[str | None, Field(description="Description of what's being offered")] = (
        None
    )
    name: Annotated[
        str, Field(description="Offering name (e.g., 'Winter Sale', 'New Product Launch')")
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assets : list[dict[str, typing.Any]] | None
var description : str | None
var model_config
var name : str

Inherited members

class OutputFormat (*args, **kwds)
Expand source code
class OutputFormat(Enum):
    url = 'url'
    html = 'html'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var html
var url
class Pacing (*args, **kwds)
Expand source code
class Pacing(Enum):
    even = 'even'
    asap = 'asap'
    front_loaded = 'front_loaded'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var asap
var even
var front_loaded
class Package (**data: Any)
Expand source code
class Package(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    bid_price: Annotated[
        float | None,
        Field(
            description='Bid price for auction-based CPM pricing (present if using cpm-auction-option)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float | None,
        Field(
            description='Budget allocation for this package in the currency specified by the pricing option',
            ge=0.0,
        ),
    ] = None
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference identifier for this package")
    ] = None
    creative_assignments: Annotated[
        list[creative_assignment.CreativeAssignment] | None,
        Field(description='Creative assets assigned to this package'),
    ] = None
    format_ids_to_provide: Annotated[
        list[format_id.FormatId] | None,
        Field(description='Format IDs that creative assets will be provided for this package'),
    ] = None
    impressions: Annotated[
        float | None, Field(description='Impression goal for this package', ge=0.0)
    ] = None
    pacing: pacing_1.Pacing | None = None
    package_id: Annotated[str, Field(description="Publisher's unique identifier for the package")]
    pricing_option_id: Annotated[
        str | None,
        Field(
            description="ID of the selected pricing option from the product's pricing_options array"
        ),
    ] = None
    product_id: Annotated[
        str | None, Field(description='ID of the product this package is based on')
    ] = None
    status: package_status.PackageStatus
    targeting_overlay: targeting.TargetingOverlay | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bid_price : float | None
var budget : float | None
var buyer_ref : str | None
var creative_assignments : list[CreativeAssignment] | None
var format_ids_to_provide : list[FormatId] | None
var impressions : float | None
var model_config
var pacingPacing | None
var package_id : str
var pricing_option_id : str | None
var product_id : str | None
var statusPackageStatus
var targeting_overlayTargetingOverlay | None

Inherited members

class PackageRequest (**data: Any)
Expand source code
class PackageRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    bid_price: Annotated[
        float | None,
        Field(
            description='Bid price for auction-based CPM pricing (required if using cpm-auction-option)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float,
        Field(description="Budget allocation for this package in the media buy's currency", ge=0.0),
    ]
    buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this package")]
    creative_ids: Annotated[
        list[str] | None,
        Field(
            description='Creative IDs to assign to this package at creation time (references existing library creatives)'
        ),
    ] = None
    creatives: Annotated[
        list[creative_asset.CreativeAsset] | None,
        Field(
            description='Full creative objects to upload and assign to this package at creation time (alternative to creative_ids - creatives will be added to library). Supports both static and generative creatives.',
            max_length=100,
        ),
    ] = None
    format_ids: Annotated[
        list[format_id.FormatId] | None,
        Field(
            description='Array of format IDs that will be used for this package - must be supported by the product. If omitted, defaults to all formats supported by the product.',
            min_length=1,
        ),
    ] = None
    pacing: pacing_1.Pacing | None = None
    pricing_option_id: Annotated[
        str,
        Field(
            description="ID of the selected pricing option from the product's pricing_options array"
        ),
    ]
    product_id: Annotated[str, Field(description='Product ID for this package')]
    targeting_overlay: targeting.TargetingOverlay | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bid_price : float | None
var budget : float
var buyer_ref : str
var creative_ids : list[str] | None
var creatives : list[CreativeAsset] | None
var format_ids : list[FormatId] | None
var model_config
var pacingPacing | None
var pricing_option_id : str
var product_id : str
var targeting_overlayTargetingOverlay | None

Inherited members

class PackageStatus (*args, **kwds)
Expand source code
class PackageStatus(Enum):
    draft = 'draft'
    active = 'active'
    paused = 'paused'
    completed = 'completed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var completed
var draft
var paused
class Packages (**data: Any)
Expand source code
class Packages(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    active: Annotated[bool | None, Field(description='Pause/resume specific package')] = None
    bid_price: Annotated[
        float | None,
        Field(
            description='Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float | None,
        Field(
            description='Updated budget allocation for this package in the currency specified by the pricing option',
            ge=0.0,
        ),
    ] = None
    buyer_ref: Annotated[
        str | None, Field(description="Buyer's reference for the package to update")
    ] = None
    creative_ids: Annotated[list[str] | None, Field(description='Update creative assignments')] = (
        None
    )
    pacing: pacing_1.Pacing | None = None
    package_id: Annotated[str, Field(description="Publisher's ID of package to update")]
    targeting_overlay: targeting.TargetingOverlay | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var active : bool | None
var bid_price : float | None
var budget : float | None
var buyer_ref : str | None
var creative_ids : list[str] | None
var model_config
var pacingPacing | None
var package_id : str
var targeting_overlayTargetingOverlay | None

Inherited members

class Pagination (**data: Any)
Expand source code
class Pagination(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    limit: Annotated[
        int | None, Field(description='Maximum number of creatives to return', ge=1, le=100)
    ] = 50
    offset: Annotated[int | None, Field(description='Number of creatives to skip', ge=0)] = 0

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var limit : int | None
var model_config
var offset : int | None

Inherited members

class Parameters (**data: Any)
Expand source code
class Parameters(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    demographic: Annotated[
        str,
        Field(
            description='Target demographic in Nielsen format: P/M/W/A/C + age range. Examples: P18-49 (Persons 18-49), M25-54 (Men 25-54), W35+ (Women 35+), A18-34 (Adults 18-34), C2-11 (Children 2-11)',
            pattern='^[PMWAC][0-9]{2}(-[0-9]{2}|\\+)$',
        ),
    ]
    min_points: Annotated[
        float | None,
        Field(description='Minimum GRPs/TRPs required for this pricing option', ge=0.0),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var demographic : str
var min_points : float | None
var model_config

Inherited members

class Performance (**data: Any)
Expand source code
class Performance(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    clicks: Annotated[
        int | None, Field(description='Total clicks across all assignments', ge=0)
    ] = None
    conversion_rate: Annotated[
        float | None, Field(description='Conversion rate across all assignments', ge=0.0, le=1.0)
    ] = None
    ctr: Annotated[
        float | None, Field(description='Click-through rate (clicks/impressions)', ge=0.0, le=1.0)
    ] = None
    impressions: Annotated[
        int | None, Field(description='Total impressions across all assignments', ge=0)
    ] = None
    last_updated: Annotated[
        AwareDatetime, Field(description='When performance data was last updated')
    ]
    performance_score: Annotated[
        float | None, Field(description='Aggregated performance score (0-100)', ge=0.0, le=100.0)
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var clicks : int | None
var conversion_rate : float | None
var ctr : float | None
var impressions : int | None
var last_updated : pydantic.types.AwareDatetime
var model_config
var performance_score : float | None

Inherited members

class PerformanceFeedback (**data: Any)
Expand source code
class PerformanceFeedback(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    applied_at: Annotated[
        AwareDatetime | None,
        Field(
            description='ISO 8601 timestamp when feedback was applied to optimization algorithms'
        ),
    ] = None
    creative_id: Annotated[
        str | None, Field(description='Specific creative asset (if feedback is creative-specific)')
    ] = None
    feedback_id: Annotated[
        str, Field(description='Unique identifier for this performance feedback submission')
    ]
    feedback_source: Annotated[FeedbackSource, Field(description='Source of the performance data')]
    measurement_period: Annotated[
        MeasurementPeriod, Field(description='Time period for performance measurement')
    ]
    media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
    metric_type: Annotated[MetricType, Field(description='The business metric being measured')]
    package_id: Annotated[
        str | None,
        Field(
            description='Specific package within the media buy (if feedback is package-specific)'
        ),
    ] = None
    performance_index: Annotated[
        float,
        Field(
            description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
            ge=0.0,
        ),
    ]
    status: Annotated[Status, Field(description='Processing status of the performance feedback')]
    submitted_at: Annotated[
        AwareDatetime, Field(description='ISO 8601 timestamp when feedback was submitted')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var applied_at : pydantic.types.AwareDatetime | None
var creative_id : str | None
var feedback_id : str
var feedback_sourceFeedbackSource
var measurement_periodMeasurementPeriod
var media_buy_id : str
var metric_typeMetricType
var model_config
var package_id : str | None
var performance_index : float
var statusStatus
var submitted_at : pydantic.types.AwareDatetime

Inherited members

class Placement (**data: Any)
Expand source code
class Placement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    description: Annotated[
        str | None, Field(description='Detailed description of where and how the placement appears')
    ] = None
    format_ids: Annotated[
        list[format_id.FormatId] | None,
        Field(
            description="Format IDs supported by this specific placement (subset of product's formats)",
            min_length=1,
        ),
    ] = None
    name: Annotated[
        str,
        Field(
            description="Human-readable name for the placement (e.g., 'Homepage Banner', 'Article Sidebar')"
        ),
    ]
    placement_id: Annotated[
        str, Field(description='Unique identifier for the placement within the product')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var description : str | None
var format_ids : list[FormatId] | None
var model_config
var name : str
var placement_id : str

Inherited members

class Preview (**data: Any)
Expand source code
class Preview(AdCPBaseModel):
    input: Annotated[
        Input,
        Field(
            description='The input parameters that generated this preview variant. Echoes back the request input or shows defaults used.'
        ),
    ]
    preview_id: Annotated[str, Field(description='Unique identifier for this preview variant')]
    renders: Annotated[
        list[
            preview_render.PreviewRender1
            | preview_render.PreviewRender2
            | preview_render.PreviewRender3
        ],
        Field(
            description='Array of rendered pieces for this preview variant. Most formats render as a single piece. Companion ad formats (video + banner), multi-placement formats, and adaptive formats render as multiple pieces.',
            min_length=1,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var inputInput
var model_config
var preview_id : str
var renders : list[PreviewRender1 | PreviewRender2 | PreviewRender3]

Inherited members

class PreviewCreativeRequest (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PreviewCreativeRequest(RootModel[PreviewCreativeRequest1 | PreviewCreativeRequest2]):
    root: Annotated[
        PreviewCreativeRequest1 | PreviewCreativeRequest2,
        Field(
            description='Request to generate previews of one or more creative manifests. Accepts either a single creative request or an array of requests for batch processing.',
            title='Preview Creative Request',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[PreviewCreativeRequest1, PreviewCreativeRequest2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootPreviewCreativeRequest1 | PreviewCreativeRequest2
class PreviewCreativeResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PreviewCreativeResponse(RootModel[PreviewCreativeResponse1 | PreviewCreativeResponse2]):
    root: Annotated[
        PreviewCreativeResponse1 | PreviewCreativeResponse2,
        Field(
            description='Response containing preview links for one or more creatives. Format matches the request: single preview response for single requests, batch results for batch requests.',
            title='Preview Creative Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[PreviewCreativeResponse1, PreviewCreativeResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootPreviewCreativeResponse1 | PreviewCreativeResponse2
class PreviewRender (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PreviewRender(
    RootModel[
        PreviewRender1
        | PreviewRender2
        | PreviewRender3
    ]
):
    root: Annotated[
        PreviewRender1
        | PreviewRender2
        | PreviewRender3,
        Field(
            description='A single rendered piece of a creative preview with discriminated output format',
            title='Preview Render',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[PreviewRender1, PreviewRender2, PreviewRender3]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootPreviewRender1 | PreviewRender2 | PreviewRender3
class PriceGuidance (**data: Any)
Expand source code
class PriceGuidance(AdCPBaseModel):
    floor: Annotated[
        float,
        Field(
            description='Minimum bid price - publisher will reject bids under this value', ge=0.0
        ),
    ]
    p25: Annotated[float | None, Field(description='25th percentile winning price', ge=0.0)] = None
    p50: Annotated[float | None, Field(description='Median winning price', ge=0.0)] = None
    p75: Annotated[float | None, Field(description='75th percentile winning price', ge=0.0)] = None
    p90: Annotated[float | None, Field(description='90th percentile winning price', ge=0.0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var floor : float
var model_config
var p25 : float | None
var p50 : float | None
var p75 : float | None
var p90 : float | None

Inherited members

class Pricing (**data: Any)
Expand source code
class Pricing(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    cpm: Annotated[float, Field(description='Cost per thousand impressions', ge=0.0)]
    currency: Annotated[str, Field(description='Currency code', pattern='^[A-Z]{3}$')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var cpm : float
var currency : str
var model_config

Inherited members

class PricingModel (*args, **kwds)
Expand source code
class PricingModel(Enum):
    cpm = 'cpm'
    vcpm = 'vcpm'
    cpc = 'cpc'
    cpcv = 'cpcv'
    cpv = 'cpv'
    cpp = 'cpp'
    flat_rate = 'flat_rate'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var cpc
var cpcv
var cpm
var cpp
var cpv
var flat_rate
var vcpm
class PrimaryCountry (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PrimaryCountry(RootModel[str]):
    root: Annotated[str, Field(pattern='^[A-Z]{2}$')]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[str]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : str
class Product (**data: Any)
Expand source code
class Product(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    brief_relevance: Annotated[
        str | None,
        Field(
            description='Explanation of why this product matches the brief (only included when brief is provided)'
        ),
    ] = None
    creative_policy: creative_policy_1.CreativePolicy | None = None
    delivery_measurement: Annotated[
        DeliveryMeasurement,
        Field(
            description='Measurement provider and methodology for delivery metrics. The buyer accepts the declared provider as the source of truth for the buy. REQUIRED for all products.'
        ),
    ]
    delivery_type: delivery_type_1.DeliveryType
    description: Annotated[
        str, Field(description='Detailed description of the product and its inventory')
    ]
    estimated_exposures: Annotated[
        int | None,
        Field(description='Estimated exposures/impressions for guaranteed products', ge=0),
    ] = None
    expires_at: Annotated[
        AwareDatetime | None, Field(description='Expiration timestamp for custom products')
    ] = None
    format_ids: Annotated[
        list[format_id_1.FormatId],
        Field(
            description='Array of supported creative format IDs - structured format_id objects with agent_url and id'
        ),
    ]
    is_custom: Annotated[bool | None, Field(description='Whether this is a custom product')] = None
    measurement: measurement_1.Measurement | None = None
    name: Annotated[str, Field(description='Human-readable product name')]
    placements: Annotated[
        list[placement.Placement] | None,
        Field(
            description='Optional array of specific placements within this product. When provided, buyers can target specific placements when assigning creatives.',
            min_length=1,
        ),
    ] = None
    pricing_options: Annotated[
        list[
            cpm_fixed_option.CpmFixedRatePricingOption
            | cpm_auction_option.CpmAuctionPricingOption
            | vcpm_fixed_option.VcpmFixedRatePricingOption
            | vcpm_auction_option.VcpmAuctionPricingOption
            | cpc_option.CpcPricingOption
            | cpcv_option.CpcvPricingOption
            | cpv_option.CpvPricingOption
            | cpp_option.CppPricingOption
            | flat_rate_option.FlatRatePricingOption
        ],
        Field(description='Available pricing models for this product', min_length=1),
    ]
    product_card: Annotated[
        ProductCard | None,
        Field(
            description='Optional standard visual card (300x400px) for displaying this product in user interfaces. Can be rendered via preview_creative or pre-generated.'
        ),
    ] = None
    product_card_detailed: Annotated[
        ProductCardDetailed | None,
        Field(
            description='Optional detailed card with carousel and full specifications. Provides rich product presentation similar to media kit pages.'
        ),
    ] = None
    product_id: Annotated[str, Field(description='Unique identifier for the product')]
    publisher_properties: Annotated[
        list[
            publisher_property_selector.PublisherPropertySelector1
            | publisher_property_selector.PublisherPropertySelector2
            | publisher_property_selector.PublisherPropertySelector3
        ],
        Field(
            description="Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization. Selection patterns mirror the authorization patterns in adagents.json for consistency.",
            min_length=1,
        ),
    ]
    reporting_capabilities: reporting_capabilities_1.ReportingCapabilities | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var brief_relevance : str | None
var creative_policyCreativePolicy | None
var delivery_measurementDeliveryMeasurement
var delivery_typeDeliveryType
var description : str
var estimated_exposures : int | None
var expires_at : pydantic.types.AwareDatetime | None
var format_ids : list[FormatId]
var is_custom : bool | None
var measurementMeasurement | None
var model_config
var name : str
var placements : list[Placement] | None
var pricing_options : list[CpmFixedRatePricingOption | CpmAuctionPricingOption | VcpmFixedRatePricingOption | VcpmAuctionPricingOption | CpcPricingOption | CpcvPricingOption | CpvPricingOption | CppPricingOption | FlatRatePricingOption]
var product_cardProductCard | None
var product_card_detailedProductCardDetailed | None
var product_id : str
var publisher_properties : list[PublisherPropertySelector1 | PublisherPropertySelector2 | PublisherPropertySelector3]
var reporting_capabilitiesReportingCapabilities | None

Inherited members

class ProductCard (**data: Any)
Expand source code
class ProductCard(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    format_id: Annotated[
        format_id_1.FormatId,
        Field(
            description='Creative format defining the card layout (typically product_card_standard)'
        ),
    ]
    manifest: Annotated[
        dict[str, Any],
        Field(description='Asset manifest for rendering the card, structure defined by the format'),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var format_idFormatId
var manifest : dict[str, typing.Any]
var model_config

Inherited members

class ProductCardDetailed (**data: Any)
Expand source code
class ProductCardDetailed(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    format_id: Annotated[
        format_id_1.FormatId,
        Field(
            description='Creative format defining the detailed card layout (typically product_card_detailed)'
        ),
    ]
    manifest: Annotated[
        dict[str, Any],
        Field(
            description='Asset manifest for rendering the detailed card, structure defined by the format'
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var format_idFormatId
var manifest : dict[str, typing.Any]
var model_config

Inherited members

class ProductCatalog (**data: Any)
Expand source code
class ProductCatalog(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    categories: Annotated[
        list[str] | None,
        Field(description='Product categories available in the catalog (for filtering)'),
    ] = None
    feed_format: Annotated[FeedFormat | None, Field(description='Format of the product feed')] = (
        FeedFormat.google_merchant_center
    )
    feed_url: Annotated[AnyUrl, Field(description='URL to product catalog feed')]
    last_updated: Annotated[
        AwareDatetime | None, Field(description='When the product catalog was last updated')
    ] = None
    update_frequency: Annotated[
        UpdateFrequency | None, Field(description='How frequently the product catalog is updated')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var categories : list[str] | None
var feed_formatFeedFormat | None
var feed_url : pydantic.networks.AnyUrl
var last_updated : pydantic.types.AwareDatetime | None
var model_config
var update_frequencyUpdateFrequency | None

Inherited members

class Progress (**data: Any)
Expand source code
class Progress(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    current_step: Annotated[
        str | None, Field(description='Current step or phase of the operation')
    ] = None
    percentage: Annotated[
        float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
    ] = None
    step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
    total_steps: Annotated[
        int | None, Field(description='Total number of steps in the operation', ge=1)
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var current_step : str | None
var model_config
var percentage : float | None
var step_number : int | None
var total_steps : int | None

Inherited members

class PromotedOfferings (**data: Any)
Expand source code
class PromotedOfferings(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    asset_selectors: Annotated[
        AssetSelectors | None,
        Field(description='Selectors to choose specific assets from the brand manifest'),
    ] = None
    brand_manifest: Annotated[
        brand_manifest_1.BrandManifest | AnyUrl,
        Field(
            description='Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.',
            examples=[
                {
                    'data': {
                        'colors': {'primary': '#FF6B35'},
                        'name': 'ACME Corporation',
                        'url': 'https://acmecorp.com',
                    },
                    'description': 'Inline brand manifest',
                },
                {
                    'data': 'https://cdn.acmecorp.com/brand-manifest.json',
                    'description': 'URL string reference to hosted manifest',
                },
            ],
            title='Brand Manifest Reference',
        ),
    ]
    offerings: Annotated[
        list[Offering] | None,
        Field(
            description='Inline offerings for campaigns without a product catalog. Each offering has a name, description, and associated assets.'
        ),
    ] = None
    product_selectors: Annotated[
        promoted_products.PromotedProducts | None,
        Field(
            description='Selectors to choose which products/offerings from the brand manifest product catalog to promote'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var asset_selectorsAssetSelectors | None
var brand_manifestBrandManifest | pydantic.networks.AnyUrl
var model_config
var offerings : list[Offering] | None
var product_selectorsPromotedProducts | None

Inherited members

class PromotedProducts (**data: Any)
Expand source code
class PromotedProducts(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    manifest_category: Annotated[
        str | None,
        Field(
            description="Select products from a specific category in the brand manifest product catalog (e.g., 'beverages/soft-drinks', 'food/sauces')"
        ),
    ] = None
    manifest_query: Annotated[
        str | None,
        Field(
            description="Natural language query to select products from the brand manifest (e.g., 'all Kraft Heinz pasta sauces', 'organic products under $20')"
        ),
    ] = None
    manifest_skus: Annotated[
        list[str] | None,
        Field(description='Direct product SKU references from the brand manifest product catalog'),
    ] = None
    manifest_tags: Annotated[
        list[str] | None,
        Field(
            description="Select products by tags from the brand manifest product catalog (e.g., 'organic', 'sauces', 'holiday')"
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var manifest_category : str | None
var manifest_query : str | None
var manifest_skus : list[str] | None
var manifest_tags : list[str] | None
var model_config

Inherited members

class Property (**data: Any)
Expand source code
class Property(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    identifiers: Annotated[
        list[Identifier], Field(description='Array of identifiers for this property', min_length=1)
    ]
    name: Annotated[str, Field(description='Human-readable property name')]
    property_id: Annotated[
        str | None,
        Field(
            description="Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects. Recommended format: lowercase with underscores (e.g., 'cnn_ctv_app', 'instagram_mobile')",
            pattern='^[a-z0-9_]+$',
        ),
    ] = None
    property_type: Annotated[PropertyType, Field(description='Type of advertising property')]
    publisher_domain: Annotated[
        str | None,
        Field(
            description='Domain where adagents.json should be checked for authorization validation. Required for list_authorized_properties response. Optional in adagents.json (file location implies domain).'
        ),
    ] = None
    tags: Annotated[
        list[Tag] | None,
        Field(
            description='Tags for categorization and grouping (e.g., network membership, content categories)'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var identifiers : list[Identifier]
var model_config
var name : str
var property_id : str | None
var property_typePropertyType
var publisher_domain : str | None
var tags : list[Tag] | None

Inherited members

class PropertyIdentifierTypes (*args, **kwds)
Expand source code
class PropertyIdentifierTypes(Enum):
    domain = 'domain'
    subdomain = 'subdomain'
    network_id = 'network_id'
    ios_bundle = 'ios_bundle'
    android_package = 'android_package'
    apple_app_store_id = 'apple_app_store_id'
    google_play_id = 'google_play_id'
    roku_store_id = 'roku_store_id'
    fire_tv_asin = 'fire_tv_asin'
    samsung_app_id = 'samsung_app_id'
    apple_tv_bundle = 'apple_tv_bundle'
    bundle_id = 'bundle_id'
    venue_id = 'venue_id'
    screen_id = 'screen_id'
    openooh_venue_type = 'openooh_venue_type'
    rss_url = 'rss_url'
    apple_podcast_id = 'apple_podcast_id'
    spotify_show_id = 'spotify_show_id'
    podcast_guid = 'podcast_guid'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var android_package
var apple_app_store_id
var apple_podcast_id
var apple_tv_bundle
var bundle_id
var domain
var fire_tv_asin
var google_play_id
var ios_bundle
var network_id
var openooh_venue_type
var podcast_guid
var roku_store_id
var rss_url
var samsung_app_id
var screen_id
var spotify_show_id
var subdomain
var venue_id
class PropertyType (*args, **kwds)
Expand source code
class PropertyType(Enum):
    website = 'website'
    mobile_app = 'mobile_app'
    ctv_app = 'ctv_app'
    dooh = 'dooh'
    podcast = 'podcast'
    radio = 'radio'
    streaming_audio = 'streaming_audio'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var ctv_app
var dooh
var mobile_app
var podcast
var radio
var streaming_audio
var website
class ProtocolEnvelope (**data: Any)
Expand source code
class ProtocolEnvelope(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context_id: Annotated[
        str | None,
        Field(
            description='Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context.'
        ),
    ] = None
    message: Annotated[
        str | None,
        Field(
            description='Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.'
        ),
    ] = None
    payload: Annotated[
        dict[str, Any],
        Field(
            description='The actual task-specific response data. This is the content defined in individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). Contains only domain-specific data without protocol-level fields.'
        ),
    ]
    push_notification_config: Annotated[
        push_notification_config_1.PushNotificationConfig | None,
        Field(
            description='Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.'
        ),
    ] = None
    status: Annotated[
        task_status.TaskStatus,
        Field(
            description='Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. Managed by the protocol layer.'
        ),
    ]
    task_id: Annotated[
        str | None,
        Field(
            description='Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.'
        ),
    ] = None
    timestamp: Annotated[
        AwareDatetime | None,
        Field(
            description='ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var message : str | None
var model_config
var payload : dict[str, typing.Any]
var push_notification_configPushNotificationConfig | None
var statusTaskStatus
var task_id : str | None
var timestamp : pydantic.types.AwareDatetime | None

Inherited members

class ProtocolResponse (**data: Any)
Expand source code
class ProtocolResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context_id: Annotated[str | None, Field(description='Session continuity identifier')] = None
    data: Annotated[
        Any | None,
        Field(
            description='AdCP task-specific response data (see individual task response schemas)'
        ),
    ] = None
    message: Annotated[str, Field(description='Human-readable summary')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var data : typing.Any | None
var message : str
var model_config

Inherited members

class ProvidePerformanceFeedbackRequest (**data: Any)
Expand source code
class ProvidePerformanceFeedbackRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    creative_id: Annotated[
        str | None,
        Field(
            description='Specific creative asset (if feedback is creative-specific)', min_length=1
        ),
    ] = None
    feedback_source: Annotated[
        FeedbackSource | None, Field(description='Source of the performance data')
    ] = FeedbackSource.buyer_attribution
    measurement_period: Annotated[
        MeasurementPeriod, Field(description='Time period for performance measurement')
    ]
    media_buy_id: Annotated[
        str, Field(description="Publisher's media buy identifier", min_length=1)
    ]
    metric_type: Annotated[
        MetricType | None, Field(description='The business metric being measured')
    ] = MetricType.overall_performance
    package_id: Annotated[
        str | None,
        Field(
            description='Specific package within the media buy (if feedback is package-specific)',
            min_length=1,
        ),
    ] = None
    performance_index: Annotated[
        float,
        Field(
            description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
            ge=0.0,
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var creative_id : str | None
var feedback_sourceFeedbackSource | None
var measurement_periodMeasurementPeriod
var media_buy_id : str
var metric_typeMetricType | None
var model_config
var package_id : str | None
var performance_index : float

Inherited members

class ProvidePerformanceFeedbackResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class ProvidePerformanceFeedbackResponse(
    RootModel[ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2]
):
    root: Annotated[
        ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2,
        Field(
            description='Response payload for provide_performance_feedback task. Returns either success confirmation OR error information, never both.',
            title='Provide Performance Feedback Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[ProvidePerformanceFeedbackResponse1, ProvidePerformanceFeedbackResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2
class PublisherDomain (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class PublisherDomain(RootModel[str]):
    root: Annotated[
        str,
        Field(
            description="Publisher domain to filter by (e.g., 'cnn.com', 'espn.com')",
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[str]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : str
class PublisherIdentifierTypes (*args, **kwds)
Expand source code
class PublisherIdentifierTypes(Enum):
    tag_id = 'tag_id'
    duns = 'duns'
    lei = 'lei'
    seller_id = 'seller_id'
    gln = 'gln'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var duns
var gln
var lei
var seller_id
var tag_id
class PushNotificationConfig (**data: Any)
Expand source code
class PushNotificationConfig(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    authentication: Annotated[
        Authentication,
        Field(description='Authentication configuration for webhook delivery (A2A-compatible)'),
    ]
    token: Annotated[
        str | None,
        Field(
            description='Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.',
            min_length=16,
        ),
    ] = None
    url: Annotated[AnyUrl, Field(description='Webhook endpoint URL for task status notifications')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var authenticationAuthentication
var model_config
var token : str | None
var url : pydantic.networks.AnyUrl

Inherited members

class Quality (**data: Any)
Expand source code
class Quality(AdCPBaseModel):
    max_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
    min_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
    min_resolution_dpi: Annotated[int | None, Field(ge=72)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var max_bitrate_kbps : int | None
var min_bitrate_kbps : int | None
var min_resolution_dpi : int | None
var model_config

Inherited members

class QuartileData (**data: Any)
Expand source code
class QuartileData(AdCPBaseModel):
    q1_views: Annotated[float | None, Field(description='25% completion views', ge=0.0)] = None
    q2_views: Annotated[float | None, Field(description='50% completion views', ge=0.0)] = None
    q3_views: Annotated[float | None, Field(description='75% completion views', ge=0.0)] = None
    q4_views: Annotated[float | None, Field(description='100% completion views', ge=0.0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var q1_views : float | None
var q2_views : float | None
var q3_views : float | None
var q4_views : float | None

Inherited members

class QuerySummary (**data: Any)
Expand source code
class QuerySummary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    filters_applied: Annotated[
        list[str] | None, Field(description='List of filters that were applied to the query')
    ] = None
    returned: Annotated[
        int, Field(description='Number of creatives returned in this response', ge=0)
    ]
    sort_applied: Annotated[
        SortApplied | None, Field(description='Sort order that was applied')
    ] = None
    total_matching: Annotated[
        int,
        Field(description='Total number of creatives matching filters (across all pages)', ge=0),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var filters_applied : list[str] | None
var model_config
var returned : int
var sort_appliedSortApplied | None
var total_matching : int

Inherited members

class Render (**data: Any)
Expand source code
class Render(AdCPBaseModel):
    dimensions: Annotated[Dimensions, Field(description='Dimensions for this rendered piece')]
    role: Annotated[
        str,
        Field(
            description="Semantic role of this rendered piece (e.g., 'primary', 'companion', 'mobile_variant')"
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var dimensionsDimensions
var model_config
var role : str

Inherited members

class ReportingCapabilities (**data: Any)
Expand source code
class ReportingCapabilities(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    available_metrics: Annotated[
        list[AvailableMetric],
        Field(
            description='Metrics available in reporting. Impressions and spend are always implicitly included.',
            examples=[
                ['impressions', 'spend', 'clicks', 'video_completions'],
                ['impressions', 'spend', 'conversions'],
            ],
        ),
    ]
    available_reporting_frequencies: Annotated[
        list[AvailableReportingFrequency],
        Field(description='Supported reporting frequency options', min_length=1),
    ]
    expected_delay_minutes: Annotated[
        int,
        Field(
            description='Expected delay in minutes before reporting data becomes available (e.g., 240 for 4-hour delay)',
            examples=[240, 300, 1440],
            ge=0,
        ),
    ]
    supports_webhooks: Annotated[
        bool,
        Field(description='Whether this product supports webhook-based reporting notifications'),
    ]
    timezone: Annotated[
        str,
        Field(
            description="Timezone for reporting periods. Use 'UTC' or IANA timezone (e.g., 'America/New_York'). Critical for daily/monthly frequency alignment.",
            examples=['UTC', 'America/New_York', 'Europe/London', 'America/Los_Angeles'],
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var available_metrics : list[AvailableMetric]
var available_reporting_frequencies : list[AvailableReportingFrequency]
var expected_delay_minutes : int
var model_config
var supports_webhooks : bool
var timezone : str

Inherited members

class ReportingFrequency (*args, **kwds)
Expand source code
class ReportingFrequency(Enum):
    hourly = 'hourly'
    daily = 'daily'
    monthly = 'monthly'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var daily
var hourly
var monthly
class ReportingPeriod (**data: Any)
Expand source code
class ReportingPeriod(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    end: Annotated[
        AwareDatetime,
        Field(description='ISO 8601 end timestamp in UTC (e.g., 2024-02-05T23:59:59Z)'),
    ]
    start: Annotated[
        AwareDatetime,
        Field(description='ISO 8601 start timestamp in UTC (e.g., 2024-02-05T00:00:00Z)'),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var end : pydantic.types.AwareDatetime
var model_config
var start : pydantic.types.AwareDatetime

Inherited members

class ReportingWebhook (**data: Any)
Expand source code
class ReportingWebhook(PushNotificationConfig):
    reporting_frequency: Annotated[
        ReportingFrequency,
        Field(
            description='Frequency for automated reporting delivery. Must be supported by all products in the media buy.'
        ),
    ]
    requested_metrics: Annotated[
        list[RequestedMetric] | None,
        Field(
            description="Optional list of metrics to include in webhook notifications. If omitted, all available metrics are included. Must be subset of product's available_metrics."
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var reporting_frequencyReportingFrequency
var requested_metrics : list[RequestedMetric] | None

Inherited members

class Request (**data: Any)
Expand source code
class Request(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    creative_manifest: Annotated[
        creative_manifest_1.CreativeManifest,
        Field(description='Complete creative manifest with all required assets'),
    ]
    format_id: Annotated[
        format_id_1.FormatId, Field(description='Format identifier for rendering the preview')
    ]
    inputs: Annotated[
        list[Input2] | None,
        Field(description='Array of input sets for generating multiple preview variants'),
    ] = None
    output_format: Annotated[
        OutputFormat | None,
        Field(
            description="Output format for this preview. 'url' returns preview_url, 'html' returns preview_html."
        ),
    ] = OutputFormat.url
    template_id: Annotated[
        str | None, Field(description='Specific template ID for custom format rendering')
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var creative_manifestCreativeManifest
var format_idFormatId
var inputs : list[Input2] | None
var model_config
var output_formatOutputFormat | None
var template_id : str | None

Inherited members

class RequestedMetric (*args, **kwds)
Expand source code
class RequestedMetric(Enum):
    impressions = 'impressions'
    spend = 'spend'
    clicks = 'clicks'
    ctr = 'ctr'
    video_completions = 'video_completions'
    completion_rate = 'completion_rate'
    conversions = 'conversions'
    viewability = 'viewability'
    engagement_rate = 'engagement_rate'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var clicks
var completion_rate
var conversions
var ctr
var engagement_rate
var impressions
var spend
var video_completions
var viewability
class Requirements (**data: Any)
Expand source code
class Requirements(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content_length: ContentLength | None = None
    dimensions: Dimensions | None = None
    duration: Duration | None = None
    file_formats: Annotated[
        list[str] | None,
        Field(description="Acceptable file formats (e.g., ['jpg', 'png'] for images)"),
    ] = None
    file_size: FileSize | None = None
    quality: Quality | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content_lengthContentLength | None
var dimensionsDimensions | None
var durationDuration | None
var file_formats : list[str] | None
var file_sizeFileSize | None
var model_config
var qualityQuality | None

Inherited members

class Response (**data: Any)
Expand source code
class Response(AdCPBaseModel):
    expires_at: AwareDatetime
    interactive_url: AnyUrl | None = None
    previews: Annotated[
        list[Preview1],
        Field(description='Array of preview variants for this creative', min_length=1),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var expires_at : pydantic.types.AwareDatetime
var interactive_url : pydantic.networks.AnyUrl | None
var model_config
var previews : list[Preview1]

Inherited members

class ResponseType (*args, **kwds)
Expand source code
class ResponseType(Enum):
    html = 'html'
    json = 'json'
    xml = 'xml'
    javascript = 'javascript'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var html
var javascript
var json
var xml
class Responsive (**data: Any)
Expand source code
class Responsive(AdCPBaseModel):
    height: bool
    width: bool

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var height : bool
var model_config
var width : bool

Inherited members

class Results (**data: Any)
Expand source code
class Results(AdCPBaseModel):
    error: Annotated[Error | None, Field(description='Error information for failed requests')] = (
        None
    )
    response: Annotated[Response, Field(description='Preview response for successful requests')]
    success: Annotated[Literal[True], Field(description='Whether this preview request succeeded')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var errorError | None
var model_config
var responseResponse
var success : Literal[True]

Inherited members

class Scheme (*args, **kwds)
Expand source code
class Scheme(Enum):
    Bearer = 'Bearer'
    HMAC_SHA256 = 'HMAC-SHA256'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var Bearer
var HMAC_SHA256
class Security (**data: Any)
Expand source code
class Security(AdCPBaseModel):
    api_key_header: Annotated[
        str | None, Field(description="Header name for API key (e.g., 'X-API-Key')")
    ] = None
    hmac_header: Annotated[
        str | None, Field(description="Header name for HMAC signature (e.g., 'X-Signature')")
    ] = None
    method: Annotated[Method1, Field(description='Authentication method')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var api_key_header : str | None
var hmac_header : str | None
var methodMethod1
var model_config

Inherited members

class Signal (**data: Any)
Expand source code
class Signal(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    coverage_percentage: Annotated[
        float, Field(description='Percentage of audience coverage', ge=0.0, le=100.0)
    ]
    data_provider: Annotated[str, Field(description='Name of the data provider')]
    deployments: Annotated[
        list[deployment.Deployment1 | deployment.Deployment2],
        Field(description='Array of destination deployments'),
    ]
    description: Annotated[str, Field(description='Detailed signal description')]
    name: Annotated[str, Field(description='Human-readable signal name')]
    pricing: Annotated[Pricing, Field(description='Pricing information')]
    signal_agent_segment_id: Annotated[str, Field(description='Unique identifier for the signal')]
    signal_type: Annotated[SignalType, Field(description='Type of signal')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var coverage_percentage : float
var data_provider : str
var deployments : list[Deployment1 | Deployment2]
var description : str
var model_config
var name : str
var pricingPricing
var signal_agent_segment_id : str
var signal_typeSignalType

Inherited members

class SignalType (*args, **kwds)
Expand source code
class SignalType(Enum):
    marketplace = 'marketplace'
    custom = 'custom'
    owned = 'owned'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var custom
var marketplace
var owned
class Sort (**data: Any)
Expand source code
class Sort(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    direction: Annotated[Direction | None, Field(description='Sort direction')] = Direction.desc
    field: Annotated[Field1 | None, Field(description='Field to sort by')] = Field1.created_date

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var directionDirection | None
var fieldField1 | None
var model_config

Inherited members

class SortApplied (**data: Any)
Expand source code
class SortApplied(AdCPBaseModel):
    direction: Direction | None = None
    field: str | None = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var directionDirection | None
var field : str | None
var model_config

Inherited members

class StandardFormatIds (*args, **kwds)
Expand source code
class StandardFormatIds(Enum):
    display_300x250 = 'display_300x250'
    display_728x90 = 'display_728x90'
    display_320x50 = 'display_320x50'
    display_160x600 = 'display_160x600'
    display_970x250 = 'display_970x250'
    display_336x280 = 'display_336x280'
    display_expandable_300x250 = 'display_expandable_300x250'
    display_expandable_728x90 = 'display_expandable_728x90'
    display_interstitial_320x480 = 'display_interstitial_320x480'
    display_interstitial_desktop = 'display_interstitial_desktop'
    display_dynamic_300x250 = 'display_dynamic_300x250'
    display_responsive = 'display_responsive'
    native_in_feed = 'native_in_feed'
    native_content_recommendation = 'native_content_recommendation'
    native_product = 'native_product'
    video_skippable_15s = 'video_skippable_15s'
    video_skippable_30s = 'video_skippable_30s'
    video_non_skippable_15s = 'video_non_skippable_15s'
    video_non_skippable_30s = 'video_non_skippable_30s'
    video_outstream_autoplay = 'video_outstream_autoplay'
    video_vertical_story = 'video_vertical_story'
    video_rewarded_30s = 'video_rewarded_30s'
    video_pause_ad = 'video_pause_ad'
    video_ctv_non_skippable_30s = 'video_ctv_non_skippable_30s'
    audio_standard_15s = 'audio_standard_15s'
    audio_standard_30s = 'audio_standard_30s'
    audio_podcast_host_read = 'audio_podcast_host_read'
    audio_programmatic = 'audio_programmatic'
    universal_carousel = 'universal_carousel'
    universal_canvas = 'universal_canvas'
    universal_takeover = 'universal_takeover'
    universal_gallery = 'universal_gallery'
    universal_reveal = 'universal_reveal'
    dooh_landscape_static = 'dooh_landscape_static'
    dooh_portrait_video = 'dooh_portrait_video'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var audio_podcast_host_read
var audio_programmatic
var audio_standard_15s
var audio_standard_30s
var display_160x600
var display_300x250
var display_320x50
var display_336x280
var display_728x90
var display_970x250
var display_dynamic_300x250
var display_expandable_300x250
var display_expandable_728x90
var display_interstitial_320x480
var display_interstitial_desktop
var display_responsive
var dooh_landscape_static
var dooh_portrait_video
var native_content_recommendation
var native_in_feed
var native_product
var universal_canvas
var universal_reveal
var universal_takeover
var video_ctv_non_skippable_30s
var video_non_skippable_15s
var video_non_skippable_30s
var video_outstream_autoplay
var video_pause_ad
var video_rewarded_30s
var video_skippable_15s
var video_skippable_30s
var video_vertical_story
class Status (*args, **kwds)
Expand source code
class Status(Enum):
    pending = 'pending'
    active = 'active'
    paused = 'paused'
    completed = 'completed'
    failed = 'failed'
    reporting_delayed = 'reporting_delayed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var completed
var failed
var paused
var pending
var reporting_delayed
class StatusFilter (*args, **kwds)
Expand source code
class StatusFilter(Enum):
    active = 'active'
    pending = 'pending'
    paused = 'paused'
    completed = 'completed'
    failed = 'failed'
    all = 'all'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var all
var completed
var failed
var paused
var pending
class StatusFilterEnum (*args, **kwds)
Expand source code
class StatusFilterEnum(Enum):
    active = 'active'
    pending = 'pending'
    paused = 'paused'
    completed = 'completed'
    failed = 'failed'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var active
var completed
var failed
var paused
var pending
class StatusSummary (**data: Any)
Expand source code
class StatusSummary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    approved: Annotated[int | None, Field(description='Number of approved creatives', ge=0)] = None
    archived: Annotated[int | None, Field(description='Number of archived creatives', ge=0)] = None
    pending_review: Annotated[
        int | None, Field(description='Number of creatives pending review', ge=0)
    ] = None
    rejected: Annotated[int | None, Field(description='Number of rejected creatives', ge=0)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var approved : int | None
var archived : int | None
var model_config
var pending_review : int | None
var rejected : int | None

Inherited members

class SyncCreativesRequest (**data: Any)
Expand source code
class SyncCreativesRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    assignments: Annotated[
        dict[str, list[str]] | None,
        Field(description='Optional bulk assignment of creatives to packages'),
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    creatives: Annotated[
        list[creative_asset.CreativeAsset],
        Field(description='Array of creative assets to sync (create or update)', max_length=100),
    ]
    delete_missing: Annotated[
        bool | None,
        Field(
            description='When true, creatives not included in this sync will be archived. Use with caution for full library replacement.'
        ),
    ] = False
    dry_run: Annotated[
        bool | None,
        Field(
            description='When true, preview changes without applying them. Returns what would be created/updated/deleted.'
        ),
    ] = False
    patch: Annotated[
        bool | None,
        Field(
            description='When true, only provided fields are updated (partial update). When false, entire creative is replaced (full upsert).'
        ),
    ] = False
    push_notification_config: Annotated[
        push_notification_config_1.PushNotificationConfig | None,
        Field(
            description='Optional webhook configuration for async sync notifications. Publisher will send webhook when sync completes if operation takes longer than immediate response time (typically for large bulk operations or manual approval/HITL).'
        ),
    ] = None
    validation_mode: Annotated[
        ValidationMode | None,
        Field(
            description="Validation strictness. 'strict' fails entire sync on any validation error. 'lenient' processes valid creatives and reports errors."
        ),
    ] = ValidationMode.strict

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var assignments : dict[str, list[str]] | None
var context : dict[str, typing.Any] | None
var creatives : list[CreativeAsset]
var delete_missing : bool | None
var dry_run : bool | None
var model_config
var patch : bool | None
var push_notification_configPushNotificationConfig | None
var validation_modeValidationMode | None

Inherited members

class SyncCreativesResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class SyncCreativesResponse(RootModel[SyncCreativesResponse1 | SyncCreativesResponse2]):
    root: Annotated[
        SyncCreativesResponse1 | SyncCreativesResponse2,
        Field(
            description='Response from creative sync operation. Returns either per-creative results (best-effort processing) OR operation-level errors (complete failure). This enforces atomic semantics at the operation level while allowing per-item failures within successful operations.',
            title='Sync Creatives Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[SyncCreativesResponse1, SyncCreativesResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootSyncCreativesResponse1 | SyncCreativesResponse2
class Tag (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class Tag(RootModel[str]):
    root: Annotated[
        str,
        Field(
            description="Lowercase tag with underscores (e.g., 'conde_nast_network', 'premium_content')",
            pattern='^[a-z0-9_]+$',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[str]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : str
class Tags (**data: Any)
Expand source code
class Tags(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    description: Annotated[str, Field(description='Description of what this tag represents')]
    name: Annotated[str, Field(description='Human-readable name for this tag')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var description : str
var model_config
var name : str

Inherited members

class TargetingOverlay (**data: Any)
Expand source code
class TargetingOverlay(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    axe_exclude_segment: Annotated[
        str | None, Field(description='AXE segment ID to exclude from targeting')
    ] = None
    axe_include_segment: Annotated[
        str | None, Field(description='AXE segment ID to include for targeting')
    ] = None
    frequency_cap: frequency_cap_1.FrequencyCap | None = None
    geo_country_any_of: Annotated[
        list[GeoCountryAnyOfItem] | None,
        Field(
            description='Restrict delivery to specific countries (ISO codes). Use for regulatory compliance or RCT testing.'
        ),
    ] = None
    geo_metro_any_of: Annotated[
        list[str] | None,
        Field(
            description='Restrict delivery to specific metro areas (DMA codes). Use for regulatory compliance or RCT testing.'
        ),
    ] = None
    geo_postal_code_any_of: Annotated[
        list[str] | None,
        Field(
            description='Restrict delivery to specific postal/ZIP codes. Use for regulatory compliance or RCT testing.'
        ),
    ] = None
    geo_region_any_of: Annotated[
        list[str] | None,
        Field(
            description='Restrict delivery to specific regions/states. Use for regulatory compliance or RCT testing.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var axe_exclude_segment : str | None
var axe_include_segment : str | None
var frequency_capFrequencyCap | None
var geo_country_any_of : list[GeoCountryAnyOfItem] | None
var geo_metro_any_of : list[str] | None
var geo_postal_code_any_of : list[str] | None
var geo_region_any_of : list[str] | None
var model_config

Inherited members

class Task (**data: Any)
Expand source code
class Task(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    completed_at: Annotated[
        AwareDatetime | None,
        Field(
            description='When the task completed (ISO 8601, only for completed/failed/canceled tasks)'
        ),
    ] = None
    created_at: Annotated[
        AwareDatetime, Field(description='When the task was initially created (ISO 8601)')
    ]
    domain: Annotated[Domain, Field(description='AdCP domain this task belongs to')]
    has_webhook: Annotated[
        bool | None, Field(description='Whether this task has webhook configuration')
    ] = None
    status: Annotated[task_status.TaskStatus, Field(description='Current task status')]
    task_id: Annotated[str, Field(description='Unique identifier for this task')]
    task_type: Annotated[task_type_1.TaskType, Field(description='Type of AdCP operation')]
    updated_at: Annotated[
        AwareDatetime, Field(description='When the task was last updated (ISO 8601)')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var completed_at : pydantic.types.AwareDatetime | None
var created_at : pydantic.types.AwareDatetime
var domainDomain
var has_webhook : bool | None
var model_config
var statusTaskStatus
var task_id : str
var task_typeTaskType
var updated_at : pydantic.types.AwareDatetime

Inherited members

class TaskStatus (*args, **kwds)
Expand source code
class TaskStatus(Enum):
    submitted = 'submitted'
    working = 'working'
    input_required = 'input-required'
    completed = 'completed'
    canceled = 'canceled'
    failed = 'failed'
    rejected = 'rejected'
    auth_required = 'auth-required'
    unknown = 'unknown'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var auth_required
var canceled
var completed
var failed
var input_required
var rejected
var submitted
var unknown
var working
class TaskType (*args, **kwds)
Expand source code
class TaskType(Enum):
    create_media_buy = 'create_media_buy'
    update_media_buy = 'update_media_buy'
    sync_creatives = 'sync_creatives'
    activate_signal = 'activate_signal'
    get_signals = 'get_signals'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var activate_signal
var create_media_buy
var get_signals
var sync_creatives
var update_media_buy
class TasksGetRequest (**data: Any)
Expand source code
class TasksGetRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    include_history: Annotated[
        bool | None,
        Field(
            description='Include full conversation history for this task (may increase response size)'
        ),
    ] = False
    task_id: Annotated[str, Field(description='Unique identifier of the task to retrieve')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var include_history : bool | None
var model_config
var task_id : str

Inherited members

class TasksGetResponse (**data: Any)
Expand source code
class TasksGetResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    completed_at: Annotated[
        AwareDatetime | None,
        Field(
            description='When the task completed (ISO 8601, only for completed/failed/canceled tasks)'
        ),
    ] = None
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    created_at: Annotated[
        AwareDatetime, Field(description='When the task was initially created (ISO 8601)')
    ]
    domain: Annotated[Domain, Field(description='AdCP domain this task belongs to')]
    error: Annotated[Error | None, Field(description='Error details for failed tasks')] = None
    has_webhook: Annotated[
        bool | None, Field(description='Whether this task has webhook configuration')
    ] = None
    history: Annotated[
        list[HistoryItem] | None,
        Field(
            description='Complete conversation history for this task (only included if include_history was true in request)'
        ),
    ] = None
    progress: Annotated[
        Progress | None, Field(description='Progress information for long-running tasks')
    ] = None
    status: Annotated[task_status.TaskStatus, Field(description='Current task status')]
    task_id: Annotated[str, Field(description='Unique identifier for this task')]
    task_type: Annotated[task_type_1.TaskType, Field(description='Type of AdCP operation')]
    updated_at: Annotated[
        AwareDatetime, Field(description='When the task was last updated (ISO 8601)')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var completed_at : pydantic.types.AwareDatetime | None
var context : dict[str, typing.Any] | None
var created_at : pydantic.types.AwareDatetime
var domainDomain
var errorError | None
var has_webhook : bool | None
var history : list[HistoryItem] | None
var model_config
var progressProgress | None
var statusTaskStatus
var task_id : str
var task_typeTaskType
var updated_at : pydantic.types.AwareDatetime

Inherited members

class TasksListRequest (**data: Any)
Expand source code
class TasksListRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
        ),
    ] = None
    filters: Annotated[Filters | None, Field(description='Filter criteria for querying tasks')] = (
        None
    )
    include_history: Annotated[
        bool | None,
        Field(
            description='Include full conversation history for each task (may significantly increase response size)'
        ),
    ] = False
    pagination: Annotated[Pagination | None, Field(description='Pagination parameters')] = None
    sort: Annotated[Sort | None, Field(description='Sorting parameters')] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var filtersFilters | None
var include_history : bool | None
var model_config
var paginationPagination | None
var sortSort | None

Inherited members

class TasksListResponse (**data: Any)
Expand source code
class TasksListResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    context: Annotated[
        dict[str, Any] | None,
        Field(
            description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
        ),
    ] = None
    pagination: Annotated[Pagination, Field(description='Pagination information')]
    query_summary: Annotated[
        QuerySummary, Field(description='Summary of the query that was executed')
    ]
    tasks: Annotated[list[Task], Field(description='Array of tasks matching the query criteria')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : dict[str, typing.Any] | None
var model_config
var paginationPagination
var query_summaryQuerySummary
var tasks : list[Task]

Inherited members

class TextAsset (**data: Any)
Expand source code
class TextAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    content: Annotated[str, Field(description='Text content')]
    language: Annotated[str | None, Field(description="Language code (e.g., 'en', 'es', 'fr')")] = (
        None
    )

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var content : str
var language : str | None
var model_config

Inherited members

class Totals (**data: Any)
Expand source code
class Totals(DeliveryMetrics):
    effective_rate: Annotated[
        float | None,
        Field(
            description="Effective rate paid per unit based on pricing_model (e.g., actual CPM for 'cpm', actual cost per completed view for 'cpcv', actual cost per point for 'cpp')",
            ge=0.0,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var effective_rate : float | None
var model_config

Inherited members

class TrackingEvent (*args, **kwds)
Expand source code
class TrackingEvent(Enum):
    start = 'start'
    firstQuartile = 'firstQuartile'
    midpoint = 'midpoint'
    thirdQuartile = 'thirdQuartile'
    complete = 'complete'
    impression = 'impression'
    pause = 'pause'
    resume = 'resume'
    skip = 'skip'
    mute = 'mute'
    unmute = 'unmute'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var complete
var firstQuartile
var impression
var midpoint
var mute
var pause
var resume
var skip
var start
var thirdQuartile
var unmute
class Type (*args, **kwds)
Expand source code
class Type(Enum):
    image = 'image'
    video = 'video'
    audio = 'audio'
    text = 'text'
    html = 'html'
    css = 'css'
    javascript = 'javascript'
    vast = 'vast'
    daast = 'daast'
    promoted_offerings = 'promoted_offerings'
    url = 'url'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var audio
var css
var daast
var html
var image
var javascript
var promoted_offerings
var text
var url
var vast
var video
class Unit (*args, **kwds)
Expand source code
class Unit(Enum):
    px = 'px'
    dp = 'dp'
    inches = 'inches'
    cm = 'cm'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var cm
var dp
var inches
var px
class UpdateFrequency (*args, **kwds)
Expand source code
class UpdateFrequency(Enum):
    realtime = 'realtime'
    hourly = 'hourly'
    daily = 'daily'
    weekly = 'weekly'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var daily
var hourly
var realtime
var weekly
class UpdateMediaBuyRequest (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class UpdateMediaBuyRequest(RootModel[UpdateMediaBuyRequest1 | UpdateMediaBuyRequest2]):
    root: Annotated[
        UpdateMediaBuyRequest1 | UpdateMediaBuyRequest2,
        Field(
            description='Request parameters for updating campaign and package settings',
            title='Update Media Buy Request',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[UpdateMediaBuyRequest1, UpdateMediaBuyRequest2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootUpdateMediaBuyRequest1 | UpdateMediaBuyRequest2
class UpdateMediaBuyResponse (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class UpdateMediaBuyResponse(RootModel[UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2]):
    root: Annotated[
        UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2,
        Field(
            description='Response payload for update_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - updates are either fully applied or not applied at all.',
            title='Update Media Buy Response',
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[Union[UpdateMediaBuyResponse1, UpdateMediaBuyResponse2]]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var rootUpdateMediaBuyResponse1 | UpdateMediaBuyResponse2
class UrlAsset (**data: Any)
Expand source code
class UrlAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    description: Annotated[
        str | None, Field(description='Description of what this URL points to')
    ] = None
    url: Annotated[AnyUrl, Field(description='URL reference')]
    url_type: Annotated[
        UrlType | None,
        Field(
            description="Type of URL asset: 'clickthrough' for user click destination (landing page), 'tracker_pixel' for impression/event tracking via HTTP request (fires GET, expects pixel/204 response), 'tracker_script' for measurement SDKs that must load as <script> tag (OMID verification, native event trackers using method:2)"
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var description : str | None
var model_config
var url : pydantic.networks.AnyUrl
var url_typeUrlType | None

Inherited members

class UrlType (*args, **kwds)
Expand source code
class UrlType(Enum):
    clickthrough = 'clickthrough'
    tracker_pixel = 'tracker_pixel'
    tracker_script = 'tracker_script'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var clickthrough
var tracker_pixel
var tracker_script
class ValidationMode (*args, **kwds)
Expand source code
class ValidationMode(Enum):
    strict = 'strict'
    lenient = 'lenient'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var lenient
var strict
class VastVersion (*args, **kwds)
Expand source code
class VastVersion(Enum):
    field_2_0 = '2.0'
    field_3_0 = '3.0'
    field_4_0 = '4.0'
    field_4_1 = '4.1'
    field_4_2 = '4.2'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var field_2_0
var field_3_0
var field_4_0
var field_4_1
var field_4_2
class VcpmAuctionPricingOption (**data: Any)
Expand source code
class VcpmAuctionPricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[False],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    price_guidance: Annotated[
        PriceGuidance, Field(description='Statistical guidance for auction pricing')
    ]
    pricing_model: Annotated[
        Literal['vcpm'], Field(description='Cost per 1,000 viewable impressions (MRC standard)')
    ]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_auction')"
        ),
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[False]
var min_spend_per_package : float | None
var model_config
var price_guidancePriceGuidance
var pricing_model : Literal['vcpm']
var pricing_option_id : str

Inherited members

class VcpmFixedRatePricingOption (**data: Any)
Expand source code
class VcpmFixedRatePricingOption(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[
        str,
        Field(
            description='ISO 4217 currency code',
            examples=['USD', 'EUR', 'GBP', 'JPY'],
            pattern='^[A-Z]{3}$',
        ),
    ]
    is_fixed: Annotated[
        Literal[True],
        Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
    ]
    min_spend_per_package: Annotated[
        float | None,
        Field(
            description='Minimum spend requirement per package using this pricing option, in the specified currency',
            ge=0.0,
        ),
    ] = None
    pricing_model: Annotated[
        Literal['vcpm'], Field(description='Cost per 1,000 viewable impressions (MRC standard)')
    ]
    pricing_option_id: Annotated[
        str,
        Field(
            description="Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_guaranteed')"
        ),
    ]
    rate: Annotated[
        float, Field(description='Fixed vCPM rate (cost per 1,000 viewable impressions)', ge=0.0)
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var currency : str
var is_fixed : Literal[True]
var min_spend_per_package : float | None
var model_config
var pricing_model : Literal['vcpm']
var pricing_option_id : str
var rate : float

Inherited members

class VenueBreakdownItem (**data: Any)
Expand source code
class VenueBreakdownItem(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    impressions: Annotated[int, Field(description='Impressions delivered at this venue', ge=0)]
    loop_plays: Annotated[int | None, Field(description='Loop plays at this venue', ge=0)] = None
    screens_used: Annotated[
        int | None, Field(description='Number of screens used at this venue', ge=0)
    ] = None
    venue_id: Annotated[str, Field(description='Venue identifier')]
    venue_name: Annotated[str | None, Field(description='Human-readable venue name')] = None
    venue_type: Annotated[
        str | None,
        Field(description="Venue type (e.g., 'airport', 'transit', 'retail', 'billboard')"),
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var impressions : int
var loop_plays : int | None
var model_config
var screens_used : int | None
var venue_id : str
var venue_name : str | None
var venue_type : str | None

Inherited members

class VideoAsset (**data: Any)
Expand source code
class VideoAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    bitrate_kbps: Annotated[
        int | None, Field(description='Video bitrate in kilobits per second', ge=1)
    ] = None
    duration_ms: Annotated[
        int | None, Field(description='Video duration in milliseconds', ge=0)
    ] = None
    format: Annotated[str | None, Field(description='Video file format (mp4, webm, mov, etc.)')] = (
        None
    )
    height: Annotated[int | None, Field(description='Video height in pixels', ge=1)] = None
    url: Annotated[AnyUrl, Field(description='URL to the video asset')]
    width: Annotated[int | None, Field(description='Video width in pixels', ge=1)] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bitrate_kbps : int | None
var duration_ms : int | None
var format : str | None
var height : int | None
var model_config
var url : pydantic.networks.AnyUrl
var width : int | None

Inherited members

class ViewThreshold (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class ViewThreshold(RootModel[float]):
    root: Annotated[
        float,
        Field(
            description='Percentage completion threshold for CPV pricing (0.0 to 1.0, e.g., 0.5 = 50% completion)',
            ge=0.0,
            le=1.0,
        ),
    ]

Usage Documentation

RootModel and Custom Root Types

A Pydantic BaseModel for the root object of the model.

Attributes

root
The root object of the model.
__pydantic_root_model__
Whether the model is a RootModel.
__pydantic_private__
Private fields in the model.
__pydantic_extra__
Extra fields in the model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

  • pydantic.root_model.RootModel[float]
  • pydantic.root_model.RootModel
  • pydantic.main.BaseModel
  • typing.Generic

Class variables

var model_config
var root : float
class WebhookAsset (**data: Any)
Expand source code
class WebhookAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    method: Annotated[Method | None, Field(description='HTTP method')] = Method.POST
    required_macros: Annotated[
        list[str] | None,
        Field(description='Universal macros that must be provided for webhook to function'),
    ] = None
    response_type: Annotated[
        ResponseType, Field(description='Expected content type of webhook response')
    ]
    security: Annotated[Security, Field(description='Security configuration for webhook calls')]
    supported_macros: Annotated[
        list[str] | None,
        Field(
            description='Universal macros that can be passed to webhook (e.g., {DEVICE_TYPE}, {COUNTRY})'
        ),
    ] = None
    timeout_ms: Annotated[
        int | None,
        Field(description='Maximum time to wait for response in milliseconds', ge=10, le=5000),
    ] = 500
    url: Annotated[AnyUrl, Field(description='Webhook URL to call for dynamic content')]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var methodMethod | None
var model_config
var required_macros : list[str] | None
var response_typeResponseType
var securitySecurity
var supported_macros : list[str] | None
var timeout_ms : int | None
var url : pydantic.networks.AnyUrl

Inherited members

class WebhookPayload (**data: Any)
Expand source code
class WebhookPayload(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context_id: Annotated[
        str | None,
        Field(
            description='Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters.'
        ),
    ] = None
    domain: Annotated[
        Domain | None,
        Field(
            description='AdCP domain this task belongs to. Helps classify the operation type at a high level.'
        ),
    ] = None
    error: Annotated[
        str | None,
        Field(description="Error message for failed tasks. Only present when status is 'failed'."),
    ] = None
    message: Annotated[
        str | None,
        Field(
            description='Human-readable summary of the current task state. Provides context about what happened and what action may be needed.'
        ),
    ] = None
    operation_id: Annotated[
        str | None,
        Field(
            description='Publisher-defined operation identifier correlating a sequence of task updates across webhooks.'
        ),
    ] = None
    progress: Annotated[
        Progress | None,
        Field(
            description="Progress information for tasks still in 'working' state. Rarely seen in webhooks since 'working' tasks typically complete synchronously, but may appear if a task transitions from 'submitted' to 'working'."
        ),
    ] = None
    result: Annotated[
        dict[str, Any] | None,
        Field(
            description='Task-specific payload for this status update. Validated against the appropriate response schema based on task_type.'
        ),
    ] = None
    status: Annotated[
        task_status.TaskStatus,
        Field(
            description='Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed).'
        ),
    ]
    task_id: Annotated[
        str,
        Field(
            description='Unique identifier for this task. Use this to correlate webhook notifications with the original task submission.'
        ),
    ]
    task_type: Annotated[
        task_type_1.TaskType,
        Field(
            description='Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic.'
        ),
    ]
    timestamp: Annotated[
        AwareDatetime, Field(description='ISO 8601 timestamp when this webhook was generated.')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var domainDomain | None
var error : str | None
var message : str | None
var model_config
var operation_id : str | None
var progressProgress | None
var result : dict[str, typing.Any] | None
var statusTaskStatus
var task_id : str
var task_typeTaskType
var timestamp : pydantic.types.AwareDatetime

Inherited members