upload_file
Upload text files or images to Perplexity for AI analysis. Optionally ask a question to get web-grounded answers with citations.
Instructions
Upload a document for Perplexity to analyze. Supports text files (txt, md, py, js, ts, csv, json, etc.) and images (png, jpg, gif, webp). Trigger: 'perplexity upload file', 'upload to perplexity'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the file to upload | |
| query | No | Optional question to ask about the file immediately after upload | |
| model | No | Model identifier (optional, defaults to sonar-pro) |