Call it
curl https://api.peume.com/v1/call/ask-chatgpt-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"country": "AD"
}
}'const res = await fetch("https://api.peume.com/v1/call/ask-chatgpt-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"country": "AD"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/ask-chatgpt-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"country": "AD"
}
},
)
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: ask-chatgpt-2.
Parameters
promptRequiredstringThe prompt to send, up to 10,000 characters.
countryRequiredstringUppercase ISO 3166-1 alpha-2 country the request runs from, such as 'US'.
AD · AE · AF · AG · AI · AL · AM · AO · AQ · AR · AS · AT …
statestringUS state the request runs from, such as 'CA'. Only with country 'US'. Adds 2 credits.
AL · AK · AZ · AR · CA · CO · CT · DE · DC · FL · GA · HI …
includeobjectOptional response parts. rawResponse, searchQueries, ads and shopping share one raw-data add-on of 2 credits, however many are on.
legacybooleanServe ChatGPT's legacy desktop interface, which fills result.model and result.searchQueries. Best effort: the answer can still come back in the mobile shape.
disableWebSearchbooleanDo not force web search. ChatGPT then searches only when it decides to, so sources are often empty. Default false.
