> 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.md).

# 核心 API 参考

探索 Convai 的核心 API，分为角色构建 API 和交互 API，用于创建、自定义并与智能 AI 角色交互。

本节详细介绍 Convai 的 **核心 API**，它们是构建智能交互式虚拟角色的基础。核心 API 分为两大类： **角色创作 API** 和 **交互 API**，分别服务于开发流程中的不同环节。

{% embed url="<https://youtu.be/vwBzaQP0Bl4?si=tQ5LGv-F9nxwxv1u>" %}

### 了解核心 API

Convai 的核心 API 可帮助开发者 **创建、自定义和部署由 AI 驱动的角色** 以满足各种应用场景的需求——从沉浸式游戏到虚拟助手。

核心 API 分为两个部分：

{% content-ref url="/pages/bd5cf9113ab647ed01a0058b5fc3a28316e06869" %}
[角色构建 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis.md)
{% endcontent-ref %}

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

***

{% hint style="danger" %}
**请注意**

若将此 API 用于不道德或恶意目的，相关账户和 API 密钥将被自动封禁。
{% endhint %}

{% hint style="info" %}
如需了解更多资源，也可以查看我们的 [Python 笔记本](https://colab.research.google.com/drive/17Bazf92ZsXQmJZ91CbVAhiPmnapIuTgS?usp=sharing).

此笔记本将手把手指导你使用 Convai 的核心 API 创建响应灵敏的 NPC。内容涵盖角色设置、叙事和背景故事的定义，以及语音功能的有效集成。
{% endhint %}

{% hint style="success" %}
如果遇到任何问题或有疑问，请随时通过我们的 [Convai 开发者论坛](https://forum.convai.com).
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
