Perplexity

Query Perplexity via Wire — the answer with inline citations and web sources

POSThttps://api.anakin.io/v1/wire/task

Perplexity is an answer engine: it returns the answer with inline [n] citation markers and the full list of web sources behind them. Run it with the perplexity action on POST /v1/wire/task.

Catalog: perplexity · action_id: perplexity · Credits: 2 / call · Auth: none


Request Body

{
  "action_id": "perplexity",
  "params": {
    "query": "What is the capital of France?",
    "focus": "internet",
    "country": "us"
  }
}
ParameterTypeDescription
action_id requiredstringSet to perplexity
params.query requiredstringThe question/prompt to ask Perplexity
params.focusstringinternet (web search) or writing (no web). Default internet
params.countrystringResidential exit country (2-letter ISO). Default us

Code Examples

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "perplexity",
    "params": { "query": "best CRM for small teams", "focus": "internet", "country": "us" }
  }'

Response

202 Accepted
{
  "status": "processing",
  "job_id": "c2916a5d-d4e8-49b4-bf24-f1e85321845a",
  "poll_url": "/v1/wire/jobs/c2916a5d-d4e8-49b4-bf24-f1e85321845a"
}

Poll GET /v1/wire/jobs/{id} until status: "completed":

200 OK
{
  "status": "completed",
  "credits_used": 2,
  "execution_ms": 6061,
  "data": {
    "status": "ok",
    "data": {
      "query": "best CRM for small teams",
      "answer_text": "The strongest options are … [1][4]",
      "citations": [
        { "title": "…", "url": "https://…", "position": 1, "snippet": "…", "domain": "…", "image": "https://…" }
      ],
      "search_sources": [],
      "web_search_triggered": true,
      "related_queries": ["best CRM for startups"],
      "reformulated_query": "top CRM software for small teams",
      "thread_title": "Best CRMs for small teams",
      "media": [], "shopping": [], "model": "…"
    },
    "meta": { "action_id": "perplexity", "catalog_slug": "perplexity", "envelope_version": "v1" }
  }
}
FieldTypeDescription
data.data.answer_textstringThe answer, with inline [n] markers mapping to citations[n-1].position
data.data.citationsarray{ title, url, position, snippet, domain, image } — the web sources cited
data.data.search_sourcesarrayAll sources considered (superset of citations)
data.data.related_queriesstring[]Follow-up queries Perplexity suggests
data.data.reformulated_querystringHow Perplexity rewrote your query — a useful GEO signal
data.data.web_search_triggeredbooleanWhether live web search ran

focus: "writing" skips web search — the answer comes from the model with no citations. Billed only on success.