Start background web research
perplexity.web.research.mediumQueue a multi-step research answer and receive a response id for polling or cancellation.
- Price
- Precio pendienteAl precio del proveedor
- Success rate
- —Aún no hay datos de tasa de éxitoLast 30 days · 2 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/perplexity.web.research.mediumPreviewTry onlinePróximamenteProvider 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 herramienta no tiene parámetros. Consulta la documentación del proveedor ↗ Provider docs
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra.