Call it
curl https://api.peume.com/v1/call/direct-video-and-image-urls-for-an-ad \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"adId": "your adId"
}
}'const res = await fetch("https://api.peume.com/v1/call/direct-video-and-image-urls-for-an-ad", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"adId": "your adId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/direct-video-and-image-urls-for-an-ad",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"adId": "your adId"
}
},
)
print(res.json()["output"])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: direct-video-and-image-urls-for-an-ad.
Parameters
accountIdstringMeta only. A connection id ( or Facebook connection) used when `{adId}` is a Meta ad not in 's synced store, e.g. an Ads Manager ad on an ad account reached only through a Facebook connection. The ad is then read live from Meta through that connection, and the response carries `synced: false`. Ads Meta reports as DELETED are returned too, with their status. Same rules as GET /v1/ads/campaigns/{campaignId}: - Connection on a profile the API key cannot access: 404. - Ad on an ad account outside the connection's selected ad accounts: 403 `ad_account_not_selected`. - Id Met
adIdRequiredstringad id (24-char hex) or platform ad id.
