Skip to main content
Models, tools, and capabilities change quickly. It can be a full time job to keep your agent code updated with the ideal configurations for your use case. That’s what Perplexity presets help solve.

Start from a preset

A preset is a Perplexity maintained bundle of Agent API settings that packages together a model, search config, reasoning steps, system prompt, and available tools. Perplexity updates the underlying configurations as evaluations improve, and your calls receive the updates without needing to adjust your code. What if the chosen preset doesn’t quite meet all of your needs? Imagine, for instance, that you found a preset configuration that almost perfectly meets your needs, with the exception of one or two fields that you’d like to tune. You can pass your preset by name and then modify only the fields that need adjustment. All the other preset fields will continue to use their defaults.

Check the prerequisites

You need Python 3.10 or newer, the perplexityai library installed, and an API key exported as PERPLEXITY_API_KEY. Create the key at console.perplexity.ai/group/keys. If you have never called the API before, run through the Perplexity API quickstart first.

Run a basic example

Every example in this tutorial uses the low preset unless noted. Start by calling it with nothing but a prompt.
The low preset supplies the model, search config, reasoning steps, system prompt, and available tools. Your request adds only the input.

Customize a preset in two moves

Two techniques cover almost every real customization: override a top-level field, and adjust options for one tool. The last section shows how to inspect what ran.

1. Override one parameter

Override a parameter when the preset almost fits but one field needs to change. Pass that field on the request; every other field keeps its default value. low documents a low max_steps default (check the current presets documentation for the current value). Raise the ceiling when a task needs more reasoning or tool-use iterations:

2. Adjust options for one tool

Adjust tool options when the preset’s tool set is right for the job but one tool needs tuning. Pass a partial entry for that tool and the preset’s other tools stay attached. low invokes fetch_url by default when a prompt names a URL. Pass a partial web_search override and fetch_url still runs:
Live run on August 19, 2026 with perplexityai==0.43.3:
The request adjusted web_search, but fetch_url is what actually ran because the prompt asked to read a URL and fetch_url is the tool for that job. The evidence is usage.tool_calls_details: fetch_url appears there even though the request never passed a fetch_url entry. That is tool merging. To also tune fetch_url, add a fetch_url entry to tools alongside web_search.

Put both moves together: an evidence-based rollout decision

Let’s tie these concepts together. Suppose the performance lead for a CPU-bound service is deciding whether to pilot Python 3.14’s free-threaded build. low is a good base, but this task needs more reasoning room (an override) and deeper context from two specific technical pages (a tool merge).
Every piece of the call has a job: A representative live run on August 19, 2026 with perplexityai==0.43.3 produced this brief (response.output_text):
And this observed-run block:
The brief came in at 410 words, followed every requested heading and list count, used valid numeric citations, and drew only from the two allowed official Python pages. Factual spot checks confirmed its claims about parallel execution, extension-triggered GIL re-enablement, iterator safety, official Python 3.14 support, and the documented single-thread performance penalty. Output will vary between runs. Generated rollout advice is still a draft: validate citation IDs against the response’s search results and review consequential recommendations before using them in production.

Inspect what actually ran

You need a way to check what the API actually served. Read response.model for the backing model, response.usage.tool_calls_details for the tools that ran, and response.usage.cost.total_cost for the billed amount. The response does not expose the effective system prompt, max_steps, reasoning, or the full inherited tool set, so treat this as inspection of the observed run rather than of the preset’s configuration.
Your numbers will differ. Live run on August 19, 2026 with perplexityai==0.43.3:
Inspect what ran on any request where correctness or cost matters. It lets you see which model handled the call, which tools ran, and the call’s cost.

Summary

Presets give you a maintained Agent API configuration you can call by name. Override one field to change one thing without losing the other defaults. Merge tool options to tune a tool while keeping the preset’s other available tools attached. Read response.model and response.usage.tool_calls_details to inspect your calls.

Resources