Perplexity Agent API drops the default output budget: up to 128,000 output tokens per generation (November 2026)
max_output_tokens is now optional on every model. New 2026-11-11.0 effort versions allow up to 128,000 output tokens per generation.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. What you paste stays in this tab. It is never sent to Wirestack or saved.
- Perplexity API keyPERPLEXITY_API_KEYGet key
Open the API Keys page in the Perplexity API console and generate a key. Add credits in Billing first.
What changed
Perplexity's Agent API no longer needs max_output_tokens. You can leave it out with any model, including Anthropic models. Each generation can then produce up to 128,000 output tokens, subject to the model's supported limit. With no explicit budget, output tokens from earlier steps do not lower the next generation's limit.
The new 2026-11-11.0 versions of fast, low, medium, high, xhigh and ultra use this default. Calling an effort level by name, such as effort="fast", selects the new version. Earlier pinned versions keep their configured budgets.
Set max_output_tokens only when you want a total output-token budget across the whole run. Output tokens are billed, so a run with no budget can now write more than it did before.
Prerequisites
- A Perplexity API key in
PERPLEXITY_API_KEY - Python:
pip install perplexityai - Node:
npm install @perplexity-ai/perplexity_ai
Steps
- Find where your code calls an effort level by name (
fast,fast@latestand so on). Those calls now run the2026-11-11.0version with no total output budget. - To keep a cap on spend, pass
max_output_tokensyourself:
response = client.responses.create(
effort="low",
model="anthropic/claude-sonnet-5-5", # Override the model the effort would use
max_output_tokens=16384,
input="Summarize the core findings of the original 'Attention Is All You Need' transformer paper and explain why it changed NLP.",
)