upload_x_ads_media
Upload media to an X ad account
Description
Upload an image or video (any URL — a Hermoso render, an upload_file URL, a public file) to an X ad account and return its media_key, for create_x_ads_card or create_x_ads_post. Added to the ad account's Media Library and read back. A card image must be 1:1 ≥600×600, 1.91:1 ≥600×314, 16:9 ≥600×337, 9:16 ≥600×1066, 2:3 ≥600×900 or 4:5 ≥600×750. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
adAccountId | string | X ad account id (list_x_ads_accounts); omit if only one is shared |
accountId | string | older name for adAccountId (MCP only) |
urlrequired | string | public image or video URL: a Hermoso render, an upload_file URL or any public file |
name | string | label in the Media Library |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/upload_x_ads_media.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"upload_x_ads_media","arguments":{"url":"<string>"}}}
CLI
hermoso call upload_x_ads_media --json '{"url":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
upload_fileUpload a local file -> durable public URLcreate_x_ads_cardBuild an X ad cardcreate_x_ads_postWrite a promoted-only X post for adsget_x_ads_leadsRead the leads from an X lead formlist_x_ads_mediaList an X ad account’s Media Libraryupdate_x_ads_lead_formChange an X lead formcreate_x_ads_lead_formCreate an X lead formlist_x_ads_cardsList X ad cardslist_x_ads_lead_formsList X lead formslist_x_ads_postsList the posts an X ad account can promote