Skip to main content
call_adcp_agent ツールを使い、任意の AdCP クリエイティブエージェントでこれらのタスクを実行します。

タスク概要

TaskPurposeResponse Time
list_creative_formatsフォーマット仕様を確認約 1 秒
build_creativeクリエイティブを生成または変換約 30 秒~5 分
preview_creativeビジュアルプレビューを取得約 5 秒

代表的なワークフロー

  1. フォーマットを発見: list_creative_formats で利用可能なフォーマット仕様を確認
  2. クリエイティブを構築: build_creative でマニフェストを生成または変換
  3. プレビュー: preview_creative で描画結果を確認
  4. 同期: sync_creatives(media-buy タスク)でクリエイティブを入稿

タスクリファレンス

list_creative_formats

クリエイティブフォーマットとその仕様を探索します。
{
  "type": "video",
  "asset_types": ["image", "text"]
}
主要フィールド:
  • format_ids (array, optional): 特定のフォーマット ID を要求
  • type (string, optional): video, display, audio, dooh でフィルター
  • asset_types (array, optional): 受け入れるアセットタイプで絞り込み
  • max_width, max_height (integer, optional): 寸法の制約
  • is_responsive (boolean, optional): レスポンシブフォーマットでフィルター
  • name_search (string, optional): 名前でフォーマットを検索
レスポンスに含まれるもの:
  • formats: format_id, name, type, assets, renders を含むフォーマット定義の配列
  • creative_agents: 追加フォーマットを提供する他のクリエイティブエージェントの配列(任意)

build_creative

クリエイティブをゼロから生成するか、既存のクリエイティブを別フォーマットに変換します。 純粋生成(ブリーフから):
{
  "message": "Create a banner promoting our winter sale with a warm, inviting feel",
  "target_format_id": {
    "agent_url": "https://creative.adcontextprotocol.org",
    "id": "display_300x250_generative"
  },
  "creative_manifest": {
    "format_id": {
      "agent_url": "https://creative.adcontextprotocol.org",
      "id": "display_300x250_generative"
    },
    "assets": {
      "promoted_offerings": {
        "brand_manifest": {
          "url": "https://mybrand.com",
          "name": "My Brand",
          "colors": { "primary": "#FF5733" }
        },
        "inline_offerings": [
          {
            "name": "Winter Sale Collection",
            "description": "50% off all winter items"
          }
        ]
      }
    }
  }
}
変換(リサイズ/リフォーマット):
{
  "message": "Adapt this leaderboard to a 300x250 banner",
  "creative_manifest": {
    "format_id": {
      "agent_url": "https://creative.adcontextprotocol.org",
      "id": "display_728x90"
    },
    "assets": {
      "banner_image": {
        "asset_type": "image",
        "url": "https://cdn.mybrand.com/leaderboard.png",
        "width": 728,
        "height": 90
      },
      "headline": {
        "asset_type": "text",
        "content": "Spring Sale - 30% Off"
      }
    }
  },
  "target_format_id": {
    "agent_url": "https://creative.adcontextprotocol.org",
    "id": "display_300x250"
  }
}
主要フィールド:
  • message (string, optional): 生成/変換のための自然言語の指示
  • creative_manifest (object, optional): 生成では最小、変換では完全なソースマニフェスト
  • target_format_id (object, required): 生成対象のフォーマット { agent_url, id }
レスポンスに含まれるもの:
  • creative_manifest: preview_creative または sync_creatives にそのまま使える完全なマニフェスト

preview_creative

クリエイティブマニフェストのビジュアルプレビューを生成します。 単体プレビュー:
{
  "request_type": "single",
  "format_id": {
    "agent_url": "https://creative.adcontextprotocol.org",
    "id": "display_300x250"
  },
  "creative_manifest": {
    "format_id": {
      "agent_url": "https://creative.adcontextprotocol.org",
      "id": "display_300x250"
    },
    "assets": {
      "banner_image": {
        "asset_type": "image",
        "url": "https://cdn.example.com/banner.png",
        "width": 300,
        "height": 250
      }
    }
  }
}
デバイスバリアント付き:
{
  "request_type": "single",
  "format_id": { "agent_url": "...", "id": "native_responsive" },
  "creative_manifest": { },
  "inputs": [
    { "name": "Desktop", "macros": { "DEVICE_TYPE": "desktop" } },
    { "name": "Mobile", "macros": { "DEVICE_TYPE": "mobile" } }
  ]
}
バッチプレビュー(5〜10 倍高速):
{
  "request_type": "batch",
  "requests": [
    { "format_id": {}, "creative_manifest": { } },
    { "format_id": {}, "creative_manifest": { } }
  ]
}
主要フィールド:
  • request_type (string, required): "single" または "batch"
  • format_id (object, required for single): フォーマット識別子
  • creative_manifest (object, required): 完全なクリエイティブマニフェスト
  • inputs (array, optional): 異なるマクロ/コンテキストでバリアントを生成
  • output_format (string, optional): "url"(デフォルト)または "html"
レスポンスに含まれるもの:
  • previews: preview_url または preview_html を持つプレビューオブジェクトの配列
  • expires_at: プレビュー URL の有効期限

主要概念

フォーマット ID

すべてのフォーマット参照は構造化オブジェクトを使用します。
{
  "format_id": {
    "agent_url": "https://creative.adcontextprotocol.org",
    "id": "display_300x250"
  }
}
agent_url はそのフォーマットの権威となるクリエイティブエージェントを指定します。

クリエイティブマニフェスト

マニフェストはフォーマット仕様と実際のアセットを組み合わせます。
{
  "format_id": {
    "agent_url": "https://creative.adcontextprotocol.org",
    "id": "display_300x250"
  },
  "assets": {
    "banner_image": {
      "asset_type": "image",
      "url": "https://cdn.example.com/banner.png",
      "width": 300,
      "height": 250
    },
    "headline": {
      "asset_type": "text",
      "content": "Shop Now"
    },
    "clickthrough_url": {
      "asset_type": "url",
      "url": "https://brand.com/sale"
    }
  }
}

アセットタイプ

一般的なアセットタイプ:
  • image: 静止画(JPEG, PNG, WebP)
  • video: 動画ファイル(MP4, WebM)または VAST タグ
  • audio: 音声ファイル(MP3, M4A)または DAAST タグ
  • text: 見出し、説明、CTA
  • html: HTML5 クリエイティブまたはサードパーティタグ
  • javascript: JavaScript タグ
  • url: トラッキングピクセル、クリック URL

ブランドマニフェスト

生成系クリエイティブでは、ブランドのコンテキストを提供します。
{
  "brand_manifest": {
    "url": "https://brand.com",
    "name": "Brand Name",
    "colors": { "primary": "#FF0000", "secondary": "#0000FF" }
  }
}

生成と変換の違い

  • 純粋生成: アセットの promoted_offerings だけを持つ最小限のマニフェスト。クリエイティブエージェントが出力アセットをゼロから生成。
  • 変換: 既存アセットを含む完全なマニフェスト。message の指示に従い、ターゲットフォーマットに適合させる。

エラーハンドリング

よくあるエラーパターン:
  • 400 Bad Request: マニフェストまたは format_id が不正
  • 404 Not Found: このエージェントがフォーマットをサポートしていない
  • 422 Validation Error: マニフェストがフォーマット要件を満たしていない
エラーレスポンス例:
{
  "error": {
    "code": "INVALID_FORMAT_ID",
    "message": "format_id must be a structured object with 'agent_url' and 'id' fields"
  }
}