Module adcp.types.generated_poc.creative.preview_creative_request
Classes
class Input (**data: Any)-
Expand source code
class Input(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) name: Annotated[ str, Field( description="Human-readable name for this input set (e.g., 'Sunny morning on mobile', 'Evening podcast ad', 'Desktop dark mode')" ), ] macros: Annotated[ dict[str, str] | None, Field( description="Macro values to use for this preview. Supports all universal macros from the format's supported_macros list. See docs/creative/universal-macros.md for available macros." ), ] = None context_description: Annotated[ str | None, Field( description="Natural language description of the context for AI-generated content (e.g., 'User just searched for running shoes', 'Podcast discussing weather patterns', 'Article about electric vehicles')" ), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class Input4 (**data: Any)-
Expand source code
class Input4(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) name: Annotated[str, Field(description='Human-readable name for this input set')] macros: Annotated[ dict[str, str] | None, Field(description='Macro values to use for this preview') ] = None context_description: Annotated[ str | None, Field(description='Natural language description of the context for AI-generated content'), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context_description : str | Nonevar macros : dict[str, str] | Nonevar model_configvar name : str
Inherited members
class PreviewCreativeRequest1 (**data: Any)-
Expand source code
class PreviewCreativeRequest1(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) request_type: Annotated[ Literal['single'], Field(description='Discriminator indicating this is a single preview request'), ] format_id: Annotated[ format_id_1.FormatId | None, Field( description='Format identifier for rendering the preview. Optional — defaults to creative_manifest_1.format_id if omitted.' ), ] = None creative_manifest: Annotated[ creative_manifest_1.CreativeManifest, Field(description='Complete creative manifest with all required assets for the format.'), ] inputs: Annotated[ list[Input] | None, Field( description='Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. If not provided, creative agent will generate default previews.', min_length=1, ), ] = None template_id: Annotated[ str | None, Field(description='Specific template ID for custom format rendering') ] = None quality: Annotated[ creative_quality.CreativeQuality | None, Field( description="Render quality for the preview. 'draft' produces fast, lower-fidelity renderings for rapid iteration. 'production' produces full-quality renderings for final review. If omitted, the creative agent uses its own default." ), ] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field( description="Output format for previews. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding). Default: 'url' for backward compatibility." ), ] = preview_output_format.PreviewOutputFormat.url item_limit: Annotated[ int | None, Field( description="Maximum number of catalog items to render in the preview. For catalog-driven generative formats, caps how many items are rendered per preview variant. When item_limit exceeds the format's max_items, the creative agent SHOULD use the lesser of the two. Ignored when the manifest contains no catalog assets. Creative agents SHOULD default to a reasonable sample when omitted and the catalog is large.", ge=1, ), ] = None context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : ContextObject | Nonevar creative_manifest : CreativeManifestvar ext : ExtensionObject | Nonevar format_id : FormatId | Nonevar inputs : list[Input] | Nonevar item_limit : int | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar quality : CreativeQuality | Nonevar request_type : Literal['single']var template_id : str | None
Inherited members
class PreviewCreativeRequest2 (**data: Any)-
Expand source code
class PreviewCreativeRequest2(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) request_type: Annotated[ Literal['batch'], Field(description='Discriminator indicating this is a batch preview request'), ] requests: Annotated[ list[Request], Field( description='Array of preview requests (1-50 items). Each follows the single request structure.', max_length=50, min_length=1, ), ] quality: Annotated[ creative_quality.CreativeQuality | None, Field( description="Default render quality for all requests in this batch. Individual requests can override this. 'draft' produces fast, lower-fidelity renderings. 'production' produces full-quality renderings." ), ] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field( description="Default output format for all requests in this batch. Individual requests can override this. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding)." ), ] = preview_output_format.PreviewOutputFormat.url context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : ContextObject | Nonevar ext : ExtensionObject | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar quality : CreativeQuality | Nonevar request_type : Literal['batch']var requests : list[Request]
Inherited members
class PreviewCreativeRequest3 (**data: Any)-
Expand source code
class PreviewCreativeRequest3(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) request_type: Annotated[ Literal['variant'], Field(description='Discriminator indicating this is a variant preview request'), ] variant_id: Annotated[ str, Field( description='Platform-assigned variant identifier from get_creative_delivery response' ), ] creative_id: Annotated[str | None, Field(description='Creative identifier for context')] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field( description="Output format for the preview. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding)." ), ] = preview_output_format.PreviewOutputFormat.url context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : ContextObject | Nonevar creative_id : str | Nonevar ext : ExtensionObject | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar request_type : Literal['variant']var variant_id : str
Inherited members
class Request (**data: Any)-
Expand source code
class Request(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) format_id: Annotated[ format_id_1.FormatId | None, Field( description='Format identifier for rendering the preview. Optional — defaults to creative_manifest_1.format_id if omitted.' ), ] = None creative_manifest: Annotated[ creative_manifest_1.CreativeManifest, Field(description='Complete creative manifest with all required assets.'), ] inputs: Annotated[ list[Input4] | None, Field( description='Array of input sets for generating multiple preview variants', min_length=1 ), ] = None template_id: Annotated[ str | None, Field(description='Specific template ID for custom format rendering') ] = None quality: Annotated[ creative_quality.CreativeQuality | None, Field( description="Render quality for this preview. 'draft' produces fast, lower-fidelity renderings. 'production' produces full-quality renderings. Overrides any batch-level default." ), ] = None output_format: Annotated[ preview_output_format.PreviewOutputFormat | None, Field( description="Output format for this preview. 'url' returns preview_url, 'html' returns preview_html." ), ] = preview_output_format.PreviewOutputFormat.url item_limit: Annotated[ int | None, Field(description='Maximum number of catalog items to render in this preview.', ge=1), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var creative_manifest : CreativeManifestvar format_id : FormatId | Nonevar inputs : list[Input4] | Nonevar item_limit : int | Nonevar model_configvar output_format : PreviewOutputFormat | Nonevar quality : CreativeQuality | Nonevar template_id : str | None
Inherited members