Perplexity Context API Adds Typed Errors and a 120-Second Request Deadline
Summary:Perplexity has revised the Context API contract for per-URL results, retries, deadlines, and usage accounting. The update introduces transient_error and persistent_error, applies no_text whenever markdown, highlights, or criteria are requested, and removes the ambiguous criteria_error state. Failed pages now contain only a URL and status and are not billed. The new timeout_ms parameter defines a request-wide budget covering retrieval, snapshot validation, highlights, and criteria evaluation, wi
Perplexity has revised the Context API contract for per-URL results, deadlines, and usage accounting. The update focuses on failure classification, retry behavior, request-wide timeouts, and billing boundaries; it does not introduce a new model, retrieval algorithm, or underlying architecture.
What Changed: Separating Content Anomalies from Service Failures
The revised status.type values give callers clearer page-level outcomes:
transient_error: The page could not be read, validated againstsnapshot_as_of, or processed to produce highlights or criteria. Retrying later may succeed.persistent_error: The page cannot be returned, and retrying with the same parameters is expected to produce the same result. Callers should stop retrying that source.no_text: A page has no extractable text when the request asks formarkdown,highlights, orcriteria. This condition is no longer restricted to Markdown-only requests.criteria_error: This state has been removed. A page whose scoring failed is now markedtransient_errorinstead of appearing asokwith a secondary criteria error.
Both failed-result types contain only url and status, and they are not billed. If criteria scoring fails and no page in the request is scored successfully, the entire request fails with 502 or 504. If at least one page is scored successfully, callers must handle the response as a partial success at the page level.
The API now effectively exposes two error layers. Page-level failures are represented by status.type, while invalid configuration or a request that cannot complete at all is represented by the HTTP status. A client should not treat a successful top-level response as proof that every returned page succeeded.
timeout_ms Is a Request-Wide Deadline
timeout_ms defines the time budget for the entire request, including highlight and criteria generation. Its default and maximum values are both 120000 milliseconds. If the requested budget is insufficient for the requested highlights, criteria, or snapshot_as_of validation, the API returns 400.
This differs from a conventional per-URL timeout model. Page retrieval, snapshot validation, and downstream processing all draw from the same deadline. A slow page can consume enough of the budget to leave insufficient time for later pages or criteria evaluation. Developers should therefore treat timeout_ms as an end-to-end SLO boundary rather than simply as a crawler timeout that can always be increased.
A 400 response indicates that the budget is incompatible with the requested work and should not be handled as a transient service fault. The 502 and 504 responses cover request-level failure when no page is successfully scored. The announcement does not specify the precise internal mapping between those two HTTP codes, so applications should avoid depending on a more granular distinction.
Highlights Limits and Criteria Billing
highlights.max_tokens_per_url now accepts up to 32768 tokens. This provides more room for detailed extraction from long documents, but multiplying the limit by the number of URLs can substantially increase output tokens, transfer size, downstream context occupancy, and model-processing latency. The ceiling is a capability boundary, not a recommended default.
For billing, usage.criteria.input_tokens counts only pages that were successfully scored and have status.type set to ok. Read failures, scoring failures, persistent errors, and pages without text do not contribute criteria input-token usage. This aligns billing with successfully delivered results, but clients should still track failed pages, request-level failures, and successful pages separately instead of relying only on the outer HTTP status.
Engineering Trade-offs and Measured Performance
More actionable error handling. transient_error, persistent_error, and no_text map naturally to retry, stop-retrying, and source-fallback actions. This reduces the chance that failed pages enter a RAG index or an agent tool chain. However, if an inaccessible URL continues to be classified as transient, callers should still impose attempt limits and circuit breakers.
A shared deadline reduces uncertainty but increases head-of-line blocking. A request-wide budget makes end-to-end SLOs easier to enforce, but as the number of requested pages grows, post-processing has less time available. Production systems should allocate the budget according to URL count, criteria requirements, and snapshot-validation needs instead of always selecting the maximum.
The contract change may break existing clients. Code that still branches on criteria_error must migrate to the status.type state machine. Applications should also handle unknown future enum values safely rather than interpreting a new status as successful data.
There is no measured performance improvement in this release. The update does not provide p50 or p95 latency, throughput, timeout-hit rates, error distributions, or billing-reconciliation examples. It establishes clearer operational and billing semantics; it does not demonstrate faster retrieval, better recall, or higher end-to-end reliability.
Deployment Guidance
- Replace ad hoc error checks with an explicit state machine: send
transient_errorpages to a bounded exponential-backoff queue with jitter, quarantinepersistent_errorsources, and use a fallback forno_textpages. - Establish a real end-to-end deadline and reserve separate portions for network retrieval, snapshot checks, highlights, and criteria. A budget that is too short produces
400, while an indiscriminately large budget can increase tail latency. - Set
max_tokens_per_urlaccording to the downstream context budget. Even though the API permits32768, control total output through URL limits, staged summarization, or streaming. - Reconcile usage only for pages that were successfully scored, while tracking
502,504, and each page-level failure category independently. - Include transient read failures, persistent errors, no-text pages, insufficient
timeout_ms, complete criteria failure, partially successful criteria scoring, and the highlights token ceiling in regression tests. Any client still depending oncriteria_errorshould fix that dependency during the upgrade.
— END —Source: Perplexity Changelog (2026-12-05)
Tags: #Perplexity #Context API #API Error Semantics #Request Timeout #Usage Billing
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments