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. |