Skip to main content

Native document input

By Steven Van ·

Developers can send five document formats inline or by public HTTPS URL, then ask follow-ups about inline files without uploading again.

Documents can now go directly to the model in Perplexity’s Agent API, without a sandbox or file_search tool. Native input supports PDF, DOC, DOCX, UTF-8 TXT and RTF, with format and source support depending on the selected model and provider.

Send a file inline or by URL

Add an input_file part to a user message on POST /v1/agent or its /v1/responses alias. Set either file_data, containing standard base64 or a base64 data URI, or file_url, pointing to a public HTTPS document.

For URL inputs, the provider retrieves the document. The URL must remain accessible for follow-ups. Omitting filename describes the input as PDF; other supported formats require a filename with an extension matching the remote document.

Continue without uploading again

For inline documents, pass the first response’s ID as previous_response_id under the same API project to ask follow-up questions without resending the file. Documents remain available for the original response’s retention period, up to 30 days. Follow-ups do not extend that period.

Limits and compatibility

Requests allow up to 30 document parts, including inherited documents, and 50 MiB of combined inline document data after base64 decoding. The complete JSON request body is limited to 72 MiB. Provider limits may be lower.

Document inputs are unavailable with zero data retention and cannot be combined with browser tools, including in continuations. Reusable file_id upload identifiers are not supported. The Working with Files documentation includes request examples and validation requirements.

Perplexity
Perplexity
AI-powered answer engine — ask anything and get cited, real-time answers from across the web.
View Perplexity →
Sources

Original source

Read Native document input on Creators Toolbox