Inputs
Output
Type:Dict
Returns the media_key, media_id, and the Media Library item.
Fields: dynamic (depend on the inputs)Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Uploads an image or video from a URL to X and registers it in the ads account’s Media Library
| App | X Ads |
| Operation ID | x_ads_upload_media |
| Type | Action |
| Connection | x_ads (required) |
| Credits per run | 1 |
| Agent / MCP tool | Yes |
| Requires approval | Yes (write operation) |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
account | DynamicAccount | Yes | - | Select the X Ads account whose Media Library receives the file. |
image_url | string | No | - | Image to upload. Provide an image or a video, not both. Accepts jpg, png, webp or gif, up to 3MB when the image is used on a card. Give a direct URL, a Google Drive share link (set to ‘Anyone with the link’), or a file uploaded through Markifact. Returns a media_key to reference from the post and ad nodes. |
video_url | string | No | - | Video to upload. Provide an image or a video, not both. Accepts mp4 or mov, up to 10 minutes and 500MB, from a direct URL, a Google Drive share link (set to ‘Anyone with the link’), or a file uploaded through Markifact. Uploaded in chunks and awaited until X finishes processing, as amplify_video, the category promoted video requires. |
media_category | enum (tweet_image, tweet_gif, tweet_video, amplify_video) | No | - | Overrides the upload category, which is otherwise detected from the file (images become tweet_image/tweet_gif, videos become amplify_video, which promoted video requires). |
name | string | No | - | Name shown in the Media Library, up to 100 characters. |
file_name | string | No | - | File name shown in the Media Library, up to 255 characters. |
title | string | No | - | Video only: title rendered with the video, up to 70 characters. |
description | string | No | - | Video only: description rendered under the video, up to 200 characters. |
poster_media_key | string | No | - | Video only: media_key of an uploaded image to use as the poster frame. |
Dict
Returns the media_key, media_id, and the Media Library item.
Fields: dynamic (depend on the inputs)