diff --git a/snapshots/perplexity/api-pricing.md b/snapshots/perplexity/api-pricing.md index 73501ad..6800a67 100644 --- a/snapshots/perplexity/api-pricing.md +++ b/snapshots/perplexity/api-pricing.md @@ -5,4 +5,8 @@ This page shows pricing information to help you understand API costs.For billing ## Estimate your cost +## Gateway API Pricing + +Gateway API usage is billed per token at each model's published rates — there are no per-request fees. Every model has its own input and output rate, with cache reads billed at the model's discounted cache-read rate and reasoning tokens billed at the output rate. You are always billed at the requested model's rates, regardless of how the request is served. See Gateway Models & Pricing for the full per-model rate card, including cache-write rates and long-context pricing. + ## Agent API Pricing @@ -23,9 +27,9 @@ When using tools with the Agent API: | Tool | Price | Description | |---|---|---| -| `web_search` | $0.005 per invocation | Performs web searches to retrieve current information | -| `fetch_url` | $0.0005 per invocation | Fetches and extracts content from specific URLs | +| `web_search` | $0.0025 per invocation | Performs web searches to retrieve current information | +| `fetch_url` | $0.00025 per invocation | Fetches and extracts content from specific URLs | | `people_search` | $0.005 per invocation | Looks up professionals, employees, and people. $5 per 1,000 tool invocations | | `finance_search` | $0.005 per invocation | Retrieves financial data and market information. $5 per 1,000 tool invocations | -| `sandbox` | $0.03 per session | Isolated container for executing code during an Agent API request. A session covers up to 20 minutes of active use for billing purposes — this is the billing window, not a runtime cap. SDK search queries made from inside the sandbox are billed at $0.005 per request (same as `web_search`). | +| `sandbox` | $0.03 per session | Isolated container for executing code during an Agent API request. A session covers up to 20 minutes of active use for billing purposes — this is the billing window, not a runtime cap. SDK search queries made from inside the sandbox are billed at $0.0025 per request (same as `web_search`). | Most tool costs are per invocation. `sandbox` is billed per container session — a 20-minute billing window per container, not a runtime cap — plus per SDK search query made from inside it. Tool costs are separate from model token costs. @@ -37,5 +41,5 @@ Most tool costs are per invocation. `sandbox` is billed per container session | Search API | $5.00 | Raw web search results with advanced filtering | -No token costs: Search API charges per request only, with no additional token-based pricing. +Billing unit: Search API charges for each successful `POST /search` request, not for each query in the request. A successful request containing an array of up to five queries is one billing unit. Invalid requests, rate-limited requests, and upstream failures are not billed. A successful response is billed even when it returns no results. There are no additional token-based charges. ## Sonar API Pricing @@ -162,67 +166,28 @@ Token Calculation: 1 token ≈ 4 characters in English text. The exact count may ## Cost Examples -## Sonar Web Search Example - -Sonar • 500 input + 200 output tokens - -- Low -- Medium -- High +## Agent API Web Search -| Component | Cost | -|---|---| -| Input tokens | $0.0005 | -| Output tokens | $0.0002 | -| Request fee | $0.005 | -| Total | $0.0057 | +`openai/gpt-5.2` • 500 input + 200 output tokens • 1 web search | Component | Cost | |---|---| -| Input tokens | $0.0005 | -| Output tokens | $0.0002 | -| Request fee | $0.008 | -| Total | $0.0087 | +| Input tokens | $0.000875 | +| Output tokens | $0.0028 | +| `web_search` | $0.0025 | +| Total | $0.006175 | -| Component | Cost | -|---|---| -| Input tokens | $0.0005 | -| Output tokens | $0.0002 | -| Request fee | $0.012 | -| Total | $0.0127 | +## Agent API Research Preset -## Deep Research Example - -Sonar Deep Research - -- Low -- Medium -- High +`low` preset representative run • 2,000 input + 1,000 output tokens • 1 web search + 1 fetch | Component | Cost | |---|---| -| Input tokens (33) | $0.000066 | -| Output tokens (7163) | $0.057304 | -| Citation tokens (20016) | $0.040032 | -| Reasoning tokens (73997) | $0.221991 | -| Search queries (18) | $0.09 | -| Total | $0.409393 | +| Model input tokens | $0.001 | +| Model output tokens | $0.003 | +| `web_search` | $0.0025 | +| `fetch_url` | $0.00025 | +| Total | $0.00675 | -| Component | Cost | -|---|---| -| Input tokens (7) | $0.00 | -| Output tokens (3847) | $0.031 | -| Citation tokens (47293) | $0.095 | -| Reasoning tokens (308156) | $0.924 | -| Search queries (28) | $0.14 | -| Total | $1.190 | - -| Component | Cost | -|---|---| -| Input tokens (8) | $0.00 | -| Output tokens (4435) | $0.035 | -| Citation tokens (58196) | $0.116 | -| Reasoning tokens (339594) | $1.019 | -| Search queries (30) | $0.15 | -| Total | $1.320 | +Actual preset costs vary with the selected model, token usage, and tool invocations. When present on a completed response, `usage.cost.total_cost` reports the calculated request cost. ## Purchase Options