upload_ad_image
Upload an image to Meta Ads for use in ad creatives, returning an image hash for building creatives or retrieving the image later.
Instructions
Upload an image to use in Meta Ads creatives.
Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) file: Data URL or raw base64 string of the image (e.g., "data:image/png;base64,iVBORw0KG...") image_url: Direct URL to an image to fetch and upload name: Optional name for the image (default: filename)
Returns: JSON object with: - image_hash: Pass this to create_ad_creative when building the ad, or to get_image_by_hash to view the image later. - images: List of {hash, url, width, height, name}. The url is a Meta CDN link you can fetch directly to view the image — no need to call any other tool right after upload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| name | No | ||
| image_url | No | ||
| account_id | Yes | ||
| access_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |