Start background web research
perplexity.web.research.mediumQueue a multi-step research answer and receive a response id for polling or cancellation.
- Price
- Preço pendentePelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoLast 30 days · 2 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/perplexity.web.research.mediumPreviewTry onlineEm breveProvider docs ↗
- Uses platform quota
- Asynchronous response
- Reads public data
Parâmetros
Only your own key can run this tool. Completed and incomplete runs report usage.cost.total_cost; cancelled runs did not report cost in live tests.
Esta ferramenta não tem parâmetros. Veja a documentação do provedor ↗ Provider docs
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
Preview
curl -X POST 'https://toolswitch.dev/v1/tools/perplexity.web.research.medium' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"input":"Compare the purposes of example.com and example.org with citations.","preset":"medium","max_steps":2,"background":true,"max_output_tokens":1200}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/perplexity.web.research.medium",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"input\":\"Compare the purposes of example.com and example.org with citations.\",\"preset\":\"medium\",\"max_steps\":2,\"background\":true,\"max_output_tokens\":1200}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/perplexity.web.research.medium", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"input\":\"Compare the purposes of example.com and example.org with citations.\",\"preset\":\"medium\",\"max_steps\":2,\"background\":true,\"max_output_tokens\":1200}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra.