Generate answer
perplexity.answer.generate
1 credit / request
Submit one prompt in a fresh Perplexity consumer-web context and return the complete answer with available source citations.
Request
curl -X POST https://data.upscrape.com/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"prompt":"In one short sentence, explain why the sky appears blue."},"capability":"perplexity.answer.generate"}'
Sample response
{
"completed": true,
"finish_reason": "stop",
"grounded": false,
"query": "In one short sentence, explain why the sky appears blue.",
"response": "The sky looks blue because molecules in Earth's atmosphere scatter shorter-wavelength blue light from the Sun more than they scatter red light."
}
Input
| Field | Type | Required | Description |
|---|---|---|---|
prompt
| string | required |