upload_media
Uploads local photos, MP4 videos, or website images to Telegram Ads and returns validated media IDs and metadata for ad creation.
Instructions
Upload a local photo, MP4 video, or website photo to Telegram Ads.
file_path must be an absolute path on the server machine. The file's bytes are transmitted to Telegram. Images are checked with Pillow; video metadata validation requires ffprobe from FFmpeg on PATH.
Returns account_id, kind, photo_id/photo_url or video_id/video_url, and validated media metadata. Reuse the ID only in the same account. Upload retries may create a new media ID; no idempotency key is available.
Omitted account_id uses the configured default or the token owner.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| file_path | Yes | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||