Call it
curl https://api.peume.com/v1/call/render-previews-of-an-existing-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/render-previews-of-an-existing-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/render-previews-of-an-existing-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: render-previews-of-an-existing-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
formatsstringMeta only. Comma-separated Meta ad_format values (max 10), one preview per format. Defaults to DESKTOP_FEED_STANDARD.
productItemIdsstringMeta only. Comma-separated Meta catalog product item ids or `catalog_id:base64url(retailer_id)` values (max 50) to render in a catalog ad, forwarded as Meta's `product_item_ids`. Without it Meta picks products from the ad's product set.
adIdRequiredstringad id (24-char hex), or a numeric Meta, LinkedIn or Pinterest platform ad id. X ads take the id.
