Generate answer
Submit a prompt with locale, country, search, and source-policy controls in a fresh Perplexity context; return a complete answer, citations, and execution evidence.
Capability ID
perplexity.answer.generate
Cost
1 credit per request
Maximum runtime
180 seconds
POST
/execute
Shared execution endpoint
Input parameters
| Field | Type | Required | Description |
|---|---|---|---|
country |
string |
Optional | |
include_sources |
boolean |
Optional | |
locale |
string |
Optional | |
max_sources |
integer |
Optional | |
mode |
string |
Optional | |
model |
string |
Optional | |
prompt |
string |
Required | |
source_policy |
object |
Optional | |
source_policy.excluded_domains |
array<string> |
Optional | |
source_policy.official_sources_only |
boolean |
Optional | |
source_policy.preferred_domains |
array<string> |
Optional | |
source_policy.published_after |
string |
Optional | |
source_policy.published_before |
string |
Optional | |
timezone |
string |
Optional |
Response
Successful output is returned in results[0].data. Raw platform output is
intentionally open-ended and may evolve with the upstream source.
Illustrative sample
The full redacted fixture is shown in the response panel.
Illustrative output fields
Derived from the sample above for orientation only. These observed fields are not a fixed response schema.
| Path | Observed type | Example |
|---|---|---|
completed |
boolean |
true |
finish_reason |
string |
stop |
grounded |
boolean |
false |
query |
string |
In one short sentence, explain why the sky appears blue. |
response |
string |
The sky looks blue because molecules in Earth's atmosphere scatter shor… |
Execution behavior
A 200 response completed inline. A 202 response was queued; poll
GET /jobs/:id until the job reaches completed or
failed.