Overview
Perplexity’s Agent API supports the OpenAI Responses API interface, so you can use existing OpenAI client libraries by changing the base URL and providing your Perplexity API key. The APIs are not identical, and some defaults and Perplexity extensions differ.Endpoint Note: Perplexity’s canonical Agent API endpoint is
POST /v1/agent. For OpenAI SDK compatibility, POST /v1/responses is also accepted as an alias — the OpenAI SDK automatically routes client.responses.create() to /v1/responses, which Perplexity handles seamlessly. No SDK changes are needed beyond setting the base URL.null require_approval as "never", while OpenAI defaults MCP calls to approval.
We recommend using the Perplexity SDK for the best experience with full type safety, enhanced features, and effort level support. Use OpenAI SDKs if you’re already integrated and need drop-in compatibility.
Quick Start
Use the OpenAI SDK with Perplexity’s Agent API:- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Explain the key differences between REST and GraphQL APIs"
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
const response = await client.responses.create({
model: "openai/gpt-5.6-luna",
input: "Explain the key differences between REST and GraphQL APIs"
});
console.log(response.output_text);
Response
Response
{
"id": "resp_7edd7725-4ae1-49ad-9e96-22c93679363e",
"created_at": 1779391454,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "- REST follows a resource-based architecture and typically uses multiple endpoints for different resources.\n- GraphQL provides a single endpoint where clients can request exactly the data they need...",
"title": "GraphQL vs REST - GeeksforGeeks",
"url": "https://www.geeksforgeeks.org/graphql/graphql-vs-rest-which-is-better-for-apis/",
"date": "2026-03-11",
"last_updated": "2026-05-18",
"source": "web"
},
{
"id": 2,
"snippet": "GraphQL queries access not just the properties of one resource but also smoothly follow references between them.\nWhile typical REST APIs require loading from multiple URLs, GraphQL APIs get all the...",
"title": "GraphQL | The query language for modern APIs",
"url": "https://graphql.org",
"date": null,
"last_updated": "2026-05-06",
"source": "web"
},
{
"id": 3,
"snippet": "{ts:15} rest let's talk about the fundamental differences between graphql and rest rest stands for representational State\n{ts:22} transfer and it typically has unique URLs it follows the standard...",
"title": "GraphQL vs REST: What's the Difference and When Should You ...",
"url": "https://www.youtube.com/watch?v=2wz19HOyu1w",
"date": "2025-04-01",
"last_updated": "2026-04-14",
"source": "web"
},
{
"id": 4,
"snippet": "- GraphQL is built around the concept of \"getting exactly what you asked for\"without any data under or overfetching.\n- GraphQL makes it easier to aggregate data from multiple sources.\nIt uses a type...",
"title": "What Is GraphQL and How It Works - Hygraph",
"url": "https://hygraph.com/learn/graphql",
"date": "2025-10-27",
"last_updated": "2026-05-13",
"source": "web"
},
{
"id": 5,
"snippet": "Unlike REST, which typically uses multiple endpoints to fetch data and perform network operations, GraphQL exposes data models by using a single endpoint through which clients send GraphQL requests...",
"title": "GraphQL vs REST: What's the Difference? - IBM",
"url": "https://www.ibm.com/think/topics/graphql-vs-rest-api",
"date": "2024-03-29",
"last_updated": "2026-01-17",
"source": "web"
},
{
"id": 6,
"snippet": "As stated in REST API vs GraphQL, “the key difference between GraphQL and REST APIs is that GraphQL is a query language, while REST is an architectural concept for network-based software.”",
"title": "The Role and Impact of GraphQL - F5 Networks",
"url": "https://www.f5.com/resources/reports/the-role-and-impact-of-graphql-octo-report",
"date": null,
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 7,
"snippet": "The key differences lie in data fetching, schema definition, versioning, and error handling.\nGraphQL uses a single endpoint and allows clients to specify their data requirements, while REST relies on...",
"title": "GraphQL vs REST: Key Similarities and Differences Explained",
"url": "https://konghq.com/blog/learning-center/graphql-vs-rest",
"date": "2025-02-28",
"last_updated": "2026-05-19",
"source": "web"
},
{
"id": 8,
"snippet": "Instead of exposing multiple endpoints that return fixed response structures, a GraphQL API typically exposes a **single endpoint**.\nClients send queries that specify exactly what data they need...",
"title": "REST vs GraphQL: Key Differences, Performance, and When to Use ...",
"url": "https://dev.to/riteshkokam/rest-vs-graphql-key-differences-performance-and-when-to-use-each-51n7",
"date": "2026-03-09",
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 9,
"snippet": "Unlike REST, GraphQL allows for requesting specific data that a client needs, departing from the fixed data structure approach.\n...\nIn a nutshell, mainly the progress GraphQL has made is querying in...",
"title": "GraphQL: Core Features, Architecture, Pros and Cons - AltexSoft",
"url": "https://www.altexsoft.com/blog/graphql-core-features-architecture-pros-and-cons/",
"date": "2019-03-23",
"last_updated": "2026-03-31",
"source": "web"
}
],
"type": "search_results",
"queries": [
"REST vs GraphQL key differences",
"REST API characteristics",
"GraphQL API characteristics"
]
},
{
"id": "msg_d44758f0-ae0f-4d8a-8ded-ceb68d67ab49",
"content": [
{
"text": "REST and GraphQL are both ways to build APIs, but REST is an architectural style built around multiple resource URLs and HTTP semantics, while GraphQL is a query language over a single endpoint where the client specifies exactly which data it needs.[web:5][web:6] GraphQL typically reduces over‑fetching and under‑fetching compared to REST by letting clients shape responses, at the cost of more complexity in schema design and caching.[web:1][web:8]\n\n## Core conceptual difference\n\n- REST is an **architectural** pattern that exposes resources via multiple endpoints, using HTTP verbs (GET, POST, PUT, DELETE, etc.) and status codes to model operations.[web:1][web:5] \n- GraphQL is a **query** language and runtime that sits behind usually one endpoint and lets clients send structured queries, mutations, and subscriptions against a typed schema.[web:2][web:4][web:6]\n\n## Endpoints and data fetching\n\n- REST typically has many endpoints (e.g., `/users`, `/users/1/posts`) and each endpoint returns a fixed data shape defined by the server.[web:1][web:7] \n- GraphQL usually has a single endpoint (e.g., `/graphql`), and the client declares exactly which fields and related objects it wants in a single request, often avoiding multiple round trips.[web:2][web:4][web:5]\n\n## Over‑fetching, under‑fetching, and performance\n\n- With REST, clients often receive more data than needed (over‑fetching) or must call several endpoints to collect enough data (under‑fetching), especially for nested relationships.[web:1][web:5][web:9] \n- GraphQL queries return only requested fields, which reduces payload sizes and the number of requests, though raw query speed is not inherently faster; efficiency comes from tailoring the payload.[web:4][web:8]\n\n## Typing, versioning, and evolution\n\n- REST responses are often JSON without a strict, machine‑enforced schema, and breaking changes are commonly managed with versioned URLs like `/api/v1` and `/api/v2`.[web:5][web:8] \n- GraphQL uses a strongly typed schema with introspection, enabling tools, self‑documentation, and schema evolution via adding fields and deprecating old ones instead of creating new API versions.[web:2][web:4][web:5][web:8]\n\n## Caching and real‑time features\n\n- REST works naturally with HTTP caching (ETags, Cache‑Control) because resources are tied to URLs and standard methods, making it straightforward for browsers and proxies to cache responses.[web:5][web:8] \n- GraphQL usually needs custom or client‑side caching strategies (e.g., normalized caches) due to a single endpoint, but it offers built‑in support for real‑time updates via subscriptions, whereas REST relies on techniques like polling or server‑sent events.[web:1][web:4][web:5]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 5870,
"output_tokens": 679,
"total_tokens": 6549,
"cost": {
"currency": "USD",
"input_cost": 0.00914,
"output_cost": 0.01358,
"total_cost": 0.02665,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391454
}
Configuration
Setting Up the OpenAI SDK
Configure OpenAI SDKs to work with Perplexity by setting thebase_url to https://api.perplexity.ai/v1:
- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
Important: Use
base_url="https://api.perplexity.ai/v1" (with /v1) for the Agent API.Agent API
Perplexity’s Agent API follows OpenAI’s Responses API request/response format. The OpenAI SDK’sclient.responses.create() method works out of the box — the SDK sends requests to /v1/responses, which Perplexity accepts alongside the canonical /v1/agent endpoint.
Basic Usage
- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Explain the key differences between REST and GraphQL APIs"
)
print(response.output_text)
print(f"Response ID: {response.id}")
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
const response = await client.responses.create({
model: "openai/gpt-5.6-luna",
input: "Explain the key differences between REST and GraphQL APIs"
});
console.log(response.output_text);
console.log(`Response ID: ${response.id}`);
Response
Response
{
"id": "resp_7edd7725-4ae1-49ad-9e96-22c93679363e",
"created_at": 1779391454,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "- REST follows a resource-based architecture and typically uses multiple endpoints for different resources.\n- GraphQL provides a single endpoint where clients can request exactly the data they need...",
"title": "GraphQL vs REST - GeeksforGeeks",
"url": "https://www.geeksforgeeks.org/graphql/graphql-vs-rest-which-is-better-for-apis/",
"date": "2026-03-11",
"last_updated": "2026-05-18",
"source": "web"
},
{
"id": 2,
"snippet": "GraphQL queries access not just the properties of one resource but also smoothly follow references between them.\nWhile typical REST APIs require loading from multiple URLs, GraphQL APIs get all the...",
"title": "GraphQL | The query language for modern APIs",
"url": "https://graphql.org",
"date": null,
"last_updated": "2026-05-06",
"source": "web"
},
{
"id": 3,
"snippet": "{ts:15} rest let's talk about the fundamental differences between graphql and rest rest stands for representational State\n{ts:22} transfer and it typically has unique URLs it follows the standard...",
"title": "GraphQL vs REST: What's the Difference and When Should You ...",
"url": "https://www.youtube.com/watch?v=2wz19HOyu1w",
"date": "2025-04-01",
"last_updated": "2026-04-14",
"source": "web"
},
{
"id": 4,
"snippet": "- GraphQL is built around the concept of \"getting exactly what you asked for\"without any data under or overfetching.\n- GraphQL makes it easier to aggregate data from multiple sources.\nIt uses a type...",
"title": "What Is GraphQL and How It Works - Hygraph",
"url": "https://hygraph.com/learn/graphql",
"date": "2025-10-27",
"last_updated": "2026-05-13",
"source": "web"
},
{
"id": 5,
"snippet": "Unlike REST, which typically uses multiple endpoints to fetch data and perform network operations, GraphQL exposes data models by using a single endpoint through which clients send GraphQL requests...",
"title": "GraphQL vs REST: What's the Difference? - IBM",
"url": "https://www.ibm.com/think/topics/graphql-vs-rest-api",
"date": "2024-03-29",
"last_updated": "2026-01-17",
"source": "web"
},
{
"id": 6,
"snippet": "As stated in REST API vs GraphQL, “the key difference between GraphQL and REST APIs is that GraphQL is a query language, while REST is an architectural concept for network-based software.”",
"title": "The Role and Impact of GraphQL - F5 Networks",
"url": "https://www.f5.com/resources/reports/the-role-and-impact-of-graphql-octo-report",
"date": null,
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 7,
"snippet": "The key differences lie in data fetching, schema definition, versioning, and error handling.\nGraphQL uses a single endpoint and allows clients to specify their data requirements, while REST relies on...",
"title": "GraphQL vs REST: Key Similarities and Differences Explained",
"url": "https://konghq.com/blog/learning-center/graphql-vs-rest",
"date": "2025-02-28",
"last_updated": "2026-05-19",
"source": "web"
},
{
"id": 8,
"snippet": "Instead of exposing multiple endpoints that return fixed response structures, a GraphQL API typically exposes a **single endpoint**.\nClients send queries that specify exactly what data they need...",
"title": "REST vs GraphQL: Key Differences, Performance, and When to Use ...",
"url": "https://dev.to/riteshkokam/rest-vs-graphql-key-differences-performance-and-when-to-use-each-51n7",
"date": "2026-03-09",
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 9,
"snippet": "Unlike REST, GraphQL allows for requesting specific data that a client needs, departing from the fixed data structure approach.\n...\nIn a nutshell, mainly the progress GraphQL has made is querying in...",
"title": "GraphQL: Core Features, Architecture, Pros and Cons - AltexSoft",
"url": "https://www.altexsoft.com/blog/graphql-core-features-architecture-pros-and-cons/",
"date": "2019-03-23",
"last_updated": "2026-03-31",
"source": "web"
}
],
"type": "search_results",
"queries": [
"REST vs GraphQL key differences",
"REST API characteristics",
"GraphQL API characteristics"
]
},
{
"id": "msg_d44758f0-ae0f-4d8a-8ded-ceb68d67ab49",
"content": [
{
"text": "REST and GraphQL are both ways to build APIs, but REST is an architectural style built around multiple resource URLs and HTTP semantics, while GraphQL is a query language over a single endpoint where the client specifies exactly which data it needs.[web:5][web:6] GraphQL typically reduces over‑fetching and under‑fetching compared to REST by letting clients shape responses, at the cost of more complexity in schema design and caching.[web:1][web:8]\n\n## Core conceptual difference\n\n- REST is an **architectural** pattern that exposes resources via multiple endpoints, using HTTP verbs (GET, POST, PUT, DELETE, etc.) and status codes to model operations.[web:1][web:5] \n- GraphQL is a **query** language and runtime that sits behind usually one endpoint and lets clients send structured queries, mutations, and subscriptions against a typed schema.[web:2][web:4][web:6]\n\n## Endpoints and data fetching\n\n- REST typically has many endpoints (e.g., `/users`, `/users/1/posts`) and each endpoint returns a fixed data shape defined by the server.[web:1][web:7] \n- GraphQL usually has a single endpoint (e.g., `/graphql`), and the client declares exactly which fields and related objects it wants in a single request, often avoiding multiple round trips.[web:2][web:4][web:5]\n\n## Over‑fetching, under‑fetching, and performance\n\n- With REST, clients often receive more data than needed (over‑fetching) or must call several endpoints to collect enough data (under‑fetching), especially for nested relationships.[web:1][web:5][web:9] \n- GraphQL queries return only requested fields, which reduces payload sizes and the number of requests, though raw query speed is not inherently faster; efficiency comes from tailoring the payload.[web:4][web:8]\n\n## Typing, versioning, and evolution\n\n- REST responses are often JSON without a strict, machine‑enforced schema, and breaking changes are commonly managed with versioned URLs like `/api/v1` and `/api/v2`.[web:5][web:8] \n- GraphQL uses a strongly typed schema with introspection, enabling tools, self‑documentation, and schema evolution via adding fields and deprecating old ones instead of creating new API versions.[web:2][web:4][web:5][web:8]\n\n## Caching and real‑time features\n\n- REST works naturally with HTTP caching (ETags, Cache‑Control) because resources are tied to URLs and standard methods, making it straightforward for browsers and proxies to cache responses.[web:5][web:8] \n- GraphQL usually needs custom or client‑side caching strategies (e.g., normalized caches) due to a single endpoint, but it offers built‑in support for real‑time updates via subscriptions, whereas REST relies on techniques like polling or server‑sent events.[web:1][web:4][web:5]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 5870,
"output_tokens": 679,
"total_tokens": 6549,
"cost": {
"currency": "USD",
"input_cost": 0.00914,
"output_cost": 0.01358,
"total_cost": 0.02665,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391454
}
Using Effort Levels
Effort levels are pre-configured setups optimized for specific use cases. Useextra_body to pass effort levels via the OpenAI SDK:
- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
# Pass effort via extra_body
response = client.responses.create(
input="Compare the design philosophy of Apple's A-series and Qualcomm's Snapdragon mobile SoCs at a high level: CPU and GPU choices and overall system integration.",
extra_body={
"effort": "low"
}
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
// Use type casting (as any) to pass effort directly
const response = await (client.responses.create as any)({
input: "Compare the design philosophy of Apple's A-series and Qualcomm's Snapdragon mobile SoCs at a high level: CPU and GPU choices and overall system integration.",
effort: "low"
});
console.log(response.output_text);
Response
Response
{
"id": "resp_18215035-0ac4-4b27-915c-62399ff87fc0",
"created_at": 1779391825,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "The *A* series is a family of SoCs used in the iPhone, certain iPad models (including iPad Mini and entry-level iPad), MacBook Neo, and the Apple TV.\n*A*-series chips were also used in the...",
"title": "Apple silicon - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Apple_silicon",
"date": "2011-07-06",
"last_updated": "2026-05-18",
"source": "web"
},
{
"id": 2,
"snippet": "{ts:230} Apple's range then we'll go back again to ccom so we're looking now at the M3 family it's a series of arm-based system\n{ts:237} on a chips designed by Apple the M3 process include a central...",
"title": "Apple M3 vs Snapdragon X Elite - History, Features, and Software",
"url": "https://www.youtube.com/watch?v=V8Rbjwz0dVU",
"date": "2023-11-03",
"last_updated": "2026-05-16",
"source": "web"
},
{
"id": 3,
"snippet": "Leveraging a unified memory architecture for CPU and GPU tasks, Mac apps will see amazing performance benefits from Apple silicon tuned frameworks such as Metal and Accelerate.\n...\nNow, the new Apple...",
"title": "Explore the new system architecture of Apple silicon Macs - WWDC20",
"url": "https://developer.apple.com/videos/play/wwdc2020/10686/",
"date": "2020-06-24",
"last_updated": "2026-05-14",
"source": "web"
},
{
"id": 4,
"snippet": "Apple designs its chips specifically for iOS, which allows tight hardware and software integration.\n...\nWe also discuss how Apple Bionic processors focus on high single-core performance, efficient...",
"title": "Apple Bionic vs Snapdragon – Which Chip Is Actually Better for ...",
"url": "https://www.youtube.com/watch?v=jiDCtvI_MC4",
"date": "2026-03-06",
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 5,
"snippet": "Key Concepts\n- RISC Architecture: Utilizes a simplified instruction set for efficient processing.\n- Pipeline Organization: Enables simultaneous instruction execution for enhanced throughput.\n- Cache...",
"title": "CASE STUDY 3: Apple A-Series Mobile Processor Architecture",
"url": "https://www.studocu.com/in/document/navjeevan-education-societys-polytechnic-bhandup/computer-graphics/case-study-3-apple-a-series-mobile-processor-architecture/157859088",
"date": "2026-04-02",
"last_updated": "2026-04-12",
"source": "web"
},
{
"id": 6,
"snippet": "\n6-core GPU (graphics \nprocessor unit) \n\n2 dual-core CPU \n(central processing\n...\nA13 consists of: \n\nEight-core Neural \nEngine with\nMachine Learning \n\nFour-core GPU \n(20% faster > A12) \n...",
"title": "Recent Advances and Outlook for Heterogeneous Integration",
"url": "https://ewh.ieee.org/soc/cpmt/presentations/eps2002a.pdf",
"date": null,
"last_updated": "2025-10-23",
"source": "web"
},
{
"id": 7,
"snippet": "In contrast, Apple designs its chips—like the A17 Pro and upcoming A18—for vertical integration within iOS.\nThis means the CPU, GPU, memory controller, and Neural Engine are all developed in-house...",
"title": "Snapdragon Vs Apple Chip Which Powers Smoother ...",
"url": "https://www.alibaba.com/product-insights/snapdragon-vs-apple-chip-which-powers-smoother-mobile-gaming-performance.html",
"date": "2026-01-08",
"last_updated": "2026-01-16",
"source": "web"
},
{
"id": 8,
"snippet": "A series SoCsThe A series is a family of SoCs used in the iPhone, certain iPad models (including iPad Mini and entry-level iPad), and the Apple TV.\nA-series chips were alsoused in the discontinued...",
"title": "Apple Silicon - Wikipedia | PDF | I Pad",
"url": "https://www.scribd.com/document/909655498/Apple-Silicon-Wikipedia",
"date": "2025-09-29",
"last_updated": "2026-01-19",
"source": "web"
},
{
"id": 9,
"snippet": "Snapdragon processors integrate multiple components like the CPU, GPU, NPU, and modem on a single chip.\nThis integration and specific software integrations improves processing efficiency, improves...",
"title": "What is Snapdragon FAQ | Qualcomm",
"url": "https://www.qualcomm.com/snapdragon/what-is-snapdragon",
"date": "2024-06-27",
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 10,
"snippet": "The Apple A15 Bionic is a System on a Chip (SoC) from Apple that is found in the iPhone 13 and iPad Mini (2021) models.\nIt was announced late 2021 and offers 6 cores divided in 2 performance cores...",
"title": "Qualcomm Snapdragon 8 Gen 1 vs Apple A15 Bionic ...",
"url": "https://www.notebookcheck.net/SD-8-Gen-1-vs-A15-vs-A12-Bionic_14029_13825_10166.247596.0.html",
"date": "2023-07-01",
"last_updated": "2025-12-01",
"source": "web"
}
],
"type": "search_results",
"queries": [
"Apple A-series SoC design philosophy CPU GPU integration",
"Qualcomm Snapdragon design philosophy CPU GPU integration",
"Apple A-series vs Snapdragon CPU GPU architecture high level"
]
},
{
"id": "msg_6d730289-196f-44c5-9561-11554263bcda",
"content": [
{
"text": "Apple’s A‑series SoCs are vertically optimized, custom CPU/GPU designs built for iOS with tight hardware–software co‑design and aggressive single‑thread efficiency, while Snapdragon SoCs emphasize modularity, semi‑custom ARM CPU cores, Adreno GPUs, and broad OEM feature flexibility, especially around connectivity and gaming. [web:1][web:4][web:7][web:9] At a high level, Apple optimizes one tightly controlled platform end‑to‑end, whereas Qualcomm optimizes a scalable platform that can be configured across many devices, vendors, and price tiers. [web:4][web:7][web:9]\n\n## CPU philosophy\n\n- Apple A‑series uses fully custom ARM‑compatible cores (e.g., “large” performance + “small” efficiency cores) designed in‑house rather than off‑the‑shelf Cortex designs, with a focus on high IPC and strong single‑core performance at mobile power envelopes. [web:4][web:5][web:7] \n- Snapdragon flagships typically use ARM’s Cortex performance/efficiency cores or semi‑custom derivatives in a big.LITTLE or tri‑cluster layout, tuned for good multi‑core throughput, thermals, and time‑to‑market across many OEMs. [web:9][web:10] \n- Because Apple controls the OS and app stack, A‑series CPU microarchitecture, cache hierarchy, and power management are co‑designed with iOS and major frameworks, allowing very aggressive per‑core performance without sacrificing battery life. [web:3][web:4][web:5][web:7] \n- Qualcomm instead exposes a flexible platform: CPU scheduling, DVFS behavior, and thermal limits are co‑tuned with each OEM’s Android skin, form factor, and cooling solution. [web:9] \n\n## GPU and graphics focus\n\n- Apple integrates its own in‑house GPU designs in recent A‑series generations (heritage from PowerVR, but now branded Apple GPU), tightly tied to Metal and Apple’s graphics stack. [web:1][web:3][web:4][web:7] \n- Qualcomm’s Snapdragon line uses Adreno GPUs, a long‑running, internally developed GPU family heavily optimized for mobile gaming, high refresh displays, and broad API support (Vulkan, OpenGL ES, often desktop‑style DirectX in PC‑class parts). [web:2][web:4][web:9] \n- Apple’s design leans toward consistent, thermally stable performance and efficient use of a unified memory architecture, which benefits real‑world rendering and GPU–CPU data sharing even when peak theoretical throughput is not always highest on paper. [web:3][web:5][web:7] \n- Snapdragon’s philosophy has often highlighted headline GPU features for OEMs (high FPS gaming modes, variable rate shading, advanced display pipelines) to differentiate Android flagships, gaming phones, and XR devices. [web:4][web:7][web:9] \n\n## System integration and memory\n\n- A‑series chips are classic “all‑in‑one” SoCs: CPU, GPU, Neural Engine, ISP, media codecs, secure enclave, and other accelerators share a high‑bandwidth internal fabric and system‑level cache, reducing off‑chip traffic and latency. [web:1][web:3][web:5][web:6] \n- Apple strongly emphasizes a **unified** memory architecture and system‑level cache: CPU, GPU, and ML engines access the same physical memory pool without copies, which simplifies software and boosts efficiency for mixed workloads (e.g., compute + graphics + ML in one frame). [web:3][web:5][web:7] \n- Snapdragon SoCs also integrate CPU, Adreno GPU, Hexagon NPU/DSP, ISP, and media engines, but place special strategic weight on heterogeneous computing: offloading pieces of a workload to the “best” block (CPU, GPU, DSP, NPU) depending on power and latency. [web:9] \n- Unlike Apple, Qualcomm must support many OS variants and OEM stacks, so its integration strategy stresses standard interfaces and flexible partitioning rather than deep co‑design with a single OS and set of first‑party apps. [web:4][web:7][web:9] \n\n## Connectivity and platform strategy\n\n- Apple typically pairs A‑series SoCs with separate modems (historically Qualcomm, now sometimes in‑house efforts), prioritizing SoC area and power budget for application‑processor blocks and deferring RF/telecom differentiation to the modem. [web:1][web:7] \n- Snapdragon flagships usually integrate the cellular modem platform tightly with the SoC family (even when packaged separately), and Qualcomm positions Snapdragon as a full connectivity + compute stack: 5G, Wi‑Fi, BT, GNSS, audio codecs, and camera pipelines are part of the platform story for OEMs. [web:9] \n- Apple’s vertical model optimizes for a small number of premium devices with long support lifetimes, using the A‑series as a cornerstone of the overall iOS experience. [web:1][web:4][web:7] \n- Qualcomm’s model optimizes for breadth: multiple Snapdragon tiers, re‑usable IP blocks, and scalable feature sets across phones, tablets, wearables, XR headsets, PCs, and automotive, all built on related CPU/GPU/NPU architectures. [web:2][web:9]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 6325,
"output_tokens": 1210,
"total_tokens": 7535,
"cost": {
"currency": "USD",
"input_cost": 0.01096,
"output_cost": 0.0242,
"total_cost": 0.03909,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391825
}
See Agent API Effort Levels for available effort levels and their configurations.
Using Third-Party Models
You can also specify third-party models directly instead of using effort levels:- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Explain the key differences between REST and GraphQL APIs"
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
const response = await client.responses.create({
model: "openai/gpt-5.6-luna",
input: "Explain the key differences between REST and GraphQL APIs"
});
console.log(response.output_text);
Response
Response
{
"id": "resp_7edd7725-4ae1-49ad-9e96-22c93679363e",
"created_at": 1779391454,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "- REST follows a resource-based architecture and typically uses multiple endpoints for different resources.\n- GraphQL provides a single endpoint where clients can request exactly the data they need...",
"title": "GraphQL vs REST - GeeksforGeeks",
"url": "https://www.geeksforgeeks.org/graphql/graphql-vs-rest-which-is-better-for-apis/",
"date": "2026-03-11",
"last_updated": "2026-05-18",
"source": "web"
},
{
"id": 2,
"snippet": "GraphQL queries access not just the properties of one resource but also smoothly follow references between them.\nWhile typical REST APIs require loading from multiple URLs, GraphQL APIs get all the...",
"title": "GraphQL | The query language for modern APIs",
"url": "https://graphql.org",
"date": null,
"last_updated": "2026-05-06",
"source": "web"
},
{
"id": 3,
"snippet": "{ts:15} rest let's talk about the fundamental differences between graphql and rest rest stands for representational State\n{ts:22} transfer and it typically has unique URLs it follows the standard...",
"title": "GraphQL vs REST: What's the Difference and When Should You ...",
"url": "https://www.youtube.com/watch?v=2wz19HOyu1w",
"date": "2025-04-01",
"last_updated": "2026-04-14",
"source": "web"
},
{
"id": 4,
"snippet": "- GraphQL is built around the concept of \"getting exactly what you asked for\"without any data under or overfetching.\n- GraphQL makes it easier to aggregate data from multiple sources.\nIt uses a type...",
"title": "What Is GraphQL and How It Works - Hygraph",
"url": "https://hygraph.com/learn/graphql",
"date": "2025-10-27",
"last_updated": "2026-05-13",
"source": "web"
},
{
"id": 5,
"snippet": "Unlike REST, which typically uses multiple endpoints to fetch data and perform network operations, GraphQL exposes data models by using a single endpoint through which clients send GraphQL requests...",
"title": "GraphQL vs REST: What's the Difference? - IBM",
"url": "https://www.ibm.com/think/topics/graphql-vs-rest-api",
"date": "2024-03-29",
"last_updated": "2026-01-17",
"source": "web"
},
{
"id": 6,
"snippet": "As stated in REST API vs GraphQL, “the key difference between GraphQL and REST APIs is that GraphQL is a query language, while REST is an architectural concept for network-based software.”",
"title": "The Role and Impact of GraphQL - F5 Networks",
"url": "https://www.f5.com/resources/reports/the-role-and-impact-of-graphql-octo-report",
"date": null,
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 7,
"snippet": "The key differences lie in data fetching, schema definition, versioning, and error handling.\nGraphQL uses a single endpoint and allows clients to specify their data requirements, while REST relies on...",
"title": "GraphQL vs REST: Key Similarities and Differences Explained",
"url": "https://konghq.com/blog/learning-center/graphql-vs-rest",
"date": "2025-02-28",
"last_updated": "2026-05-19",
"source": "web"
},
{
"id": 8,
"snippet": "Instead of exposing multiple endpoints that return fixed response structures, a GraphQL API typically exposes a **single endpoint**.\nClients send queries that specify exactly what data they need...",
"title": "REST vs GraphQL: Key Differences, Performance, and When to Use ...",
"url": "https://dev.to/riteshkokam/rest-vs-graphql-key-differences-performance-and-when-to-use-each-51n7",
"date": "2026-03-09",
"last_updated": "2026-05-21",
"source": "web"
},
{
"id": 9,
"snippet": "Unlike REST, GraphQL allows for requesting specific data that a client needs, departing from the fixed data structure approach.\n...\nIn a nutshell, mainly the progress GraphQL has made is querying in...",
"title": "GraphQL: Core Features, Architecture, Pros and Cons - AltexSoft",
"url": "https://www.altexsoft.com/blog/graphql-core-features-architecture-pros-and-cons/",
"date": "2019-03-23",
"last_updated": "2026-03-31",
"source": "web"
}
],
"type": "search_results",
"queries": [
"REST vs GraphQL key differences",
"REST API characteristics",
"GraphQL API characteristics"
]
},
{
"id": "msg_d44758f0-ae0f-4d8a-8ded-ceb68d67ab49",
"content": [
{
"text": "REST and GraphQL are both ways to build APIs, but REST is an architectural style built around multiple resource URLs and HTTP semantics, while GraphQL is a query language over a single endpoint where the client specifies exactly which data it needs.[web:5][web:6] GraphQL typically reduces over‑fetching and under‑fetching compared to REST by letting clients shape responses, at the cost of more complexity in schema design and caching.[web:1][web:8]\n\n## Core conceptual difference\n\n- REST is an **architectural** pattern that exposes resources via multiple endpoints, using HTTP verbs (GET, POST, PUT, DELETE, etc.) and status codes to model operations.[web:1][web:5] \n- GraphQL is a **query** language and runtime that sits behind usually one endpoint and lets clients send structured queries, mutations, and subscriptions against a typed schema.[web:2][web:4][web:6]\n\n## Endpoints and data fetching\n\n- REST typically has many endpoints (e.g., `/users`, `/users/1/posts`) and each endpoint returns a fixed data shape defined by the server.[web:1][web:7] \n- GraphQL usually has a single endpoint (e.g., `/graphql`), and the client declares exactly which fields and related objects it wants in a single request, often avoiding multiple round trips.[web:2][web:4][web:5]\n\n## Over‑fetching, under‑fetching, and performance\n\n- With REST, clients often receive more data than needed (over‑fetching) or must call several endpoints to collect enough data (under‑fetching), especially for nested relationships.[web:1][web:5][web:9] \n- GraphQL queries return only requested fields, which reduces payload sizes and the number of requests, though raw query speed is not inherently faster; efficiency comes from tailoring the payload.[web:4][web:8]\n\n## Typing, versioning, and evolution\n\n- REST responses are often JSON without a strict, machine‑enforced schema, and breaking changes are commonly managed with versioned URLs like `/api/v1` and `/api/v2`.[web:5][web:8] \n- GraphQL uses a strongly typed schema with introspection, enabling tools, self‑documentation, and schema evolution via adding fields and deprecating old ones instead of creating new API versions.[web:2][web:4][web:5][web:8]\n\n## Caching and real‑time features\n\n- REST works naturally with HTTP caching (ETags, Cache‑Control) because resources are tied to URLs and standard methods, making it straightforward for browsers and proxies to cache responses.[web:5][web:8] \n- GraphQL usually needs custom or client‑side caching strategies (e.g., normalized caches) due to a single endpoint, but it offers built‑in support for real‑time updates via subscriptions, whereas REST relies on techniques like polling or server‑sent events.[web:1][web:4][web:5]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 5870,
"output_tokens": 679,
"total_tokens": 6549,
"cost": {
"currency": "USD",
"input_cost": 0.00914,
"output_cost": 0.01358,
"total_cost": 0.02665,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391454
}
Streaming Responses
Streaming works with the Agent API:- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Write a short bedtime story about a curious fox who discovers a hidden meadow.",
stream=True
)
for event in response:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
const response = await client.responses.create({
model: "openai/gpt-5.6-luna",
input: "Write a short bedtime story about a curious fox who discovers a hidden meadow.",
stream: true
});
for await (const event of response) {
if (event.type === "response.output_text.delta") {
process.stdout.write(event.delta);
}
}
Response
Response
{
"id": "resp_298bc3ed-1e44-4f44-bf04-04c55e188d0d",
"created_at": 1779391925,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "Is your little one struggling to fall asleep?\nJoin The Curious Little Fox, a heartwarming bedtime story filled with adventure, wonder and gentle life lessons.\nPerfect for story time, this tale is...",
"title": "The Curious Little Fox | Bedtime Story for Kids - YouTube",
"url": "https://www.youtube.com/watch?v=r1f0lCO8OoU",
"date": "2025-09-29",
"last_updated": "2025-11-19",
"source": "web"
},
{
"id": 2,
"snippet": "Join us for \"The Curious Fox and the Hidden Cave,\" a magical story about self-discovery and courage!\nWhen Felix the fox ventures into a mysterious cave, he discovers a glowing pool of water and meets...",
"title": "The Curious Fox and the Hidden Cave | Inspiring Kids Story on Self ...",
"url": "https://www.youtube.com/watch?v=9p-1awCFnHI",
"date": "2024-11-13",
"last_updated": "2025-08-21",
"source": "web"
},
{
"id": 3,
"snippet": "In this quiet winter bedtime story, a young fox cub named Rill learns that stillness has its own music.\nAs snow softens the forest and the world slows, he discovers the gentle rhythm hidden in...",
"title": "Tuck Me In: Tranquil Bedtime Stories | iHeart",
"url": "https://www.iheart.com/podcast/269-tuck-me-in-tranquil-bedtim-304484365/",
"date": "2025-12-28",
"last_updated": "2026-01-20",
"source": "web"
},
{
"id": 4,
"snippet": "1. Hunting for Bugs\n2. Lost in the Rain\n3. The Red Barn\n4. Little Drops and Big Drops\n5. What Is It?\n6. There It Is!\n7. Bat Looks for a Friend\n8. No Luck!\n9. A New Home\n10. Around the Well\n11. Cow...",
"title": "Full List - Little Fox",
"url": "https://www.littlefox.com/en/full_list",
"date": null,
"last_updated": "2026-05-18",
"source": "web"
},
{
"id": 5,
"snippet": "**Curious George**\nIn a cheerful town where laughter filled the air and bright balloons danced in the sky, lived a playful and curious little monkey named George.\nWith a twinkle in his eyes and a...",
"title": "Curious George - Bedtime Stories",
"url": "https://www.readthetale.com/popular-bedtime-stories/curious-george",
"date": "2025-05-11",
"last_updated": "2025-05-13",
"source": "web"
},
{
"id": 6,
"snippet": "## The Fox and the Magical Forest\n## In a sunny meadow, where wildflowers swayed gently in the breeze, a curious and adventurous young fox named Finnley loved to explore.\nHis orange fur glistened in...",
"title": "The Fox and the Magical Forest",
"url": "https://www.bedtimestory.ai/tabima47511/story/XFC1aSBvZpQ9uL",
"date": "2025-02-13",
"last_updated": "2025-05-15",
"source": "web"
},
{
"id": 7,
"snippet": "## The Little Fox's Big Adventure\n## Once upon a time, in a lush, green forest filled with the sounds of nature, lived Finn the Little Fox.\nFinn was not just any fox; he was small, but his curiosity...",
"title": "The Little Fox's Big Adventure - Bedtimestory.ai",
"url": "https://www.bedtimestory.ai/cahoti59231/story/0C48nf4",
"date": "2024-02-22",
"last_updated": "2026-04-20",
"source": "web"
},
{
"id": 8,
"snippet": "The Curious Little Fox and the Secret Garden | Kids Story | Bedtime Story\nIn the heart of a vast forest, there lived a little fox named Ember.\nEmber was known for her bright orange fur, her bushy...",
"title": "The Curious Little Fox and the Secret Garden | Kids Story | Bedtime Story",
"url": "https://www.youtube.com/watch?v=bpkQPRlhu1U",
"date": "2024-11-25",
"last_updated": "2025-05-15",
"source": "web"
},
{
"id": 9,
"snippet": "✨ The Fox and The Hound — a gentle bedtime story for toddlers filled with friendship, kindness, and calm 🌙\n...\nIn tonight’s cozy tale, your little one will meet a clever fox and a loyal hound who...",
"title": "Magical Bedtime Stories for Kids | The Fox And The Hound",
"url": "https://www.youtube.com/watch?v=DRERlthRRoY",
"date": "2025-07-20",
"last_updated": "2025-08-27",
"source": "web"
},
{
"id": 10,
"snippet": "Join Finn the Fox on a magical adventure through the Great Green Forest!\nIn this enchanting kids' story, Finn meets new animal friends, learns important life lessons, and discovers the wonders of...",
"title": "The Curious Little Fox: A Magical Forest Adventure | Kids Storytime | Animal Friends & Life Lessons",
"url": "https://www.youtube.com/watch?v=q7mueJEE8-I",
"date": "2024-09-02",
"last_updated": "2026-03-09",
"source": "web"
}
],
"type": "search_results",
"queries": [
"bedtime story curious fox hidden meadow original fiction"
]
},
{
"id": "msg_22c9259f-1757-4805-af55-3163d862d8b3",
"content": [
{
"text": "In a quiet forest, under a sky sprinkled with sleepy stars, lived a small fox named Luma who was curious about everything. \n\nEvery evening, when other animals yawned and tucked themselves into their cozy homes, **Luma** would sit at the mouth of her den and watch the fireflies blink awake like tiny lanterns. She wondered where they went when they disappeared, why the wind sometimes whispered and sometimes howled, and whether the moon ever came down to touch the treetops. One soft dusk, as the last pink light faded from the clouds, Luma noticed something new: a faint glow between the trees, like moonlight spilled onto the ground. \n\n“What is that?” she whispered, her ears perking up. Her whiskers tingled with curiosity. Instead of curling up to sleep, Luma followed the glow. She padded over roots and around ferns, her paws making almost no sound on the cool earth. The deeper she walked into the forest, the quieter everything became, until even the crickets seemed to hold their breath. \n\nSoon, Luma came to an old fallen log, its bark soft with moss. Beneath it, a narrow path of pale stones wound away into the shadows, almost hidden under leaves. “A secret path,” Luma breathed. “Where do you lead?” Without another thought, she stepped onto the first stone. \n\nThe path curled between tall trees whose branches knitted together like gentle hands, holding bits of silver moonlight in their fingers. Luma’s tail brushed against ferns that shivered and sprinkled dew on her fur. As she walked, she heard new sounds: a distant bubbling, like laughter made of water, and a faint chiming, as if someone were gently tapping glass. \n\nThe stones finally led her to a curtain of low-hanging branches and twining vines. From the other side came the cool, sweet smell of clover and something else—something bright and green and new. Luma’s heart fluttered in her chest. She nudged the vines aside with her nose and stepped through. \n\nOn the other side was a meadow she had never seen before. It lay hidden like a secret between the trees, round and soft and glowing in the moonlight. The grass was silver at the tips, waving slowly as if it were breathing. Tiny blue flowers dotted the ground, their petals shining like little bits of sky that had fallen down to rest. Fireflies floated above them, drifting in lazy circles, painting gentle trails of light in the air. \n\nIn the center of the meadow flowed a small, clear stream. It sang over smooth stones, its voice the bubbling sound Luma had heard before. As she watched, the water caught the moonlight and scattered it, casting ripples of silver across the grass. The chiming sound came from the reeds by the bank, their thin stalks knocking softly together when the breeze passed by. \n\nLuma stepped into the meadow, her paws sinking into the cool, velvety grass. The air felt softer here, as if the whole place were wrapped in a warm, invisible blanket. She walked in slow circles, breathing in the sweet scents, her eyes wide with wonder. “How long have you been hiding here?” she asked the meadow. The meadow only answered with the hush of the grass and the gentle song of the stream, but Luma felt as if it were smiling. \n\nNear the stream, she found a patch of clover so thick it looked like a green cloud. She curled up right there, close enough for the water to whisper its tiny stories into her ears. Fireflies drifted closer, hovering above her like a cluster of softly glowing stars that had floated down just to keep her company. \n\nAs she lay there, Luma realized something: the hidden meadow had always been part of her forest, yet she had never seen it until she dared to follow the little glow and the secret stone path. “The forest has more secrets than I ever dreamed,” she thought, her eyes growing heavy. “And I can find them, one by one.” \n\nThe stream kept singing, and the grass kept breathing its cool, gentle rhythm. Above, the real stars wheeled slowly across the sky, watching over the small, curious fox in her new favorite place. Luma’s breaths grew deep and slow. Her tail curled around her nose, and her ears relaxed. \n\nJust before she drifted into sleep, she whispered, “Thank you, hidden meadow. I’ll come back tomorrow and discover more of your secrets.” \n\nThe fireflies blinked a little more softly, as if answering her. The moon slipped behind a thin cloud, dimming the light just enough to make everything comfortable and calm. Wrapped in the quiet magic of the meadow, the curious fox closed her eyes and fell into a deep, peaceful sleep, while the forest, the stream, and the stars kept a gentle watch until morning.",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 8559,
"output_tokens": 1047,
"total_tokens": 9606,
"cost": {
"currency": "USD",
"input_cost": 0.0199,
"output_cost": 0.02094,
"total_cost": 0.04477,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391925
}
Using Tools
The Agent API supports built-in tools, including web search. With the OpenAI SDK, pass tools viaextra_body in Python; in TypeScript/JS, pass tools as a top-level parameter and cast the call to bypass the SDK’s type checking:
- Python
- Typescript
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
# Pass tools via extra_body
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="What is an acquisition premium in M&A, and how do strategic vs financial buyers typically differ in their approach?",
extra_body={
"tools": [
{
"type": "web_search",
"filters": {
"search_domain_filter": ["techcrunch.com", "crunchbase.com"]
}
}
]
}
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
// Use type casting (as any) to pass tools directly
const response = await (client.responses.create as any)({
model: "openai/gpt-5.6-luna",
input: "What is an acquisition premium in M&A, and how do strategic vs financial buyers typically differ in their approach?",
tools: [
{
"type": "web_search",
"filters": {
"search_domain_filter": ["techcrunch.com", "crunchbase.com"]
}
}
]
});
console.log(response.output_text);
Response
Response
{
"id": "resp_b58f6b3d-81b1-4324-9df2-428753912f6c",
"created_at": 1779391825,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "The difference between the price paid for a target company and the target’s assessed market value\nAcquisition premium is the difference between the price paid for a target company in a merger or...",
"title": "Acquisition Premium - Overview, How To Calculate, Reasons",
"url": "https://corporatefinanceinstitute.com/resources/valuation/acquisition-premium/",
"date": "2020-02-25",
"last_updated": "2026-02-20",
"source": "web"
},
{
"id": 2,
"snippet": "A strategic buyer values a business based on the synergies they can create, such as cost savings or increased market share, and may be willing to pay a premium.\n...\nStrategic buyers consider the...",
"title": "How Do Strategic vs. Financial Buyers Value a Business Differently?",
"url": "https://bradyware.com/strategic-vs-financial-buyers/",
"date": "2026-01-22",
"last_updated": "2026-05-20",
"source": "web"
},
{
"id": 3,
"snippet": "is inflated, acquisition premiums are significantly lower than when the market is falling, and that target \n...\nThe synergy hypothesis has been widely quoted as a key driver of acquisition premia...",
"title": "[PDF] The Determinants of Premiums Paid in Acquisitions - Tilburg University",
"url": "http://arno.uvt.nl/show.cgi?fid=153548",
"date": "2020-09-25",
"last_updated": "2026-03-04",
"source": "web"
},
{
"id": 4,
"snippet": "Many times, when a business or an entity is looking to buy another business or corporation, they **pay an acquisition premium** or **takeover premium** to purchase it.\nAcquisition premium is the...",
"title": "What is Acquisition Premium? | Eqvista",
"url": "https://eqvista.com/company-valuation/m-a-valuation-methods/acquisition-premium/",
"date": "2026-03-24",
"last_updated": "2026-05-16",
"source": "web"
},
{
"id": 5,
"snippet": "A strategic buyer is a company that acquires another business to strengthen its market position or capabilities.\nUnlike financial buyers, who prioritize investment returns, strategic buyers focus on...",
"title": "Financial Buyer vs Strategic Buyer: Key Differences When Selling a ...",
"url": "https://advisorlegacy.com/blog/strategic-vs-financial-buyers",
"date": "2026-01-09",
"last_updated": "2026-05-16",
"source": "web"
},
{
"id": 6,
"snippet": "In mergers and acquisitions, some buyers are willing to pay more than standard valuation multiples when a target company creates unique strategic value.\nThis is known as the **“strategic fit...",
"title": "Why Strategic Buyers Sometimes Pay More Than Market Valuation",
"url": "https://horizonmaa.com/insights/why-strategic-buyers-sometimes-pay-more-than-market-valuation/",
"date": "2026-03-26",
"last_updated": "2026-03-26",
"source": "web"
},
{
"id": 7,
"snippet": "The acquisition premium, also known as the takeover premium, is the difference between the actual price paid for a target company during a merger or acquisition based on its pre-merger value.\nA...",
"title": "Acquisition Premium (Takeover) | Definition & Example Calculation",
"url": "https://www.myaccountingcourse.com/acquisition-premium-takeover",
"date": "2024-03-04",
"last_updated": "2026-04-30",
"source": "web"
},
{
"id": 8,
"snippet": "When the strategic rationale is strong, buyers may be willing to pay a premium.",
"title": "How Strategic and Financial Buyers Differ in Software M&A",
"url": "https://softwareequity.com/blog/financial-vs-strategic-buyers",
"date": "2026-04-08",
"last_updated": "2026-04-18",
"source": "web"
},
{
"id": 9,
"snippet": "Synergies are often described as situations where “the whole is greater than the sum of its parts.”\nIn corporate M&A, a synergy is generated when a merged company is more valuable than the two...",
"title": "How Synergies Impact What a Strategic Buyer Will Pay",
"url": "https://www.pcecompanies.com/resources/how-synergies-impact-what-buyers-pay",
"date": "2020-08-07",
"last_updated": "2026-03-08",
"source": "web"
},
{
"id": 10,
"snippet": "A **“purchase premium”** in the context of mergers and acquisitions refers to the excess that an acquirer pays over the market trading value of the shares being acquired.\n**“Premiums Paid Analysis”**...",
"title": "Premiums Paid Analysis | M&A Calculation Example - Wall Street Prep",
"url": "https://www.wallstreetprep.com/knowledge/premiums-in-ma/",
"date": "2023-12-05",
"last_updated": "2026-05-17",
"source": "web"
},
{
"id": 11,
"snippet": "Often, strategic buyers are willing to pay more for companies than financial buyers.\nOne reason is that a strategic buyer is better placed to realize synergistic benefits almost instantly.\nThis is...",
"title": "Strategic v. Financial Buyer: Tutorial and Video - Noble Desktop Blog",
"url": "https://blog.nobledesktop.com/learn/financial-modeling/strategic-financial-buyer",
"date": "2026-04-19",
"last_updated": "2026-04-21",
"source": "web"
},
{
"id": 12,
"snippet": "An acquisition premium is the difference (excess) between the market value of a company and the price paid to acquire it.\nAn acquisition premium represents the increased cost of buying a target...",
"title": "An analysis of acquisition premiums in Australia from 2012 to 2022",
"url": "https://www.findex.com.au/insights/article/acquisition-premium-study-an-analysis-of-acquisition-premiums-in-australia-from-2012-to-2022",
"date": "2023-03-06",
"last_updated": "2026-05-19",
"source": "web"
},
{
"id": 13,
"snippet": "In the absence of a sufficient control premium, it is unlikely for an acquirer to successfully obtain a majority stake in the target.\nTherefore, a reasonable premium is paid over the current share...",
"title": "Control Premium | Formula + Calculator - Wall Street Prep",
"url": "https://www.wallstreetprep.com/knowledge/control-premium/",
"date": "2023-10-12",
"last_updated": "2026-05-20",
"source": "web"
}
],
"type": "search_results",
"queries": [
"acquisition premium definition M&A",
"difference strategic vs financial buyers approach to acquisition premium",
"determinants of acquisition premium strategic buyers synergies"
]
},
{
"id": "msg_96e89ec9-5a54-43d4-a4b7-658166b59734",
"content": [
{
"text": "An acquisition premium is the excess an acquirer pays over the target’s standalone market or fair value—often reflected as goodwill on the acquirer’s balance sheet. [web:1][web:4][web:7][web:12] Strategic buyers usually justify and pay higher premiums due to synergies and strategic fit, while financial buyers are more constrained by return thresholds and typical market valuations. [web:2][web:3][web:5][web:9][web:11]\n\n## What is an acquisition premium?\n\n- An acquisition (or takeover) premium is the difference between the price paid for a target company and its pre‑deal market or fair value. [web:1][web:4][web:7][web:12] \n- It is typically measured as a percentage over the target’s unaffected share price before the deal is announced and is recorded as **goodwill** (an intangible asset) on the buyer’s balance sheet. [web:1][web:4][web:7][web:10]\n\n## Why do buyers pay a premium?\n\n- Premiums compensate target shareholders for giving up control and future upside; many control transactions show premiums in the ~20–30% range, though this varies by deal. [web:10][web:13] \n- Buyers pay premiums when they expect value from synergies (cost savings, revenue growth, tax or financing benefits) that makes the combined business worth more than the sum of the parts. [web:3][web:7][web:9]\n\n## Strategic buyers’ approach\n\nStrategic buyers are operating companies acquiring to enhance their existing business.\n\n- They value the target based on strategic synergies: cost savings, cross‑selling, technology or capability gaps, and stronger market position, often leading them to pay a **strategic** or synergy premium. [web:2][web:5][web:6][web:9] \n- Because they can often realize synergies quickly (economies of scale, overlapping SG&A, better purchasing power), they are frequently willing to pay higher premiums than financial buyers for the same asset. [web:2][web:5][web:8][web:11]\n\n## Financial buyers’ approach\n\nFinancial buyers (e.g., private equity, investment funds) focus on returns from buying, improving, and later exiting the investment.\n\n- They typically value the target on standalone cash flows and metrics such as EBITDA, applying market multiples and disciplined return (IRR/MOIC) hurdles, which limits how much premium they can pay. [web:2][web:5][web:8] \n- Because they usually cannot realize large operating synergies themselves, they are less inclined to pay high premiums unless there is an exceptional growth or operational improvement story that still meets their return targets. [web:2][web:3][web:5][web:9]\n\n## Typical pattern: who pays more?\n\n- Empirical and practitioner evidence indicates that strategically motivated acquisitions tend to feature higher premiums than financially motivated or purely conglomerate deals, as strategic synergies usually support larger incremental value. [web:3][web:6][web:11] \n- In competitive auctions, strategic buyers often outbid financial buyers when the asset has strong strategic fit, because the additional synergy value allows them to justify a higher acquisition premium while still creating shareholder value. [web:2][web:5][web:9][web:11]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 7230,
"output_tokens": 762,
"total_tokens": 7992,
"cost": {
"currency": "USD",
"input_cost": 0.01458,
"output_cost": 0.01524,
"total_cost": 0.03375,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391825
}
API Compatibility
Standard OpenAI Parameters
These parameters work exactly the same as OpenAI’s API: Agent API:model- Model name (use 3rd party models likeopenai/gpt-5.6-sol)input- Input text or message arrayinstructions- System instructionsmax_output_tokens- Maximum tokens in responsestream- Enable streaming responsestools- Array of tools includingweb_searchstore- Whether the response is visible through retrieval; see Conversation stateprevious_response_id- Continue from a completed prior response; see Conversation state
Perplexity-Specific Parameters
Agent API:effort- Effort Level name (use Perplexity effort levels likelow)tools[].filters- Search filters within web_search tooltools[].user_location- User location for localized results
See Agent API Reference for complete parameter details.
Endpoint Mapping
| Method | Perplexity Endpoint | OpenAI Equivalent | Notes |
|---|---|---|---|
client.responses.create() | POST /v1/agent | POST /v1/responses | Both paths accepted by Perplexity for compatibility |
client.responses.retrieve() | GET /v1/agent/{id} | GET /v1/responses/{id} | Both paths accepted by Perplexity for compatibility |
client.models.list() | GET /v1/models | GET /v1/models | Lists available Agent API models. No authentication required. |
When using the OpenAI SDK,
client.responses.create() sends requests to /v1/responses. Perplexity accepts this path as an alias for /v1/agent, so no SDK configuration changes are needed beyond base_url.Model Discovery
TheGET /v1/models endpoint returns all models available for the Agent API in OpenAI-compatible format. No authentication is required.
- Python
- Typescript
- cURL
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
models = client.models.list()
for model in models.data:
print(f"{model.id} (owned by {model.owned_by})")
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
const models = await client.models.list();
for (const model of models.data) {
console.log(`${model.id} (owned by ${model.owned_by})`);
}
curl https://api.perplexity.ai/v1/models \
-H "Authorization: Bearer $PERPLEXITY_API_KEY"
This endpoint is compatible with tools like Open WebUI, Cherry Studio, and LiteLLM that auto-discover available models via the OpenAI
/v1/models endpoint.Response Structure
Agent API
Perplexity’s Agent API matches OpenAI’s Responses API response format:output- Structured output array containing messages withcontent[].textmodel- The model name usedusage- Token consumption detailsid,created_at,status- Response metadata
Best Practices
1
Use the correct base URL
Always use
https://api.perplexity.ai/v1 (with /v1) for the Agent API.client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1" # Correct
)
2
Handle errors gracefully
Use the OpenAI SDK’s error handling:
import os
from openai import OpenAI, APIError, RateLimitError
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
try:
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Hello"
)
except RateLimitError:
print("Rate limit exceeded, please retry later")
except APIError as e:
print(f"API error: {e.message}")
3
Use streaming for better UX
Stream responses for real-time user experience:
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Long query...",
stream=True
)
for event in response:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
Recommended: Perplexity SDK
We recommend using Perplexity’s native SDKs for the best developer experience:- Cleaner effort level syntax - Use
effort="low"directly instead ofextra_body={"effort": "low"} - Type safety - Full Typescript/Python type definitions for all parameters
- Enhanced features - Direct access to all Perplexity-specific features
- Better error messages - Perplexity-specific error handling
- Simpler setup - No need to configure base URLs
Migrating to the Perplexity SDK
Switch to the Perplexity SDK for enhanced features and cleaner syntax. With the Perplexity SDK, you can use effort levels directly withoutextra_body and get full type safety:
1
Install the Perplexity SDK
- Python
- Typescript
pip install perplexityai
npm install @perplexity-ai/perplexity_ai
2
Update the import and client
- Python
- Typescript
# Before (OpenAI SDK)
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("PERPLEXITY_API_KEY"),
base_url="https://api.perplexity.ai/v1"
)
# After (Perplexity SDK)
from perplexity import Perplexity
client = Perplexity() # reads PERPLEXITY_API_KEY env var automatically
// Before (OpenAI SDK)
import OpenAI from 'openai';
const openaiClient = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai/v1"
});
// After (Perplexity SDK)
import Perplexity from '@perplexity-ai/perplexity_ai';
const perplexityClient = new Perplexity(); // reads PERPLEXITY_API_KEY env var automatically
No base URL needed - The Perplexity SDK automatically uses the correct endpoint.
3
Update the API calls
The API calls are very similar:
- Python
- Typescript
# Agent API - same interface
response = client.responses.create(
model="openai/gpt-5.6-sol",
input="Hello!"
)
// Agent API - same interface
const response = await client.responses.create({
model: "openai/gpt-5.6-luna",
input: "Hello!"
});
4
Use effort levels with cleaner syntax
The Perplexity SDK supports effort levels with cleaner syntax compared to OpenAI SDK:
- Python
- Typescript
# Before (OpenAI SDK) - extra_body required
response = client.responses.create(
input="What is the difference between an IPO and a direct listing, and why did Coinbase choose a direct listing for its 2021 public debut?",
extra_body={"effort": "low"}
)
# After (Perplexity SDK) - direct parameter
response = client.responses.create(
effort="low",
input="What is the difference between an IPO and a direct listing, and why did Coinbase choose a direct listing for its 2021 public debut?"
)
// Before (OpenAI SDK) - type casting required
const response = await client.responses.create({
input: "What is the difference between an IPO and a direct listing, and why did Coinbase choose a direct listing for its 2021 public debut?",
effort: "low"
} as any);
// After (Perplexity SDK) - fully typed
const response = await client.responses.create({
effort: "low",
input: "What is the difference between an IPO and a direct listing, and why did Coinbase choose a direct listing for its 2021 public debut?"
});
Response
Response
{
"id": "resp_532010e6-2d26-4159-b54b-932e9f553b43",
"created_at": 1779391925,
"model": "openai/gpt-5.6-sol",
"object": "response",
"output": [
{
"results": [
{
"id": 1,
"snippet": "A direct listing allows a company to enter the public market by listing existing shares without issuing new ones.\nUnlike an IPO, there are no underwriters to set the initial share price or facilitate...",
"title": "IPO vs Direct Listing | DFIN",
"url": "https://www.dfinsolutions.com/knowledge-hub/thought-leadership/knowledge-resources/ipo-vs-direct-listing",
"date": "2025-02-20",
"last_updated": "2026-05-11",
"source": "web"
},
{
"id": 2,
"snippet": "- The company went public through a direct listing, which means it sold its shares to the public without the usual middlemen, such as investment banks and other underwriters, that typically help with...",
"title": "Highlights from Coinbase's IPO - Stash",
"url": "https://www.stash.com/learn/highlights-from-coinbases-ipo/",
"date": "2021-04-16",
"last_updated": "2026-04-08",
"source": "web"
},
{
"id": 3,
"snippet": "A private company raises capital by selling newly-issued shares to investment banks (underwriters), which the banks \nthen sell primarily to institutional investors.\n...\nDirect Listing\n...\nA private...",
"title": "[PDF] What are the differences in an IPO, a SPAC, and a direct listing?",
"url": "https://www.sec.gov/files/registered-offerings-building-blocks.pdf",
"date": null,
"last_updated": "2024-09-22",
"source": "web"
},
{
"id": 4,
"snippet": "Coinbase followed the footsteps of Spotify and Palantir by choosing to go public via a direct listing where existing investors make their shares available for sale to the public, as opposed to a...",
"title": "Coinbase's IPO - MergerSight",
"url": "https://www.mergersight.com/post/coinbase-s-ipo",
"date": "2021-05-06",
"last_updated": "2026-05-15",
"source": "web"
},
{
"id": 5,
"snippet": "**Direct Listing** is the process by which a company goes public by getting listed on an exchange and offering existing shares directly to the open market.\n...\nThe traditional initial public offering...",
"title": "Direct Listing vs. IPO | Difference + Examples - Wall Street Prep",
"url": "https://www.wallstreetprep.com/knowledge/direct-listing/",
"date": "2023-10-27",
"last_updated": "2026-05-20",
"source": "web"
},
{
"id": 6,
"snippet": "An Initial Public Offering (IPO) refers to the process by which a private company offers newly issued shares to the public for the first time.\nIn an IPO, the company typically works with one or more...",
"title": "Direct Listing vs IPO vs SPAC Paths to the Public Markets...",
"url": "https://www.startengine.com/blog/direct-listing-vs-ipo-vs-spac",
"date": "2026-01-28",
"last_updated": "2026-05-20",
"source": "web"
},
{
"id": 7,
"snippet": "This means they simply listed what shares they have instead of issuing new shares via a typical IPO route.\n...\n{ts:157} you may have heard of an initial public offering before or an IPO this is where...",
"title": "The Coinbase Direct Listing Explained - YouTube",
"url": "https://www.youtube.com/watch?v=IGV-eSpcuck",
"date": "2021-04-18",
"last_updated": "2025-10-11",
"source": "web"
},
{
"id": 8,
"snippet": "Coinbase, one of the largest cryptocurrency exchanges in the US, has announced plans to go public but it will eschew the traditional initial public offering process, opting instead for a direct...",
"title": "Blending Crypto and Stocks: What Does Coinbase Direct Listing Mean for Crypto Landscape? - Coinspeaker",
"url": "https://www.coinspeaker.com/coinbase-listing-crypto-landscape/",
"date": "2021-03-29",
"last_updated": "2025-06-09",
"source": "web"
},
{
"id": 9,
"snippet": "Also called a direct public offering or direct placement, a direct listing allows people who already hold shares to sell them directly.\nIn this model, companies don’t have to deal with (and pay)...",
"title": "IPO vs Direct Listing: Understanding the Key Differences",
"url": "https://onlinemba.ku.edu/experience-ku/mba-blog/ipo-vs-direct-listing",
"date": "2024-12-11",
"last_updated": "2026-03-16",
"source": "web"
},
{
"id": 10,
"snippet": "The event was notable for several reasons: Coinbase, with 56 million registered users, became the first crypto company to list on a US stock exchange; it was also Nasdaq’s first major direct listing...",
"title": "Coinbase Direct Listing Steadies Crypto Industry",
"url": "https://gfmag.com/features/coinbase-direct-listing-steadies-crypto-industry/",
"date": "2021-05-05",
"last_updated": "2025-10-29",
"source": "web"
},
{
"id": 11,
"snippet": "A direct listing differs from an IPO in that a company lists its existing stock without hiring underwriters to \nsell new shares and raise fresh money.\n...\nDirect listings can also save companies on...",
"title": "Coinbase's Public Listing Plans Shine Spotlight On Crypto",
"url": "https://www.crowell.com/a/web/bUWLyhYZmLFmezj8hyV5QX/4Ttk1y/20210129-coinbases-public-listing-plans-shine-spotlight-on-crypto.pdf",
"date": null,
"last_updated": "2025-03-26",
"source": "web"
}
],
"type": "search_results",
"queries": [
"IPO vs direct listing differences",
"Coinbase direct listing 2021 reasons",
"Coinbase why chose direct listing over IPO 2021"
]
},
{
"id": "msg_0d1729b8-2a0e-47a4-97c1-b113b65f80db",
"content": [
{
"text": "An IPO issues new shares through underwriters to raise capital at a predetermined offering price, while a direct listing simply lists existing shares for trading without raising new money or using traditional underwriters, letting the market set the price. [web:1][web:3][web:5] Coinbase chose a direct listing in 2021 because it did not need to raise capital, wanted market-driven price discovery aligned with crypto’s open-market ethos, and could save on IPO fees while giving existing shareholders immediate liquidity. [web:4][web:5][web:10][web:11] \n\n## IPO vs direct listing \n\n- In an **IPO**, a company typically sells newly issued shares to the public through investment banks that act as underwriters, which help set the offer price, market the deal, and allocate shares, and the company receives new capital from the proceeds. [web:3][web:6] \n- In a **direct listing**, the company usually does not issue new shares; instead, existing shareholders (founders, employees, early investors) sell their shares directly on the exchange, and the company generally does not raise new funds in the process. [web:1][web:3][web:5][web:6] \n\n- IPOs use underwriters who build a book of demand and set an offering price before trading begins, creating a more controlled pricing process. [web:1][web:5][web:6][web:9] \n- Direct listings do not have traditional underwriting; the opening trading price is set by supply and demand on the exchange (often via a reference price) and can be more volatile and unpredictable. [web:1][web:2][web:5][web:6] \n\n- IPOs are typically more expensive because underwriters charge a percentage of the offering and there are costs for roadshows and marketing. [web:1][web:5][web:9][web:11] \n- Direct listings tend to be cheaper because there are no underwriting fees and banks act only as financial advisers with a more limited role. [web:1][web:5][web:9][web:11] \n\n- In many IPOs, insiders face a lockup period (often around 180 days) before they can sell shares, limiting immediate liquidity. [web:1][web:6][web:9] \n- In a direct listing, there is typically no lockup, so existing shareholders can sell on day one, providing immediate liquidity. [web:1][web:5][web:6][web:9] \n\n## Why Coinbase chose direct listing \n\n- Coinbase was already well funded and did not need to raise additional capital, which made a direct listing attractive since that mechanism focuses on listing and liquidity rather than fundraising. [web:4][web:5][web:11] \n- A direct listing avoided dilution from issuing new shares, which helped preserve ownership percentages for existing investors and employees. [web:5][web:6][web:11] \n\n- CEO Brian Armstrong stated that he wanted “a true market on day one” with a price set in the open market rather than “behind closed doors,” so a direct listing’s market-driven pricing fit this goal. [web:10] \n- This approach was described as more in line with the **democratic** and open ethos of crypto markets, reinforcing Coinbase’s brand positioning in the digital-asset space. [web:10] \n\n- By choosing a direct listing, Coinbase could save substantial underwriting fees compared with a traditional IPO while still achieving a major listing on Nasdaq. [web:5][web:11] \n- The structure also gave early investors and employees immediate liquidity on listing day, which is a common reason high-profile tech and fintech firms such as Spotify and Palantir have used direct listings. [web:4][web:5]",
"type": "output_text",
"annotations": [],
"logprobs": []
}
],
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"error": null,
"usage": {
"input_tokens": 6821,
"output_tokens": 852,
"total_tokens": 7673,
"cost": {
"currency": "USD",
"input_cost": 0.01295,
"output_cost": 0.01704,
"total_cost": 0.03392,
"cache_creation_cost": null,
"cache_read_cost": 0.00143,
"tool_calls_cost": 0.0025
},
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 3584,
"cached_tokens": 3584
},
"tool_calls_details": {
"search_web": {
"invocation": 1
}
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"completed_at": 1779391925
}
Next Steps
Agent API Quickstart
Get started with Agent API using OpenAI SDKs.
Agent API Models
Explore direct model selection and third-party models.
Conversation State
Continue a conversation with
previous_response_id or replay turns yourself.API Reference
View complete endpoint documentation.
Output Control
Configure streaming responses and structured outputs with JSON schema.
Model Fallback
Specify multiple models for automatic failover and higher availability.
Filters
Apply filters to web search results.