> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/interaction-apis.md).

# 交互 API

该 **交互 API** 可在用户与您的 AI 角色之间实现实时、动态交互。\
一旦您的角色上线，这些 API 就会处理对话输入和上下文响应。

通过这些 API，你可以：

* **进行实时对话** — 发送用户文本或语音输入，并接收上下文相关的自然回复。
* **以文本和/或音频形式获取回复**，从而支持基于文本的聊天和语音对话模式。
* **发送并处理音频输入** （例如， `.wav` 单声道文件（支持的采样率），以启用实时语音识别。

交互 API 连接您的角色与用户，实现跨文本和语音渠道的无缝、响应式通信。

{% content-ref url="/pages/9f68825136f6ad3eb76c8a1fdee1f114238c1f07" %}
[交互 API](/api-docs/zh/api-can-kao/core-api-reference/interaction-apis/interaction-api.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/interaction-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
