# Hermoso: upload_x_ads_media · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/upload_x_ads_media/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / upload_x_ads_media

# `upload_x_ads_media`

Upload media to an X ad account

Area: X ADS LEAD GEN, CARDS, MEDIA, PROMOTED-ONLY POSTS · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## 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)

`url` required `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](https://hermoso.ai/docs/credits/).

## Related tools

- [upload_file](https://hermoso.ai/docs/reference/publish/upload_file/) Upload a local file -> durable public URL
- [create_x_ads_card](https://hermoso.ai/docs/reference/ads/create_x_ads_card/) Build an X ad card
- [create_x_ads_post](https://hermoso.ai/docs/reference/ads/create_x_ads_post/) Write a promoted-only X post for ads
- [get_x_ads_leads](https://hermoso.ai/docs/reference/ads/get_x_ads_leads/) Read the leads from an X lead form
- [list_x_ads_media](https://hermoso.ai/docs/reference/ads/list_x_ads_media/) List an X ad account’s Media Library
- [update_x_ads_lead_form](https://hermoso.ai/docs/reference/ads/update_x_ads_lead_form/) Change an X lead form
- [create_x_ads_lead_form](https://hermoso.ai/docs/reference/ads/create_x_ads_lead_form/) Create an X lead form
- [list_x_ads_cards](https://hermoso.ai/docs/reference/ads/list_x_ads_cards/) List X ad cards
- [list_x_ads_lead_forms](https://hermoso.ai/docs/reference/ads/list_x_ads_lead_forms/) List X lead forms
- [list_x_ads_posts](https://hermoso.ai/docs/reference/ads/list_x_ads_posts/) List the posts an X ad account can promote

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
