Call it
curl https://api.peume.com/v1/call/advise-buy-or-wait \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"origin": "your origin",
"destination": "your destination",
"departure_date": "your departure date",
"trip_type": "oneway",
"cabin_class": "economy",
"current_price": "your current price"
}
}'const res = await fetch("https://api.peume.com/v1/call/advise-buy-or-wait", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"origin": "your origin",
"destination": "your destination",
"departure_date": "your departure date",
"trip_type": "oneway",
"cabin_class": "economy",
"current_price": "your current price"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/advise-buy-or-wait",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"origin": "your origin",
"destination": "your destination",
"departure_date": "your departure date",
"trip_type": "oneway",
"cabin_class": "economy",
"current_price": "your current price"
}
},
)
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: advise-buy-or-wait.
Parameters
originRequiredstringdestinationRequiredstringdeparture_dateRequiredstringtrip_typeRequiredstringoneway · roundtrip
return_datestringReturn date in YYYY-MM-DD format, a real calendar date on or after departure_date. Required when trip_type is roundtrip; must be omitted when trip_type is oneway.
stopsstringActual number of flight connections: 0 for nonstop, 1, or 2. Omit when unknown. For a round trip, 0 means nonstop on both the outbound and the inbound flight; 1 and 2 are not covered for round trips.
cabin_classRequiredstringeconomy · premium_economy · business · first
current_priceRequiredobjectOne adult total fare for the supplied trip, including tax and excluding optional paid extras. Value 32000, USD, decimal_places 2 means USD 320.00.
