Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Zhihu AI Search Stream

API दस्तावेज़
https://api.sandbase.ai/v1/api/zhihu/web/ai-search-stream

Returns streaming AI search results from Zhihu based on a query prompt. Supports conversational multi-turn sessions and chat modes.

मूल्य
$0.005USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
1 आवश्यक · 2 वैकल्पिक

प्लेग्राउंड

इनपुट
Search Content
Chat mode, default FAST
Session ID for multi-turn
आउटपुटउदाहरण
प्रतिक्रियाoutputs · 10.3 KB · 223 पंक्तियाँ
[
  {
    "data": {
      "events": [
        {
          "data": {
            "ai_attached_info": "ogNvEhM3NjkwOTYzNDk3MzY0NTA1NzU2GJgBIhM3NjkwOTYzNDk3MzY0NDgzMDgxKhM3NjkwOTYzNDk3MzY0NDgzMDgxSgR0ZXN0oAEAsAFi4gIIQUlBbnN3ZXKCBRMzNzU1MzUzMjcwMjA0MjM0MTk1",
            "message_id": "7690963497364483081",
            "parent_message_id": "7690963497364505756",
            "session_id": "3755353270204234195"
          },
          "event": "Init",
          "system_meta": {
            "flush_time": 1790691981431,
            "flush_time_format": "22:26:21.431",
            "trace_id": "9f7d1847-a9cc-42a7-a997-c23409897627"
          }
        },
        {
          "data": [
            {
              "access_status": "ACCESSIBLE",
              "ai_attached_info": "ogNnEhM3NjkwOTYzNDk3MzY0NTA1NzU2GAciCTI2OTEwMjk2MyoTMTk5NTQ1NDk2OTA0MjczNjAzOUoEdGVzdKABALABYuICC0Nvcm5lckNhcmRzggUTMzc1NTM1MzI3MDIwNDIzNDE5NQ==",
              "attached_info": "kgIXEhMxOTk1NDU0OTY5MDQyNzM2MDM5GAc=",
              "cite_metric": [
                {
                  "data": "https://picx.zhimg.com/v2-401055fa686fcbf84732d41750739bcc_l.jpg?source=ec1c8e88",
                  "type": "avatar"
                },
                {
                  "data": "但问智能",
                  "type": "text"
                }
              ],
              "content_abstract": "[视频] 内容很长,收藏起来,未来可能用得上哦🎭 Playwright Test Agents:AI驱动的UI自动化让AI成为你的测试工程师,自动规划、生成和修复测试用例 📖 目录1. 引言:测试自动化的新纪元2. 什么是 Playwright Test Agents?3. 三大核心Agent详解4. 快速上手指南5. 实战案例:TodoMVC应用测试6. 高级应用场景7. 最佳实践与技巧🚀 引言:测试自动化的新纪元 Playwright Test Agents 将 AI Agent 技术与 Playwright 测试框架深度融合…",
              "content_type": "article",
              "content_url_token": "1995454969042736039",
              "image": "https://pica.zhimg.com/v2-573e14dd64967693a9931e9a91494b69.jpg?source=7e7ef6e2&needBackground=1",
              "images": [
                "https://pica.zhimg.com/v2-573e14dd64967693a9931e9a91494b69.jpg?source=7e7ef6e2&needBackground=1",
                "https://pica.zhimg.com/v2-4724250e9cd60bb144fd961aa6839a61.jpg?source=7e7ef6e2&needBackground=1"
              ],
              "is_out_link": true,
              "labels": [
                {
                  "data": {
                    "author_metrics": "73 关注 · 98 赞同",
                    "avatar_url": "https://picx.zhimg.com/v2-401055fa686fcbf84732d41750739bcc_l.jpg?source=ec1c8e88",
                    "badge_info": {
                      "detail_badges": [],
                      "icon": "",
                      "merged_badges": [],
                      "night_icon": "",
                      "title": ""
                    },
                    "content_count": 0,
                    "follower_count": 73,
                    "headline": "大模型落地企业应用|性能测试|测试开发|测试架构师|自动化",
                    "id": "801029f98b5689124cefebb617de5ad6",
                    "is_anonymous": false,
                    "is_followed": false,
                    "is_following": false,
                    "name": "但问智能",
                    "url": "https://www.zhihu.com/people/801029f98b5689124cefebb617de5ad6",
                    "url_token": "20-38-53-61-24",
                    "user_type": "Normal"
                  },
                  "type": "author"
                }
              ],
              "recall_content_id": "MjY5MTAyOTYzfDp8QVJUSUNMRQ==",
              "recall_source": "ARTICLE",
              "title": "Playwright Test Agents 实践(附源码)",
              "url": "https://zhuanlan.zhihu.com/p/1995454969042736039"
            },
            {
              "access_status": "ACCESSIBLE",
              "ai_attached_info": "ogNdEhM3NjkwOTYzNDk3MzY0NTA1NzU2GAciCTIyMzY0NzQzNCoJNjA5ODE5NTU3SgR0ZXN0oAEAsAFi4gILQ29ybmVyQ2FyZHOCBRMzNzU1MzUzMjcwMjA0MjM0MTk1",
              "attached_info": "kgINEgk2MDk4MTk1NTcYBw==",
              "cite_metric": [
                {
                  "data": "https://picx.zhimg.com/v2-7699cc8180d1c0f25f6a823351c80b1c_l.jpg?source=ec1c8e88",
                  "type": "avatar"
                },
                {
                  "data": "茄斯教你学渗透",
                  "type": "text"
                }
              ],
              "content_abstract": "这个站有点特殊,感觉像是刚运营不久的样子。 0X01 测试 找到了后台 [图片] 肯定是弱口令先测试的,基本上有登陆功能都这样。 [图片] 从返回包的信息就可以看出来,这里是有sql注入的,直接sqlmap梭哈,找到了一些信息,权限很低,无法做更多事情。 current-user: developer@% select @@BASEDIR: '/usr/' select USER(): '[email protected]' select DATABASE(): 'edc' select SYSTEM_USER(): '[email protected]' select @@CHARACTER_SET…",
              "content_type": "article",
              "content_url_token": "609819557",
              "image": "https://pic1.zhimg.com/v2-c2e0cf1d9f1bbde533abbafc7c89eb37.png?source=7e7ef6e2&needBackground=1",
              "images": [
                "https://pic1.zhimg.com/v2-c2e0cf1d9f1bbde533abbafc7c89eb37.png?source=7e7ef6e2&needBackground=1",
                "https://pic1.zhimg.com/v2-5f1d47f73f8ab2237b96607b52a66057.png?source=7e7ef6e2&needBackground=1",
                "https://picx.zhimg.com/v2-687724ec8d54590e8a30f5c43652ef43.png?source=7e7ef6e2&needBackground=1",
                "… 2 more items in the full response"
              ],
              "is_out_link": true,
              "labels": [
                {
                  "data": {
                    "author_metrics": "835 关注 · 990 赞同",
                    "avatar_url": "https://picx.zhimg.com/v2-7699cc8180d1c0f25f6a823351c80b1c_l.jpg?source=ec1c8e88",
                    "badge_info": {
                      "detail_badges": [],
                      "icon": "",
                      "merged_badges": [],
                      "night_icon": "",
                      "title": ""
                    },
                    "content_count": 0,
                    "follower_count": 835,
                    "headline": "vx公众号:茄斯教你学渗透 |  专业网络安全培训",
                    "id": "163980fc6aef0e85ac6e7c945663fa19",
                    "is_anonymous": false,
                    "is_followed": false,
                    "is_following": false,
                    "name": "茄斯教你学渗透",
                    "url": "https://www.zhihu.com/people/163980fc6aef0e85ac6e7c945663fa19",
                    "url_token": "tao-bu-chi-de-xin-cheng",
                    "user_type": "Normal"
                  },
                  "type": "author"
                }
              ],
              "recall_content_id": "MjIzNjQ3NDM0fDp8QVJUSUNMRQ==",
              "recall_source": "ARTICLE",
              "title": "再对某赌博网站的一个小小小小的Test",
              "url": "https://zhuanlan.zhihu.com/p/609819557"
            },
            {
              "access_status": "ACCESSIBLE",
              "ai_attached_info": "ogNdEhM3NjkwOTYzNDk3MzY0NTA1NzU2GAciCTIyMjY5MzcwNCoJNjA1NTI5MjQ1SgR0ZXN0oAEAsAFi4gILQ29ybmVyQ2FyZHOCBRMzNzU1MzUzMjcwMjA0MjM0MTk1",
              "attached_info": "kgINEgk2MDU1MjkyNDUYBw==",
              "cite_metric": [
                {
                  "data": "https://picx.zhimg.com/v2-7699cc8180d1c0f25f6a823351c80b1c_l.jpg?source=ec1c8e88",
                  "type": "avatar"
                },
                {
                  "data": "茄斯教你学渗透",
                  "type": "text"
                }
              ],
              "content_abstract": "闲来无事,渗透测试!0X01 我与网赌不共戴天今天接了一个小小项目,一个棋牌网站 [图片] 简单尝试一下,提示用户名或密码错误 [图片] 没事,这里验证码都没有的,直接弱口令爆破,可惜失败了。 [图片] 这个时候呢,只能测试登录框是否有其他的漏洞了。先加个引号试试水,报错了,有希望! [图片] 再构造一个万能密码语句,没用? [图片] 再来个空格,将语句进行隔离开,区别产生,确定存在sql漏洞了! [图片] 0X02 工具梭哈有sql漏洞,二话不说就是sqlmap一把梭! [图片] 结果显示…",
              "content_type": "article",
              "content_url_token": "605529245",
              "image": "https://picx.zhimg.com/v2-7cc355948c6bd457eaa0bf3cc861f6bf.png?source=7e7ef6e2&needBackground=1",
              "images": [
                "https://picx.zhimg.com/v2-7cc355948c6bd457eaa0bf3cc861f6bf.png?source=7e7ef6e2&needBackground=1",
                "https://picx.zhimg.com/v2-7b5fa1a3a8967fddc9effc8d730a81bf.png?source=7e7ef6e2&needBackground=1",
                "https://pic1.zhimg.com/v2-fed16fe81f0a3aa098571db7b4a33f81.png?source=7e7ef6e2&needBackground=1",
                "… 2 more items in the full response"
              ],
              "is_out_link": true,
              "labels": [
                {
                  "data": {
                    "author_metrics": "835 关注 · 990 赞同",
                    "avatar_url": "https://picx.zhimg.com/v2-7699cc8180d1c0f25f6a823351c80b1c_l.jpg?source=ec1c8e88",
                    "badge_info": {
                      "detail_badges": [],
                      "icon": "",
                      "merged_badges": [],
                      "night_icon": "",
                      "title": ""
                    },
                    "content_count": 0,
                    "follower_count": 835,
                    "headline": "vx公众号:茄斯教你学渗透 |  专业网络安全培训",
                    "id": "163980fc6aef0e85ac6e7c945663fa19",
                    "is_anonymous": false,
                    "is_followed": false,
                    "is_following": false,
                    "name": "茄斯教你学渗透",
                    "url": "https://www.zhihu.com/people/163980fc6aef0e85ac6e7c945663fa19",
                    "url_token": "tao-bu-chi-de-xin-cheng",
                    "user_type": "Normal"
                  },
                  "type": "author"
                }
              ],
              "recall_content_id": "MjIyNjkzNzA0fDp8QVJUSUNMRQ==",
              "recall_source": "ARTICLE",
              "title": "对某赌博网站的一个小小小小的Test",
              "url": "https://zhuanlan.zhihu.com/p/605529245"
            },
            "… 19 more items in the full response"
          ],
          "event": "Cards",
          "system_meta": {
            "flush_time": 1790691982474,
            "flush_time_format": "22:26:22.474",
            "trace_id": "9f7d1847-a9cc-42a7-a997-c23409897627",
            "ttft": 1073,
            "ttft_end_time": 1790691982473,
            "ttft_start_time": 1790691981400
          }
        },
        {
          "data": {
            "cite_dict": {},
            "delta": true,
            "digital_cite_dict": {},
            "status": 1,
            "summary": "“"
          },
          "event": "Answer",
          "system_meta": {
            "aisp_ttft": 2285,
            "answer_ttft": 2323,
            "flush_time": 1790691983723,
            "flush_time_format": "22:26:23.723",
            "trace_id": "9f7d1847-a9cc-42a7-a997-c23409897627"
          }
        },
        "… 35 more items in the full response"
      ]
    }
  }
]

उदाहरण

प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।

API README

Zhihu AI Search Stream API

Returns the AI answer to a query from Zhihu AI search as a list of stream events. Each event carries a small piece of the answer text. The only required input is message_content, the question or prompt to search.

Use cases

  • Collect a full AI-written answer to a question by joining the summary pieces from all Answer events.
  • Continue a conversation by sending the session_id from a first call with a follow-up message_content.
  • Measure how fast the answer starts using the ttft timing values in system_meta.
  • Log the trace_id of each call to match a response to a specific search.

Request

curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/ai-search-stream" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message_content": "<message_content>"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
message_contentstringYesSearch Content
chat_modestringNoChat mode, default FAST
session_idstringNoSession ID for multi-turn

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "events": [
    {
      "data": {
        "ai_attached_info": "ogN8EhM3NzAzODQ5MDI0OTU1MDMyODE3GJgBIhM3NzAzODQ5MDI0OTU1MDE3MDg2KhM3NzAzODQ5MDI0…",
        "message_id": "7703849024955017086",
        "parent_message_id": "7703849024955032817",
        "session_id": "37616450…"
      },
      "event": "Init",
      "system_meta": {
        "flush_time": 1793692127112,
        "flush_time_format": "15:48:47.112",
        "trace_id": "4361b701-b2b3-4560-95b0-4fb71bf30c68"
      }
    }
  ]
}

Response fields

FieldMeaning
events[]List of stream events in the order they were sent. Each item has an event name, a data object and a system_meta object.
events[].eventType of the event. The sample shows Init first, followed by Answer events.
events[].data.session_idID of the chat session, sent in the Init event. Pass it as session_id in a later call for a multi-turn chat.
events[].data.message_id / events[].data.parent_message_idID of the new message and the ID of the message before it in the session.
events[].data.summaryA piece of answer text in an Answer event. Join the pieces in order to get the full answer.
events[].data.deltaSet to true when summary holds only the new text for this event, not the whole answer so far.
events[].data.cite_dict / events[].data.digital_cite_dictCitation maps for the answer text. Both are empty in the sample events.
events[].system_meta.ttft / events[].system_meta.answer_ttft / events[].system_meta.aisp_ttftTime to first token values, present on the first Answer event. The response does not state their unit.
events[].system_meta.flush_time / events[].system_meta.flush_time_formatTime the event was sent, as a number and as a HH:MM:SS.mmm string.
events[].system_meta.trace_idTrace ID shared by all events in the same response.

Notes

  • Concatenate events[].data.summary from the Answer events in order to build the full answer text, since each event has delta set to true.
  • To keep a conversation going, read events[].data.session_id from the Init event and send it as session_id in the next call.
  • chat_mode is optional and defaults to FAST.
  • To read the full content behind a topic, use Zhihu Article Search to find articles and answers on the same query.

Pricing

$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Zhihu$0.005 प्रति कॉलJSON
Zhihu$0.001 प्रति कॉलJSON
Zhihu$0.001 प्रति कॉलJSON
Zhihu$0.001 प्रति कॉलJSON
Zhihu$0.001 प्रति कॉलJSON
Zhihu$0.001 प्रति कॉलJSON

गाइड्स:Best Zhihu API in 2026: Pricing Compared

प्रश्न

FAQ

Zhihu AI Search Stream API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/zhihu/web/ai-search-stream पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

Zhihu AI Search Stream API की लागत कितनी है?

$0.005 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

Zhihu AI Search Stream API कौन-से parameters स्वीकार करती है?

आवश्यक: message_content (string)। वैकल्पिक: chat_mode (string) और session_id (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Zhihu AI Search Stream API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक Zhihu developer account या API key चाहिए?

नहीं। Zhihu AI Search Stream SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Zhihu API access के लिए आवेदन करने की आवश्यकता नहीं है।