{
  "components": {
    "callbacks": {},
    "examples": {},
    "headers": {},
    "links": {},
    "parameters": {},
    "pathItems": {},
    "requestBodies": {},
    "responses": {},
    "schemas": {
      "ManualD5E2470Dd28B_ChatCompletionRequest": {
        "properties": {
          "frequency_penalty": {
            "default": 1,
            "description": "根据新词元目前在文本中的出现频率对其施加惩罚。正值会降低逐字重复同一行的可能性。",
            "maximum": 2,
            "minimum": 0,
            "type": "number"
          },
          "max_tokens": {
            "description": "响应中要生成的最大词元数。",
            "type": "integer"
          },
          "messages": {
            "description": "由截至目前的对话内容组成的消息列表。",
            "items": {
              "properties": {
                "content": {
                  "description": "消息内容。",
                  "type": "string"
                },
                "role": {
                  "description": "消息作者的角色。",
                  "enum": [
                    "system",
                    "user",
                    "assistant"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "role",
                "content"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "model": {
            "description": "要使用的 Sonar 模型。",
            "enum": [
              "sonar",
              "sonar-pro",
              "sonar-reasoning-pro",
              "sonar-deep-research"
            ],
            "type": "string"
          },
          "presence_penalty": {
            "default": 0,
            "description": "根据新词元此前是否已出现在文本中对其施加惩罚。正值会提高谈论新主题的可能性。",
            "maximum": 2,
            "minimum": -2,
            "type": "number"
          },
          "return_citations": {
            "default": true,
            "description": "是否在响应中返回引用和搜索结果。",
            "type": "boolean"
          },
          "search_context": {
            "default": "low",
            "description": "控制使用的搜索上下文量。会影响单次请求的成本。",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "search_domain_filter": {
            "description": "将搜索限制在特定域名。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "search_recency_filter": {
            "description": "按时效性筛选搜索结果。",
            "enum": [
              "month",
              "week",
              "day",
              "hour"
            ],
            "type": "string"
          },
          "stream": {
            "default": false,
            "description": "是否使用服务器发送事件以流式方式返回响应。",
            "type": "boolean"
          },
          "temperature": {
            "default": 0.2,
            "description": "介于 0 和 2 之间的采样温度。较低的值会使输出更集中且更具确定性。",
            "maximum": 2,
            "minimum": 0,
            "type": "number"
          },
          "top_k": {
            "default": 0,
            "description": "用于 top-k 筛选的保留词元数。",
            "maximum": 2048,
            "minimum": 0,
            "type": "integer"
          },
          "top_p": {
            "default": 0.9,
            "description": "核采样参数。模型会考虑累计概率质量达到 top_p 的词元。",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "type": "object"
      },
      "ResponseD5E2470Dd28B_ChatCompletionResponse": {
        "properties": {
          "choices": {
            "items": {
              "properties": {
                "finish_reason": {
                  "enum": [
                    "stop",
                    "length"
                  ],
                  "type": "string"
                },
                "index": {
                  "type": "integer"
                },
                "message": {
                  "properties": {
                    "content": {
                      "description": "AI 生成的答案，包含类似 [1][2] 的内联引用。",
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "citations": {
            "description": "答案中引用的来源 URL 列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created": {
            "description": "补全创建时间的 Unix 时间戳。",
            "type": "integer"
          },
          "id": {
            "description": "补全结果的唯一标识符。",
            "type": "string"
          },
          "model": {
            "description": "用于生成补全内容的模型。",
            "type": "string"
          },
          "object": {
            "example": "chat.completion",
            "type": "string"
          },
          "search_results": {
            "description": "包含标题、摘要和 URL 的详细搜索结果。",
            "items": {
              "properties": {
                "date": {
                  "type": "string"
                },
                "snippet": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "usage": {
            "properties": {
              "completion_tokens": {
                "type": "integer"
              },
              "prompt_tokens": {
                "type": "integer"
              },
              "search_context_size": {
                "type": "string"
              },
              "total_tokens": {
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "Perplexity",
    "version": "1",
    "x-aisa-capabilities": {
      "idempotency": "Idempotency-Key",
      "max_price": "X-AISA-Max-Price-USD",
      "quote": {
        "header": "X-AISA-Cost-Mode",
        "value": "quote"
      }
    },
    "x-aisa-catalogs": {
      "perplexity": {
        "description": "",
        "title": "Perplexity",
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        },
        "x-aisa-document": {
          "facts_hash": "fb88776539957bfc86000a34a6c0da10e10cbeecf9d65c8ae1d78688c170faac",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        }
      }
    },
    "x-aisa-configured-paths": [
      "/apis/v1/perplexity/sonar",
      "/apis/v1/perplexity/sonar-deep-research",
      "/apis/v1/perplexity/sonar-pro",
      "/apis/v1/perplexity/sonar-reasoning-pro"
    ],
    "x-aisa-document": {
      "composer_version": "31",
      "document_hash": "sha256:69711bcc6173479fb76ccc00020e928332bd1163f25aad40bcecde2d40b25bae",
      "facts_hash": "fb88776539957bfc86000a34a6c0da10e10cbeecf9d65c8ae1d78688c170faac",
      "generator_version": "3",
      "protocol_version": "1",
      "response_pending": [],
      "schema_version": "1"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "perplexity"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/apis/v1/perplexity/sonar": {
      "post": {
        "description": "Ask a question and get a written answer with web citations, rather than a list of links to read yourself. Body is OpenAI chat-completions shaped: `model` (required, `sonar`) and `messages`. Returns `choices[0].message.content` as prose, plus `citations` (an array of URL strings) and `search_results[]` with `title`, `url`, `snippet`, `date` and `source`, and a `usage` block. Measured at about 3 seconds.  This is the cheapest and fastest of the four Perplexity endpoints — use it for a single factual question. Step up to `post_perplexity_sonar_pro` for multi-part questions, or `post_perplexity_sonar_reasoning_pro` when the answer requires working through steps. If you need results you can iterate over rather than prose, use `post_tavily_search`;",
        "operationId": "post_perplexity_sonar",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "messages": [
                  {
                    "content": "What are the latest developments in quantum computing?",
                    "role": "user"
                  }
                ],
                "model": "sonar"
              },
              "schema": {
                "properties": {
                  "frequency_penalty": {
                    "default": 1,
                    "description": "根据新词元目前在文本中的出现频率对其施加惩罚。正值会降低逐字重复同一行的可能性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "max_tokens": {
                    "description": "响应中要生成的最大词元数。",
                    "type": "integer"
                  },
                  "messages": {
                    "description": "由截至目前的对话内容组成的消息列表。",
                    "items": {
                      "properties": {
                        "content": {
                          "description": "消息内容。",
                          "type": "string"
                        },
                        "role": {
                          "description": "消息作者的角色。",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "要使用的 Sonar 模型。",
                    "enum": [
                      "sonar",
                      "sonar-pro",
                      "sonar-reasoning-pro",
                      "sonar-deep-research"
                    ],
                    "type": "string"
                  },
                  "presence_penalty": {
                    "default": 0,
                    "description": "根据新词元此前是否已出现在文本中对其施加惩罚。正值会提高谈论新主题的可能性。",
                    "maximum": 2,
                    "minimum": -2,
                    "type": "number"
                  },
                  "return_citations": {
                    "default": true,
                    "description": "是否在响应中返回引用和搜索结果。",
                    "type": "boolean"
                  },
                  "search_context": {
                    "default": "low",
                    "description": "控制使用的搜索上下文量。会影响单次请求的成本。",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "type": "string"
                  },
                  "search_domain_filter": {
                    "description": "将搜索限制在特定域名。",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "search_recency_filter": {
                    "description": "按时效性筛选搜索结果。",
                    "enum": [
                      "month",
                      "week",
                      "day",
                      "hour"
                    ],
                    "type": "string"
                  },
                  "stream": {
                    "default": false,
                    "description": "是否使用服务器发送事件以流式方式返回响应。",
                    "type": "boolean"
                  },
                  "temperature": {
                    "default": 0.2,
                    "description": "介于 0 和 2 之间的采样温度。较低的值会使输出更集中且更具确定性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "top_k": {
                    "default": 0,
                    "description": "用于 top-k 筛选的保留词元数。",
                    "maximum": 2048,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "top_p": {
                    "default": 0.9,
                    "description": "核采样参数。模型会考虑累计概率质量达到 top_p 的词元。",
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse"
                }
              }
            },
            "description": "包含 AI 答案和引用的成功响应"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Sonar",
        "tags": [
          "sonar"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "perplexity",
        "x-aisa-category": "8",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/perplexity/post_perplexity-sonar",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_usd",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.12783,
          "estimate_source": "profile_seed",
          "evidence_source": "response_body"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:3de546acfbc35fe10299dd39118fdae6cea053a9322e554b9cff1bccde49ef95",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "05abe7ecc3d9",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "60c8ec16df32"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "post_perplexity_sonar",
          "path": "/apis/v1/perplexity/sonar"
        },
        "x-aisa-source": {
          "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/chat/completions",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/perplexity/sonar \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonar\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What are the latest developments in quantum computing?\"\n    }\n  ]\n}'"
          }
        ]
      }
    },
    "/apis/v1/perplexity/sonar-deep-research": {
      "post": {
        "description": "Commission a report: this endpoint runs many searches and writes a long, cited document. `model` (required, `sonar-deep-research`) and `messages` in; `choices[0].message.content`, `citations`, `search_results[]` and `usage` out, where `usage` also reports `num_search_queries` and `reasoning_tokens`.  Many clients time out well before it answers, so call it only when a report is genuinely the deliverable, and never in a loop. For anything you would read in one sitting, the other three Perplexity endpoints answer in seconds.",
        "operationId": "post_perplexity_sonar_deep_research",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "messages": [
                  {
                    "content": "Write a comprehensive analysis of the global semiconductor supply chain risks in 2026",
                    "role": "user"
                  }
                ],
                "model": "sonar-deep-research"
              },
              "schema": {
                "properties": {
                  "frequency_penalty": {
                    "default": 1,
                    "description": "根据新词元目前在文本中的出现频率对其施加惩罚。正值会降低逐字重复同一行的可能性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "max_tokens": {
                    "description": "响应中要生成的最大词元数。",
                    "type": "integer"
                  },
                  "messages": {
                    "description": "由截至目前的对话内容组成的消息列表。",
                    "items": {
                      "properties": {
                        "content": {
                          "description": "消息内容。",
                          "type": "string"
                        },
                        "role": {
                          "description": "消息作者的角色。",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "要使用的 Sonar 模型。",
                    "enum": [
                      "sonar",
                      "sonar-pro",
                      "sonar-reasoning-pro",
                      "sonar-deep-research"
                    ],
                    "type": "string"
                  },
                  "presence_penalty": {
                    "default": 0,
                    "description": "根据新词元此前是否已出现在文本中对其施加惩罚。正值会提高谈论新主题的可能性。",
                    "maximum": 2,
                    "minimum": -2,
                    "type": "number"
                  },
                  "return_citations": {
                    "default": true,
                    "description": "是否在响应中返回引用和搜索结果。",
                    "type": "boolean"
                  },
                  "search_context": {
                    "default": "low",
                    "description": "控制使用的搜索上下文量。会影响单次请求的成本。",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "type": "string"
                  },
                  "search_domain_filter": {
                    "description": "将搜索限制在特定域名。",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "search_recency_filter": {
                    "description": "按时效性筛选搜索结果。",
                    "enum": [
                      "month",
                      "week",
                      "day",
                      "hour"
                    ],
                    "type": "string"
                  },
                  "stream": {
                    "default": false,
                    "description": "是否使用服务器发送事件以流式方式返回响应。",
                    "type": "boolean"
                  },
                  "temperature": {
                    "default": 0.2,
                    "description": "介于 0 和 2 之间的采样温度。较低的值会使输出更集中且更具确定性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "top_k": {
                    "default": 0,
                    "description": "用于 top-k 筛选的保留词元数。",
                    "maximum": 2048,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "top_p": {
                    "default": 0.9,
                    "description": "核采样参数。模型会考虑累计概率质量达到 top_p 的词元。",
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse"
                }
              }
            },
            "description": "包含 AI 答案和引用的成功响应"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Sonar 深度研究",
        "tags": [
          "sonar"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "perplexity",
        "x-aisa-category": "8",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/perplexity/post_perplexity-sonar-deep-research",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_usd",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.23932,
          "estimate_source": "profile_seed",
          "evidence_source": "response_body"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:3de546acfbc35fe10299dd39118fdae6cea053a9322e554b9cff1bccde49ef95",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "05abe7ecc3d9",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "25135d81ede5"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "post_perplexity_sonar_deep_research",
          "path": "/apis/v1/perplexity/sonar-deep-research"
        },
        "x-aisa-source": {
          "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/chat/completions",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/perplexity/sonar-deep-research \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonar-deep-research\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a comprehensive analysis of the global semiconductor supply chain risks in 2026\"\n    }\n  ]\n}'"
          }
        ]
      }
    },
    "/apis/v1/perplexity/sonar-pro": {
      "post": {
        "description": "Ask a question that needs more than one search pass and get a written answer with citations. Same request and response shape as `post_perplexity_sonar` — `model` (required, `sonar-pro`) and `messages` in, `choices[0].message.content`, `citations`, `search_results[]` and `usage` out.  Use it for questions with several parts or follow-ups. For a single lookup `sonar` answers in a third of the time at the same price; when the difficulty is reasoning rather than retrieval, `post_perplexity_sonar_reasoning_pro` shows its working.",
        "operationId": "post_perplexity_sonar_pro",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "messages": [
                  {
                    "content": "Compare the economic policies of the US and EU regarding AI regulation in 2025-2026",
                    "role": "user"
                  }
                ],
                "model": "sonar-pro"
              },
              "schema": {
                "properties": {
                  "frequency_penalty": {
                    "default": 1,
                    "description": "根据新词元目前在文本中的出现频率对其施加惩罚。正值会降低逐字重复同一行的可能性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "max_tokens": {
                    "description": "响应中要生成的最大词元数。",
                    "type": "integer"
                  },
                  "messages": {
                    "description": "由截至目前的对话内容组成的消息列表。",
                    "items": {
                      "properties": {
                        "content": {
                          "description": "消息内容。",
                          "type": "string"
                        },
                        "role": {
                          "description": "消息作者的角色。",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "要使用的 Sonar 模型。",
                    "enum": [
                      "sonar",
                      "sonar-pro",
                      "sonar-reasoning-pro",
                      "sonar-deep-research"
                    ],
                    "type": "string"
                  },
                  "presence_penalty": {
                    "default": 0,
                    "description": "根据新词元此前是否已出现在文本中对其施加惩罚。正值会提高谈论新主题的可能性。",
                    "maximum": 2,
                    "minimum": -2,
                    "type": "number"
                  },
                  "return_citations": {
                    "default": true,
                    "description": "是否在响应中返回引用和搜索结果。",
                    "type": "boolean"
                  },
                  "search_context": {
                    "default": "low",
                    "description": "控制使用的搜索上下文量。会影响单次请求的成本。",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "type": "string"
                  },
                  "search_domain_filter": {
                    "description": "将搜索限制在特定域名。",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "search_recency_filter": {
                    "description": "按时效性筛选搜索结果。",
                    "enum": [
                      "month",
                      "week",
                      "day",
                      "hour"
                    ],
                    "type": "string"
                  },
                  "stream": {
                    "default": false,
                    "description": "是否使用服务器发送事件以流式方式返回响应。",
                    "type": "boolean"
                  },
                  "temperature": {
                    "default": 0.2,
                    "description": "介于 0 和 2 之间的采样温度。较低的值会使输出更集中且更具确定性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "top_k": {
                    "default": 0,
                    "description": "用于 top-k 筛选的保留词元数。",
                    "maximum": 2048,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "top_p": {
                    "default": 0.9,
                    "description": "核采样参数。模型会考虑累计概率质量达到 top_p 的词元。",
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse"
                }
              }
            },
            "description": "包含 AI 答案和引用的成功响应"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Sonar Pro",
        "tags": [
          "sonar"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "perplexity",
        "x-aisa-category": "8",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/perplexity/post_perplexity-sonar-pro",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_usd",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.11273,
          "estimate_source": "profile_seed",
          "evidence_source": "response_body"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:3de546acfbc35fe10299dd39118fdae6cea053a9322e554b9cff1bccde49ef95",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "05abe7ecc3d9",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "2dcbdb41b9f2"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "post_perplexity_sonar_pro",
          "path": "/apis/v1/perplexity/sonar-pro"
        },
        "x-aisa-source": {
          "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/chat/completions",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/perplexity/sonar-pro \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonar-pro\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Compare the economic policies of the US and EU regarding AI regulation in 2025-2026\"\n    }\n  ]\n}'"
          }
        ]
      }
    },
    "/apis/v1/perplexity/sonar-reasoning-pro": {
      "post": {
        "description": "Ask a question that has to be worked through, not just looked up, and get a step-by-step answer backed by web search. Same shape as the other Perplexity endpoints — `model` (required, `sonar-reasoning-pro`) and `messages` in; `choices[0].message.content`, `citations`, `search_results[]` and `usage` out.  Use it for comparison, causation and analysis. When the question is simply what is the case, `post_perplexity_sonar` is faster; when you need a long report over many sources rather than an answer, `post_perplexity_sonar_deep_research`.",
        "operationId": "post_perplexity_sonar_reasoning_pro",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "messages": [
                  {
                    "content": "Analyze whether Tesla stock is overvalued based on current P/E ratio compared to industry averages",
                    "role": "user"
                  }
                ],
                "model": "sonar-reasoning-pro"
              },
              "schema": {
                "properties": {
                  "frequency_penalty": {
                    "default": 1,
                    "description": "根据新词元目前在文本中的出现频率对其施加惩罚。正值会降低逐字重复同一行的可能性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "max_tokens": {
                    "description": "响应中要生成的最大词元数。",
                    "type": "integer"
                  },
                  "messages": {
                    "description": "由截至目前的对话内容组成的消息列表。",
                    "items": {
                      "properties": {
                        "content": {
                          "description": "消息内容。",
                          "type": "string"
                        },
                        "role": {
                          "description": "消息作者的角色。",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "要使用的 Sonar 模型。",
                    "enum": [
                      "sonar",
                      "sonar-pro",
                      "sonar-reasoning-pro",
                      "sonar-deep-research"
                    ],
                    "type": "string"
                  },
                  "presence_penalty": {
                    "default": 0,
                    "description": "根据新词元此前是否已出现在文本中对其施加惩罚。正值会提高谈论新主题的可能性。",
                    "maximum": 2,
                    "minimum": -2,
                    "type": "number"
                  },
                  "return_citations": {
                    "default": true,
                    "description": "是否在响应中返回引用和搜索结果。",
                    "type": "boolean"
                  },
                  "search_context": {
                    "default": "low",
                    "description": "控制使用的搜索上下文量。会影响单次请求的成本。",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "type": "string"
                  },
                  "search_domain_filter": {
                    "description": "将搜索限制在特定域名。",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "search_recency_filter": {
                    "description": "按时效性筛选搜索结果。",
                    "enum": [
                      "month",
                      "week",
                      "day",
                      "hour"
                    ],
                    "type": "string"
                  },
                  "stream": {
                    "default": false,
                    "description": "是否使用服务器发送事件以流式方式返回响应。",
                    "type": "boolean"
                  },
                  "temperature": {
                    "default": 0.2,
                    "description": "介于 0 和 2 之间的采样温度。较低的值会使输出更集中且更具确定性。",
                    "maximum": 2,
                    "minimum": 0,
                    "type": "number"
                  },
                  "top_k": {
                    "default": 0,
                    "description": "用于 top-k 筛选的保留词元数。",
                    "maximum": 2048,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "top_p": {
                    "default": 0.9,
                    "description": "核采样参数。模型会考虑累计概率质量达到 top_p 的词元。",
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse"
                }
              }
            },
            "description": "包含 AI 答案和引用的成功响应"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "Sonar 推理专业版",
        "tags": [
          "sonar"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "perplexity",
        "x-aisa-category": "8",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/perplexity/post_perplexity-sonar-reasoning-pro",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_usd",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.03499,
          "estimate_source": "profile_seed",
          "evidence_source": "response_body"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": true
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:3de546acfbc35fe10299dd39118fdae6cea053a9322e554b9cff1bccde49ef95",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "05abe7ecc3d9",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "e2b0f51a2594"
        },
        "x-aisa-runtime-operation": {
          "method": "ANY",
          "operation_id": "post_perplexity_sonar_reasoning_pro",
          "path": "/apis/v1/perplexity/sonar-reasoning-pro"
        },
        "x-aisa-source": {
          "content_hash": "sha256:07e2e814c08705cd8136a84bcad0aad8720ea610ded80370df5336619f5f8120",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:d4e0227f576eaefb2bbf8ac815de2ecf87575cd62b6bd2de9ea5a93af1384144",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/perplexity-openapi.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/chat/completions",
        "x-aisa-validation": "provider",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/perplexity/sonar-reasoning-pro \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonar-reasoning-pro\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Analyze whether Tesla stock is overvalued based on current P/E ratio compared to industry averages\"\n    }\n  ]\n}'"
          }
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ]
}
