> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 解释搜索结果

> 解释搜索结果

根据此前的 Scholar Search、Web Search 或 Smart Search 请求生成说明。将返回的搜索 `id` 作为 `search_id` 传递。

**最适合：** 总结搜索结果、生成本地化说明，以及将搜索输出转化为易读的答案。

## 示例

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/scholar/search/explain" \
  -H "Authorization: Bearer ${AISA_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "search_id": "search_id",
    "response_mode": "NON_STREAMING",
    "language": "en",
    "detail_level": "BRIEF"
  }'
```

## 响应

`NON_STREAMING` 返回包含 `message` 字段的 JSON 对象。`COMPLETE` 和 `INCREMENTAL` 为能够处理流式响应的客户端传输服务器发送事件。


## OpenAPI

````yaml openapi/zh/platform-txyz-openapi.json POST /scholar/search/explain
openapi: 3.0.0
info:
  title: TXYZ Platform API
  version: 1.0.0
  description: platform.txyz.ai 服务的 API 文档，包括学术搜索功能
  contact:
    email: support@txyz.ai
  license:
    name: Proprietary
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /scholar/search/explain:
    post:
      tags:
        - Search
        - Explanation
      summary: 解释搜索结果
      description: >-
        以不同语言和格式生成搜索结果说明。COMPLETE 和 INCREMENTAL
        响应模式通过服务器发送事件进行流式传输；NON_STREAMING 返回 JSON 响应。
      operationId: explainSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExplainSearchRequest'
      responses:
        '200':
          description: >-
            成功的解释响应。COMPLETE/INCREMENTAL 流返回 text/event-stream；NON_STREAMING 返回
            application/json。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExplainSearchResponse'
            text/event-stream:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  schemas:
    ExplainSearchRequest:
      type: object
      required:
        - search_id
      properties:
        search_id:
          type: string
          description: 要解释的搜索 ID
        response_mode:
          type: string
          enum:
            - COMPLETE
            - INCREMENTAL
            - NON_STREAMING
          default: NON_STREAMING
          description: >-
            解释响应的格式。COMPLETE 和 INCREMENTAL 通过服务器发送事件进行流式传输；NON_STREAMING 返回 JSON
            响应。
        language:
          type: string
          default: en
          description: 解释所用的语言代码（例如 en、zh、ar）
          example: ar
        detail_level:
          type: string
          enum:
            - BRIEF
            - MODERATE
            - DETAILED
          default: MODERATE
          description: 解释的详细程度
    ExplainSearchResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: 生成的说明文本。
      description: 当 response_mode 为 NON_STREAMING 时返回的 JSON 解释响应。
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 描述错误原因的错误消息
        code:
          type: integer
          description: HTTP 状态码
        details:
          type: string
          description: 其他错误详情
  responses:
    BadRequest:
      description: 错误请求 - 参数无效
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: 未授权 - API 密钥无效或缺失
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: 未找到搜索 ID
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: 超出速率限制
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: 内部服务器错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````