> 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](/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis.md)
{% endcontent-ref %}

{% content-ref url="/pages/ffe18fb0b07b794ff9577fd74da0e402cd3901fe" %}
[交互 API](/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.
