PeumeAPI

Finance & crypto · Perplexity

Ask Perplexity

Prompt Perplexity for a cited answer. Costs a per-call fee plus the model's token cost.

$0.0009 per call

Call it

curl https://api.peume.com/v1/call/ask-perplexity \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "user_prompt": "your user prompt",
    "model_name": "your model name"
  }
}'

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-perplexity.

Parameters

user_promptRequiredstring

The question or instruction sent to the model.

model_nameRequiredstring

Model name from /ai/perplexity-models, e.g. 'sonar'; a bare family name picks its latest version.

max_output_tokensinteger

Maximum answer tokens (1-1024, default 1024); caps the LLM token cost.

temperaturenumber

Randomness of the AI response (default 0; max 1)

top_pnumber

Diversity of the AI response (default 0; max 1)

web_search_country_iso_codestring

Country code for web search localization (e.g. US)

system_messagestring

Instructions for the AI behavior

message_chainarray

Message chain

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.