Call it
curl https://api.peume.com/v1/call/render-pre-create-ad-previews \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId"
}
}'const res = await fetch("https://api.peume.com/v1/call/render-pre-create-ad-previews", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/render-pre-create-ad-previews",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId"
}
},
)
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-pre-create-ad-previews.
Parameters
accountIdRequiredstringSocialAccount id used to resolve the Meta token.
adAccountIdRequiredstringPlatform ad account id (Meta act_<n>, Google customer id, LinkedIn account id,...).
formatsarrayMeta ad_format values, one preview per format. Defaults to [DESKTOP_FEED_STANDARD].
existingCreativeIdstringPreview an existing ad-account creative by id. Mutually exclusive with creativeSpec.
creativeSpecobjectRaw Meta creative spec forwarded to /generatepreviews. Mutually exclusive with existingCreativeId. An `object_story_spec` without `page_id` or `instagram_user_id`, and a `source_instagram_media_id` spec without `instagram_user_id`, get the connection's Facebook Page and Instagram account, as a create would.
productItemIdsarrayMeta catalog product item ids (or `catalog_id:base64url(retailer_id)`) to render in a catalog (Advantage+ catalog) creative, forwarded as Meta's `product_item_ids`. Without it Meta picks products from the creative's product set.
