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 and max_staleness are optional. An unknown top-level field returns 400. The state plus any one question must stay under 256K input tokens; on pplx-decider-v1.2, questions that do not fit together are answered in groups, and each group counts the state again. pplx-decider-flash-v1.2 answers each question separately and counts the state again for every question. The body must stay under 32 MiB.

model
string
required

The decision model: 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.2, and pplx-decider-flash-latest and perplexity/pplx-decider-flash-latest select pplx-decider-flash-v1.2; an alias can move to a newer model over time. pplx-decider-v1.1-27b and pplx-decider-v1-27b remain accepted and select pplx-decider-v1.2. 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. Use max_staleness to control the age of the fetched copy.

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 or successful URL fetch costs $0.001; 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>

Maximum age of the fetched page in seconds since its last crawl. Applies to URL-only state with mode: "web_grounding". An older stored copy triggers a fresh crawl before the page text is used. Omit to use a stored copy without an age limit. Ignored without mode. Does not filter search results.

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