Upload ad image or video
meta_upload_mediaUpload to the ad account from an AdChat file_id, a base64 file (image only), or a public HTTPS image_url or video_url (video up to 20 MB; local or larger files: start_upload, then pass the file_id). AdChat saves the source first and uploads exactly those bytes. A video_id is usable once meta_media video_status says ready. Changes the ad account: tell the user exactly what will change and call only after their Yes. If the result lists rule reasons, nothing changed: show them, ask again, and only after a new Yes retry with acknowledge_rules: true.
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": {
"type": "<type>",
"account_id": "<account_id>"
},
"name": "meta_upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Only image | |
| name | No | ||
| type | Yes | ||
| title | No | Only video | |
| file_id | No | ||
| image_url | No | Only image | |
| video_url | No | Only video | |
| account_id | Yes | e.g. act_1234567890 | |
| description | No | Only video | |
| acknowledge_rules | No | Only on a retry after the user's Yes to rule reasons; never on a first call. |