@adcp/sdk 14.0.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/lib/adapters/implicit-account-store.d.mts +12 -7
  2. package/dist/lib/adapters/implicit-account-store.d.ts +12 -7
  3. package/dist/lib/adapters/implicit-account-store.js +69 -15
  4. package/dist/lib/adapters/implicit-account-store.mjs +69 -15
  5. package/dist/lib/core/AgentClient.d.mts +1 -0
  6. package/dist/lib/core/AgentClient.d.ts +1 -0
  7. package/dist/lib/core/AgentClient.js +3 -0
  8. package/dist/lib/core/AgentClient.mjs +3 -0
  9. package/dist/lib/core/SingleAgentClient.d.mts +35 -2
  10. package/dist/lib/core/SingleAgentClient.d.ts +35 -2
  11. package/dist/lib/core/SingleAgentClient.js +377 -36
  12. package/dist/lib/core/SingleAgentClient.mjs +387 -38
  13. package/dist/lib/core/TaskExecutor.d.mts +3 -1
  14. package/dist/lib/core/TaskExecutor.d.ts +3 -1
  15. package/dist/lib/core/TaskExecutor.js +17 -12
  16. package/dist/lib/core/TaskExecutor.mjs +17 -12
  17. package/dist/lib/core/account-key.d.mts +3 -0
  18. package/dist/lib/core/account-key.d.ts +3 -0
  19. package/dist/lib/core/account-key.js +41 -0
  20. package/dist/lib/core/account-key.mjs +17 -0
  21. package/dist/lib/core/account-resolution.d.mts +2 -0
  22. package/dist/lib/core/account-resolution.d.ts +2 -0
  23. package/dist/lib/core/buyer-account-registry.d.mts +93 -0
  24. package/dist/lib/core/buyer-account-registry.d.ts +93 -0
  25. package/dist/lib/core/buyer-account-registry.js +602 -0
  26. package/dist/lib/core/buyer-account-registry.mjs +578 -0
  27. package/dist/lib/core/product-cache.d.mts +18 -0
  28. package/dist/lib/core/product-cache.d.ts +18 -0
  29. package/dist/lib/core/product-cache.js +137 -0
  30. package/dist/lib/core/product-cache.mjs +112 -0
  31. package/dist/lib/errors/index.d.mts +40 -1
  32. package/dist/lib/errors/index.d.ts +40 -1
  33. package/dist/lib/errors/index.js +69 -3
  34. package/dist/lib/errors/index.mjs +64 -3
  35. package/dist/lib/governance/authorization.d.mts +17 -1
  36. package/dist/lib/governance/authorization.d.ts +17 -1
  37. package/dist/lib/governance/authorization.js +55 -7
  38. package/dist/lib/governance/authorization.mjs +59 -7
  39. package/dist/lib/governance/index.d.mts +2 -2
  40. package/dist/lib/governance/index.d.ts +2 -2
  41. package/dist/lib/governance/index.js +2 -0
  42. package/dist/lib/governance/index.mjs +3 -1
  43. package/dist/lib/index.d.mts +7 -4
  44. package/dist/lib/index.d.ts +7 -4
  45. package/dist/lib/index.js +29 -0
  46. package/dist/lib/index.mjs +31 -1
  47. package/dist/lib/net/agent-transport-fetch.d.mts +4 -0
  48. package/dist/lib/net/agent-transport-fetch.d.ts +4 -0
  49. package/dist/lib/net/agent-transport-fetch.js +18 -5
  50. package/dist/lib/net/agent-transport-fetch.mjs +17 -5
  51. package/dist/lib/protocols/a2a.js +9 -1
  52. package/dist/lib/protocols/a2a.mjs +9 -1
  53. package/dist/lib/protocols/index.js +9 -2
  54. package/dist/lib/protocols/index.mjs +9 -2
  55. package/dist/lib/protocols/mcp-modern.js +2 -1
  56. package/dist/lib/protocols/mcp-modern.mjs +2 -1
  57. package/dist/lib/protocols/mcp.js +5 -2
  58. package/dist/lib/protocols/mcp.mjs +5 -2
  59. package/dist/lib/protocols/rawResponseCapture.d.mts +6 -0
  60. package/dist/lib/protocols/rawResponseCapture.d.ts +6 -0
  61. package/dist/lib/protocols/rawResponseCapture.js +41 -29
  62. package/dist/lib/protocols/rawResponseCapture.mjs +40 -29
  63. package/dist/lib/protocols/signedRequestRejection.d.mts +9 -0
  64. package/dist/lib/protocols/signedRequestRejection.d.ts +9 -0
  65. package/dist/lib/protocols/signedRequestRejection.js +209 -0
  66. package/dist/lib/protocols/signedRequestRejection.mjs +189 -0
  67. package/dist/lib/protocols/transportDiagnostics.d.mts +1 -0
  68. package/dist/lib/protocols/transportDiagnostics.d.ts +1 -0
  69. package/dist/lib/protocols/transportDiagnostics.js +2 -0
  70. package/dist/lib/protocols/transportDiagnostics.mjs +1 -0
  71. package/dist/lib/registry/types.generated.d.mts +112 -45
  72. package/dist/lib/registry/types.generated.d.ts +112 -45
  73. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  74. package/dist/lib/server/account-provisioning.d.mts +2 -0
  75. package/dist/lib/server/account-provisioning.d.ts +2 -0
  76. package/dist/lib/server/account-provisioning.js +30 -0
  77. package/dist/lib/server/account-provisioning.mjs +6 -0
  78. package/dist/lib/server/account-reference-warnings.d.mts +12 -0
  79. package/dist/lib/server/account-reference-warnings.d.ts +12 -0
  80. package/dist/lib/server/account-reference-warnings.js +48 -0
  81. package/dist/lib/server/account-reference-warnings.mjs +23 -0
  82. package/dist/lib/server/auth-signature.js +1 -0
  83. package/dist/lib/server/auth-signature.mjs +1 -0
  84. package/dist/lib/server/create-adcp-server.d.mts +34 -0
  85. package/dist/lib/server/create-adcp-server.d.ts +34 -0
  86. package/dist/lib/server/create-adcp-server.js +225 -14
  87. package/dist/lib/server/create-adcp-server.mjs +225 -14
  88. package/dist/lib/server/decisioning/account.d.mts +2 -0
  89. package/dist/lib/server/decisioning/account.d.ts +2 -0
  90. package/dist/lib/server/decisioning/runtime/from-platform.js +49 -10
  91. package/dist/lib/server/decisioning/runtime/from-platform.mjs +49 -10
  92. package/dist/lib/server/index.d.mts +2 -2
  93. package/dist/lib/server/index.d.ts +2 -2
  94. package/dist/lib/server/index.js +2 -0
  95. package/dist/lib/server/index.mjs +3 -1
  96. package/dist/lib/signing/agent-resolver/consistency.d.mts +6 -13
  97. package/dist/lib/signing/agent-resolver/consistency.d.ts +6 -13
  98. package/dist/lib/signing/agent-resolver/consistency.js +0 -1
  99. package/dist/lib/signing/agent-resolver/consistency.mjs +0 -1
  100. package/dist/lib/signing/agent-resolver/errors.d.mts +3 -1
  101. package/dist/lib/signing/agent-resolver/errors.d.ts +3 -1
  102. package/dist/lib/signing/agent-resolver/errors.js +6 -0
  103. package/dist/lib/signing/agent-resolver/errors.mjs +6 -0
  104. package/dist/lib/signing/agent-resolver/fetch-helpers.d.mts +11 -0
  105. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +11 -0
  106. package/dist/lib/signing/agent-resolver/fetch-helpers.js +37 -2
  107. package/dist/lib/signing/agent-resolver/fetch-helpers.mjs +40 -3
  108. package/dist/lib/signing/agent-resolver/jwks-set.js +24 -3
  109. package/dist/lib/signing/agent-resolver/jwks-set.mjs +24 -3
  110. package/dist/lib/signing/agent-resolver/legacy-brand.d.mts +15 -0
  111. package/dist/lib/signing/agent-resolver/legacy-brand.d.ts +15 -0
  112. package/dist/lib/signing/agent-resolver/legacy-brand.js +60 -0
  113. package/dist/lib/signing/agent-resolver/legacy-brand.mjs +36 -0
  114. package/dist/lib/signing/agent-resolver/operator-authorization.d.mts +13 -0
  115. package/dist/lib/signing/agent-resolver/operator-authorization.d.ts +13 -0
  116. package/dist/lib/signing/agent-resolver/operator-authorization.js +108 -0
  117. package/dist/lib/signing/agent-resolver/operator-authorization.mjs +84 -0
  118. package/dist/lib/signing/agent-resolver/resolve-agent.d.mts +14 -4
  119. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +14 -4
  120. package/dist/lib/signing/agent-resolver/resolve-agent.js +148 -137
  121. package/dist/lib/signing/agent-resolver/resolve-agent.mjs +157 -139
  122. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +7 -1
  123. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +7 -1
  124. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +50 -17
  125. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +50 -17
  126. package/dist/lib/signing/agent-resolver/select-agent.d.mts +14 -15
  127. package/dist/lib/signing/agent-resolver/select-agent.d.ts +14 -15
  128. package/dist/lib/signing/agent-resolver/select-agent.js +98 -13
  129. package/dist/lib/signing/agent-resolver/select-agent.mjs +95 -13
  130. package/dist/lib/signing/brand-jwks.d.mts +29 -75
  131. package/dist/lib/signing/brand-jwks.d.ts +29 -75
  132. package/dist/lib/signing/brand-jwks.js +120 -182
  133. package/dist/lib/signing/brand-jwks.mjs +120 -182
  134. package/dist/lib/signing/errors.d.mts +7 -3
  135. package/dist/lib/signing/errors.d.ts +7 -3
  136. package/dist/lib/signing/errors.js +7 -2
  137. package/dist/lib/signing/errors.mjs +7 -2
  138. package/dist/lib/signing/jwks-https.d.mts +7 -0
  139. package/dist/lib/signing/jwks-https.d.ts +7 -0
  140. package/dist/lib/signing/jwks-https.js +31 -8
  141. package/dist/lib/signing/jwks-https.mjs +31 -8
  142. package/dist/lib/signing/jwks.d.mts +8 -0
  143. package/dist/lib/signing/jwks.d.ts +8 -0
  144. package/dist/lib/signing/middleware.js +2 -1
  145. package/dist/lib/signing/middleware.mjs +2 -1
  146. package/dist/lib/signing/publisher-pins.d.mts +11 -0
  147. package/dist/lib/signing/publisher-pins.d.ts +11 -0
  148. package/dist/lib/signing/publisher-pins.js +125 -0
  149. package/dist/lib/signing/publisher-pins.mjs +101 -0
  150. package/dist/lib/signing/server.d.mts +1 -0
  151. package/dist/lib/signing/server.d.ts +1 -0
  152. package/dist/lib/signing/types.d.mts +5 -0
  153. package/dist/lib/signing/types.d.ts +5 -0
  154. package/dist/lib/signing/verifier.js +50 -5
  155. package/dist/lib/signing/verifier.mjs +50 -5
  156. package/dist/lib/signing/webhook-verifier.d.mts +7 -2
  157. package/dist/lib/signing/webhook-verifier.d.ts +7 -2
  158. package/dist/lib/signing/webhook-verifier.js +42 -2
  159. package/dist/lib/signing/webhook-verifier.mjs +42 -2
  160. package/dist/lib/testing/storyboard/account-policy.d.mts +2 -0
  161. package/dist/lib/testing/storyboard/account-policy.d.ts +2 -0
  162. package/dist/lib/testing/storyboard/account-policy.js +35 -0
  163. package/dist/lib/testing/storyboard/account-policy.mjs +11 -0
  164. package/dist/lib/testing/storyboard/context.js +6 -0
  165. package/dist/lib/testing/storyboard/context.mjs +6 -0
  166. package/dist/lib/testing/storyboard/request-builder.js +12 -2
  167. package/dist/lib/testing/storyboard/request-builder.mjs +12 -2
  168. package/dist/lib/testing/storyboard/runner.js +3 -2
  169. package/dist/lib/testing/storyboard/runner.mjs +3 -2
  170. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  171. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  172. package/dist/lib/types/accept-proposal.d.ts +19 -1
  173. package/dist/lib/types/buy-products.d.ts +19 -1
  174. package/dist/lib/types/check-governance.d.ts +19 -1
  175. package/dist/lib/types/comply-test-controller.d.ts +19 -1
  176. package/dist/lib/types/control-media-buy.d.ts +19 -1
  177. package/dist/lib/types/core.generated.d.mts +14 -1
  178. package/dist/lib/types/core.generated.d.ts +14 -1
  179. package/dist/lib/types/create-media-buy.d.ts +14 -1
  180. package/dist/lib/types/get-media-buys.d.ts +14 -1
  181. package/dist/lib/types/get-products.d.ts +19 -1
  182. package/dist/lib/types/list-products.d.ts +19 -1
  183. package/dist/lib/types/refine-proposals.d.ts +19 -1
  184. package/dist/lib/types/request-proposals.d.ts +19 -1
  185. package/dist/lib/types/schemas.generated.d.ts +12 -3
  186. package/dist/lib/types/schemas.generated.js +4 -1
  187. package/dist/lib/types/schemas.generated.mjs +4 -1
  188. package/dist/lib/types/tools.generated.d.mts +14 -1
  189. package/dist/lib/types/tools.generated.d.ts +14 -1
  190. package/dist/lib/types/update-media-buy.d.ts +14 -1
  191. package/dist/lib/version.d.mts +3 -3
  192. package/dist/lib/version.d.ts +3 -3
  193. package/dist/lib/version.js +3 -3
  194. package/dist/lib/version.mjs +3 -3
  195. package/dist/lib/webhooks/index.d.mts +24 -0
  196. package/dist/lib/webhooks/index.d.ts +24 -0
  197. package/dist/lib/webhooks/index.js +50 -24
  198. package/dist/lib/webhooks/index.mjs +49 -24
  199. package/dist/lib/wholesale-feed-sync/index.d.mts +2 -0
  200. package/dist/lib/wholesale-feed-sync/index.d.ts +2 -0
  201. package/dist/lib/wholesale-feed-sync/index.js +7 -0
  202. package/dist/lib/wholesale-feed-sync/index.mjs +4 -0
  203. package/dist/lib/wholesale-feed-sync/mirror.d.mts +97 -0
  204. package/dist/lib/wholesale-feed-sync/mirror.d.ts +97 -0
  205. package/dist/lib/wholesale-feed-sync/mirror.js +350 -0
  206. package/dist/lib/wholesale-feed-sync/mirror.mjs +322 -0
  207. package/dist/lib/wholesale-feed-sync/sync.d.mts +13 -29
  208. package/dist/lib/wholesale-feed-sync/sync.d.ts +13 -29
  209. package/dist/lib/wholesale-feed-sync/sync.js +208 -281
  210. package/dist/lib/wholesale-feed-sync/sync.mjs +213 -281
  211. package/dist/lib/wholesale-feed-sync/types.d.mts +4 -3
  212. package/dist/lib/wholesale-feed-sync/types.d.ts +4 -3
  213. package/docs/README.md +6 -0
  214. package/docs/TYPE-SUMMARY.md +2 -2
  215. package/docs/guides/BUILD-AN-AGENT.md +2 -2
  216. package/docs/guides/BUYER-QUICKSTART-3.2.md +2 -0
  217. package/docs/guides/BUYER-STORAGE.md +3 -0
  218. package/docs/guides/FIRST-CALL-TO-A-SELLER.md +106 -0
  219. package/docs/guides/SIGNING-GUIDE.md +16 -7
  220. package/docs/guides/account-resolution.md +132 -10
  221. package/docs/llms.txt +3 -2
  222. package/docs/migration-14.0-to-14.1.md +85 -0
  223. package/docs/migration-14.x-rc-worksheet.md +4 -4
  224. package/docs/migration-4.x-to-5.x.md +1 -0
  225. package/docs/migration-agent-resolution-3.3.md +125 -0
  226. package/docs/recipes/verifying-inbound-webhooks.md +60 -15
  227. package/package.json +3 -2
  228. package/skills/adcp-brand.previous/SKILL.md +0 -200
  229. package/skills/adcp-creative.previous/SKILL.md +0 -305
  230. package/skills/adcp-governance.previous/SKILL.md +0 -566
  231. package/skills/adcp-measurement.previous/SKILL.md +0 -136
  232. package/skills/adcp-media-buy.previous/SKILL.md +0 -556
  233. package/skills/adcp-si.previous/SKILL.md +0 -206
  234. package/skills/adcp-signals.previous/SKILL.md +0 -204
@@ -1,305 +0,0 @@
1
- ---
2
- name: adcp-creative
3
- description: Execute AdCP Creative Protocol operations with creative agents - build creatives from briefs or existing assets, preview renderings, and discover format specifications. Use when users want to generate or transform ad creatives, preview how ads will look, or understand creative format requirements.
4
- ---
5
-
6
- # AdCP Creative Protocol
7
-
8
- This skill enables you to execute the AdCP Creative Protocol with creative agents. Use `get_adcp_capabilities`, `list_transformers`, `build_creative`, and `preview_creative` exposed by the connected agent. In AdCP 3.2, `list_creative_formats` is deprecated and must not drive a new workflow.
9
-
10
- > **Buyer-side basics** — idempotency replay, `oneOf` variants, async `status:'submitted'` polling, error recovery from `adcp_error.issues[]` — live in `skills/call-adcp-agent/SKILL.md`. This skill covers per-task semantics only.
11
-
12
- ## Overview
13
-
14
- The Creative Protocol provides standardized discovery, build, and preview tasks:
15
-
16
- | Task | Purpose | Response Time |
17
- |------|---------|---------------|
18
- | `get_adcp_capabilities` | Discover canonical creative capabilities | ~1s |
19
- | `list_transformers` | Discover selectable production services | ~1s |
20
- | `build_creative` | Generate or transform creatives | ~30s-5m |
21
- | `preview_creative` | Get visual previews | ~5s |
22
- | `get_creative_delivery` | Variant-level delivery data | ~5-30s |
23
-
24
- ## Typical Workflow
25
-
26
- 1. **Discover capabilities**: read `get_adcp_capabilities.creative.supported_formats[]`
27
- 2. **Build creative**: `build_creative` to generate or transform a manifest
28
- 3. **Preview**: `preview_creative` to see how it renders
29
- 4. **Sync**: Use `sync_creatives` (media-buy task) to traffic the creative
30
-
31
- ---
32
-
33
- ## Canonical formats (AdCP 3.2)
34
-
35
- Products and manifests use 15 canonical `format_kind` values: `image`, `html5`, `display_tag`, `image_carousel`, `video_hosted`, `video_vast`, `audio_hosted`, `audio_vast`, `audio_daast`, `sponsored_placement`, `native_in_feed`, `responsive_creative`, `agent_placement`, `seller_rendered_stateful_display`, and `coordinated_placements`. Use `custom` only for a shape outside those canonicals, with required `format_shape` and `format_schema`.
36
-
37
- A `ProductFormatDeclaration` carries:
38
-
39
- - `format_kind`: the canonical (discriminator)
40
- - `params`: per-canonical parameters narrowing the format (dimensions, durations, codecs, char limits, CTA enums, sizes[], etc.)
41
- - Optional `format_option_id`: stable product/publisher option identifier when declarations need routing
42
- - Optional `v1_format_ref: [{agent_url, id}]`: **always an array** — links this v2 declaration to one or more v1 named formats. Multi-size declarations should carry one ref per size in `sizes[]`.
43
- - Optional `seller_preference: "preferred" | "accepted" | "discouraged"`: soft routing hint when a product carries multiple format_options
44
-
45
- **Where to declare a format:**
46
-
47
- | Where | When to use |
48
- |---|---|
49
- | `adagents.json` top-level `formats[]` (publisher catalog) | Format shared across many sellers of the same publisher inventory; declares the publisher-authoritative shape once |
50
- | `Product.format_options[]` (inline on a product) | Seller-specific accepted set. Reference a publisher declaration with `{publisher_domain, format_option_id}` when applicable |
51
- | `Placement.format_options[]` (`format_option_id` reference or inline) | Tying a publisher placement to accepted publisher formats |
52
- | `get_adcp_capabilities.creative.supported_formats[]` | What a creative agent can build, validate, or preview; every entry has an agent-local `capability_id` |
53
-
54
- **Size flexibility (image / html5 / display_tag):** exactly one of three modes — `width`+`height` (fixed), `sizes: [{w,h}]` (multi-size, mirrors OpenRTB `banner.format[]`), or `min_width`/`max_width`/`min_height`/`max_height` (responsive).
55
-
56
- **Publisher catalog resolution:** call `GET https://agenticadvertising.org/api/registry/publisher?domain=<publisher_domain>` for the complete publisher-origin → AgenticAdvertising.org community-catalog → fail-closed resolution order and provenance. Add `&include=placements` for provenance-labeled placement summaries with resolved canonical format options. The top-level `formats[]` remains a lossy display summary; fetch the raw URL returned in `files.adagents_json.registry_url` or `hosting.resolved_url` / `hosting.expected_url` for custom-format validation and omitted declaration fields. Do not synthesize publisher authority from a sales or creative agent.
57
-
58
- **Conversion tracking is NOT a creative-format concern.** Pixel-firing, conversion events, and attribution belong on `sync_event_sources` / `event_log` (campaign-scoped). Don't stuff `pixel_id` into `platform_extensions` on a format declaration.
59
-
60
- See `docs/creative/canonical-formats.mdx` for the full vocabulary, narrowing rules, error-code surface, and worked examples (Meta Reels, IAB display, host-read podcast, generative DSP).
61
-
62
- ---
63
-
64
- ## Task Reference
65
-
66
- ### get_adcp_capabilities
67
-
68
- Discover this creative agent's canonical operations.
69
-
70
- **Request:**
71
- ```json
72
- { "protocols": ["creative"] }
73
- ```
74
-
75
- **Response contains:**
76
- - `creative.supported_formats[]`: entries with stable, catalog-unique `capability_id`, canonical `format`, and `operations`; preview support is declared by `operations` containing `preview`
77
- - capability flags such as `supports_generation` and `supports_transformers`
78
-
79
- ---
80
-
81
- ### build_creative
82
-
83
- Generate a creative from scratch or transform an existing creative to a different format.
84
-
85
- **Pure Generation (from brief):**
86
- ```json
87
- {
88
- "message": "Create a banner promoting our winter sale with a warm, inviting feel",
89
- "target_capability_id": "winter_banner_300x250",
90
- "idempotency_key": "1db179c8-09c8-4eb3-9b96-ae741acdaf1f",
91
- "brand": {
92
- "domain": "mybrand.com"
93
- }
94
- }
95
- ```
96
-
97
- **Transformation (resize/reformat):**
98
- ```json
99
- {
100
- "message": "Adapt this leaderboard to a 300x250 banner",
101
- "creative_manifest": {
102
- "format_kind": "image",
103
- "assets": {
104
- "image_main": {
105
- "asset_type": "image",
106
- "url": "https://cdn.mybrand.com/leaderboard.png",
107
- "width": 728,
108
- "height": 90
109
- },
110
- "landing_page_url": {
111
- "asset_type": "url",
112
- "url": "https://mybrand.com/spring-sale"
113
- }
114
- }
115
- },
116
- "target_capability_id": "banner_resize_300x250",
117
- "idempotency_key": "4c052b08-2e5f-4a66-b0c0-57c199302411"
118
- }
119
- ```
120
-
121
- **Key fields:**
122
- - `message` (string, optional): Natural language instructions for generation/transformation
123
- - `creative_manifest` (object, optional): Source manifest - minimal for generation, complete for transformation
124
- - `target_capability_id` (string): One output advertised by this agent; use `target_capability_ids[]` for multiple outputs
125
-
126
- **Response contains:**
127
- - `creative_manifest`: Complete manifest ready for `preview_creative` or `sync_creatives`
128
-
129
- ---
130
-
131
- ### preview_creative
132
-
133
- Generate visual previews of creative manifests.
134
-
135
- **Single preview:**
136
- ```json
137
- {
138
- "request_type": "single",
139
- "creative_manifest": {
140
- "format_kind": "image",
141
- "assets": {
142
- "image_main": {
143
- "asset_type": "image",
144
- "url": "https://cdn.example.com/banner.png",
145
- "width": 300,
146
- "height": 250
147
- }
148
- }
149
- }
150
- }
151
- ```
152
-
153
- **With device variants:**
154
- ```json
155
- {
156
- "request_type": "single",
157
- "creative_manifest": { /* includes format_kind, assets */ },
158
- "inputs": [
159
- { "name": "Desktop", "macros": { "DEVICE_TYPE": "desktop" } },
160
- { "name": "Mobile", "macros": { "DEVICE_TYPE": "mobile" } }
161
- ]
162
- }
163
- ```
164
-
165
- **Batch preview (5-10x faster):**
166
- ```json
167
- {
168
- "request_type": "batch",
169
- "requests": [
170
- { "creative_manifest": { /* creative 1 */ } },
171
- { "creative_manifest": { /* creative 2 */ } }
172
- ]
173
- }
174
- ```
175
-
176
- **Key fields:**
177
- - `request_type` (string, required): `"single"` or `"batch"`
178
- - `creative_manifest` (object, required): Complete creative manifest
179
- - `inputs` (array, optional): Generate variants with different macros/contexts
180
- - `output_format` (string, optional): `"url"` (default) or `"html"`
181
-
182
- **Response contains:**
183
- - `previews`: Array of preview objects with `preview_url` or `preview_html`
184
- - `expires_at`: When preview URLs expire
185
-
186
- ---
187
-
188
- ### get_creative_delivery
189
-
190
- Retrieve variant-level creative delivery data from a creative agent. Returns what was generated, served, and how each variant performed.
191
-
192
- **Request:**
193
- ```json
194
- {
195
- "media_buy_ids": ["mb_abc123"],
196
- "start_date": "2025-01-01",
197
- "end_date": "2025-01-31",
198
- "max_variants": 10
199
- }
200
- ```
201
-
202
- **Key fields:**
203
- - `media_buy_ids` (array, optional): Filter to specific media buys
204
- - `creative_ids` (array, optional): Filter to specific creatives
205
- - `start_date`, `end_date` (string, optional): Delivery period (YYYY-MM-DD)
206
- - `max_variants` (integer, optional): Max variants per creative (useful for generative creatives)
207
- - `account` (object, optional): Account for routing and scoping
208
-
209
- At least one scoping filter (`media_buy_ids` or `creative_ids`) is required.
210
-
211
- **Response contains:**
212
- - `creatives`: Array with variant-level delivery data
213
- - `variant_id`: Unique variant identifier (use in `preview_creative` with `request_type: "variant"`)
214
- - `generation_context`: What triggered this variant (page topic, device, etc.)
215
- - `delivery_metrics`: Impressions, clicks, completions
216
- - `ext`: Platform engagement metrics (likes, shares, comments)
217
-
218
- ---
219
-
220
- ## Key Concepts
221
-
222
- ### Capability IDs and canonical manifests
223
-
224
- A creative agent's `capability_id` is a local operation selector:
225
- ```json
226
- {
227
- "target_capability_id": "winter_banner_300x250"
228
- }
229
- ```
230
-
231
- It is never copied into a product or manifest. The resulting manifest is portable and carries the canonical format contract:
232
-
233
- ### Creative Manifests
234
-
235
- Manifests pair format specifications with actual assets:
236
- ```json
237
- {
238
- "format_kind": "image",
239
- "assets": {
240
- "banner_image": {
241
- "asset_type": "image",
242
- "url": "https://cdn.example.com/banner.png",
243
- "width": 300,
244
- "height": 250
245
- },
246
- "headline": {
247
- "asset_type": "text",
248
- "content": "Shop Now"
249
- },
250
- "clickthrough_url": {
251
- "asset_type": "url",
252
- "url": "https://brand.com/sale"
253
- }
254
- }
255
- }
256
- ```
257
-
258
- ### Asset Types
259
-
260
- Common asset types:
261
- - `image`: Static images (JPEG, PNG, WebP)
262
- - `video`: Video files (MP4, WebM) or VAST tags
263
- - `audio`: Audio files (MP3, M4A) or DAAST tags
264
- - `text`: Headlines, descriptions, CTAs
265
- - `html`: HTML5 creatives or third-party tags
266
- - `javascript`: JavaScript tags
267
- - `url`: Tracking pixels, clickthrough URLs
268
-
269
- ### Brand identity
270
-
271
- For generative creatives, provide brand context by domain:
272
- ```json
273
- {
274
- "brand": {
275
- "domain": "acmecorp.com"
276
- }
277
- }
278
- ```
279
-
280
- The agent resolves the domain to retrieve the brand's identity (name, colors, guidelines, etc.) from its `brand.json` file.
281
-
282
- ### Generative vs Transformation
283
-
284
- - **Pure Generation**: Provide `target_capability_id`, `brand`, and a natural language `message`. The creative agent generates all output assets from scratch.
285
- - **Transformation**: Complete manifest with existing assets. Creative agent adapts to target format, following `message` guidance.
286
-
287
- ---
288
-
289
- ## Error Handling
290
-
291
- Common error patterns:
292
-
293
- - **400 Bad Request**: Invalid manifest or capability selector
294
- - **404 Not Found**: Capability not supported by this agent
295
- - **422 Validation Error**: Manifest doesn't match format requirements
296
-
297
- Error responses include:
298
- ```json
299
- {
300
- "error": {
301
- "code": "FORMAT_NOT_SUPPORTED",
302
- "message": "target_capability_id is not advertised by this creative agent"
303
- }
304
- }
305
- ```