Ad images and videos
meta_mediaget_image: an ad's image with metadata and a resized preview. get_image_by_hash: an image in an account's library. get_video: an ad's video metadata, thumbnails and source. video_status: ready, processing or error (check before using a video in a creative). compute_crops: centered pixel crops for Meta aspect ratios (changes no image). save_image: save an ad's image to the user's AdChat files.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "meta_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_id | No | Required for get_image, get_video. A string, never a number | |
| width | No | Required for compute_crops | |
| action | Yes | ||
| height | No | Required for compute_crops | |
| video_id | No | Required for video_status. A string, never a number | |
| account_id | No | Required for get_image_by_hash, video_status; not for get_image, compute_crops. e.g. act_1234567890 | |
| image_hash | No | Required for get_image_by_hash | |
| aspect_ratios | No | Only compute_crops |