Call it
curl https://api.peume.com/v1/call/ad-image-library \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"fields": "hash,url,name,width,height,status",
"limit": 25
}
}'const res = await fetch("https://api.peume.com/v1/call/ad-image-library", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"fields": "hash,url,name,width,height,status",
"limit": 25
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/ad-image-library",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"fields": "hash,url,name,width,height,status",
"limit": 25
}
},
)
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: ad-image-library.
Parameters
accountIdRequiredstringSocialAccount id (posting or ads variant) used to resolve the Meta token.
adAccountIdRequiredstringMeta ad account id (act_<n>).
fieldsstringComma-separated Graph field override. Supports nested {} projections and Graph field modifiers, so a nested edge can be paged explicitly: without a.limit modifier the expansion runs at the Meta default page size and the tail is dropped silently.
Example: hash,url,name,width,height,status
limitintegerRows per page
Example: 25
afterstringCursor from paging.after of the previous page.
