PeumeAPI

Ads

Upload an ad video

Uploads a video to a Meta ad account from a URL or file, so you can preview it or use it in ads before any ad exists.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/upload-an-ad-video \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "accountId": "your accountId",
    "adAccountId": "your adAccountId",
    "async": false
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: upload-an-ad-video.

Parameters

accountIdRequiredstring

SocialAccount id (posting or ads variant); its platform decides where the campaign is created.

adAccountIdRequiredstring

Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id,...).

videoUrlstring

Public https URL of the video; downloaded server-side (SSRF-guarded) before chunked upload. Provide exactly one of videoUrl or videoBase64.

videoBase64string

Raw base64 video bytes, or a full data URL (the data:video/...;base64, prefix is stripped). Capped by Vercel's body limit (~4.5 MB payload). Provide exactly one of videoUrl or videoBase64.

filenamestring

Optional file name, sent to Meta as the video's name and title so it shows and is searchable in the Ads Manager media library. Applies to both videoUrl and videoBase64. Without it (and without name), a videoUrl upload is named after the last path segment of the URL.

namestring

Optional video name shown in the Ads Manager media library. Takes precedence over filename.

asyncboolean

true: answer 202 once Meta accepts the upload instead of waiting for processing. Poll GET /v1/ads/videos/{videoId} or subscribe to ad.video.processed.

Example: false

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.