Skip to main content
POST
Answer questions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The content to evaluate and the named questions to ask about it. mode is optional; max_staleness is accepted and ignored. An unknown top-level field returns 400. The state plus any one question must stay under 256K input tokens; questions that do not fit together are answered in groups, and each group counts the state again. The body must stay under 32 MiB.

model
string
required

The decision model: pplx-decider-v1.3 (27B, $0.02 per million input tokens), pplx-decider-flash-v1.3 (4B, $0.01 per million input tokens), pplx-decider-v1.2 (27B, $0.02 per million input tokens) or pplx-decider-flash-v1.2 (4B, $0.01 per million input tokens). The aliases pplx-decider-latest and perplexity/pplx-decider-latest select pplx-decider-v1.3, and pplx-decider-flash-latest and perplexity/pplx-decider-flash-latest select pplx-decider-flash-v1.3; an alias can move to a newer model over time. pplx-decider-v1-27b (27B, $0.02 per million input tokens) remains accepted, and pplx-decider-v1.1-27b is an alias of it. Only the v1.3 models, by name or through the -latest aliases, serve locate questions. A missing or unknown model returns 400.

Example:

"pplx-decider-latest"

state
required

The content every question in the request refers to: a string, an object, or an array. Images can appear anywhere in state as OpenAI-style image_url parts with base64 PNG, JPEG, or WebP data URLs and are read in place. Up to 8 images per question. With mode: "web_grounding", a single page URL is fetched and replaced with its text before web search.

Example:

"The headphones sound great, but the battery stopped charging after two weeks."

questions
Questions · object
required

Questions keyed by a non-empty name you choose. The response uses the same names. At least one question. With mode web_grounding, at most 100; more returns 400 with param questions.

Example:
mode
enum<string>

Set to web_grounding to search the web before the model answers. For a URL-only state, the API first fetches the page and replaces the URL with its text. It then runs one Fast Search per question, up to 100 questions, and adds the top results to state. The response lists search evidence in search_results and fetched page text in fetched_results. If no search returns a result, the model answers from state, including any fetched text. Each search costs $0.001 and each successful URL fetch costs $0.0005; fetched text and search evidence count as input tokens. Any other mode value, including an empty string or null, returns 400. See Web grounding.

Available options:
web_grounding
max_staleness
integer<int64>

Accepted but currently ignored: it does not check the age of a fetched page or trigger a crawl. A non-negative integer is accepted, so existing requests that send it keep working.

Required range: x >= 0
Example:

86400

Response

One answer per question, under the question's name.

Answers keyed by question name, plus the model that answered and token usage.

model
string
required

The model name you sent, echoed back.

Example:

"pplx-decider-latest"

answers
Answers · object
required

One answer per question, under the question's name.

Example:
usage
Usage · object
required

Token counts for this request.

Example:
search_results
DecisionSearchResult · object[]

Only with mode web_grounding: the web results added to state as evidence, one per URL, ordered by rank: the top result of each query, then the second of each, and so on. [] when no search evidence was added. Absent without mode. usage.input_tokens includes them.

Maximum array length: 100
fetched_results
DecisionFetchedResult · object[]

The page text that replaced a URL-only state before web search, returned with mode: "web_grounding". Absent when no usable page text was fetched. usage.input_tokens includes the fetched text.

Maximum array length: 1