> 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/character-crafting-apis.md).

# 角色构建 API

使用 Convai 的角色构建 API 创建和配置 AI 角色，以定义其个性、行为、知识等。

这些 **角色构建 API** 让开发者能够全面掌控 AI 角色的设计、配置和演进方式。\
这些 API 构成了角色身份的基础，定义其 **个性、行为、知识和叙事** 在所有交互中的一致性。

借助这些 API，你可以：

* **创建和管理角色** — 定义角色元数据，例如名称、描述和语言。
* **配置 AI 设置** 通过 **核心 AI 设置 API**，包括模型选择和温度。
* **构建和维护知识库** — 上传、更新和整理构成角色领域知识的文档。
* **编写背景故事** 使用 **背景故事 API**，为角色增添深度和连贯性。
* **设计叙事元素** 通过 **叙事设计 API** ，打造引人入胜的故事情节，并构建世界观之间的联系。
* **创建外部 API 函数** — 通过 **外部 API**.
* **连接 MCP 服务器** — 注册远程 MCP 工具服务器，配置静态标头或 OAuth，并通过 **MCP 服务器 API**.
* **定义和管理动作** （手势、动作或特定于环境的行为），使用 **动作 API**.
* **访问语言和语音选项** 通过 **语言列表** 和 **语音列表 API**，打造支持多语言和自定义语音的角色体验。
* **获取和管理角色列表及版本** 通过 **角色列表 API**，确保妥善整理并进行版本管理的生产环境角色。
* **评估和改进** 角色的回复和表现，使用 **评估 API**.

这些 API 协同运作，让你塑造角色的 **核心智能、情感基调和知识框架**，确保角色在每次对话中都展现出一致且可信的个性。

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

{% content-ref url="/pages/d469688f9d4ad68069e55312cfea61bb7a4d9f24" %}
[背景故事 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/backstory-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/022b58fc84ede8ef62eb99e705ed732d009ab0be" %}
[Mindview API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/mindview-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/ba1c2d733d1597fe6cbe6b30bbd302d5f1bf6fb1" %}
[核心 AI 设置 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/core-ai-settings-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/188670c7a430f8bc1c5fbd90fa7d6e22f07d3474" %}
[叙事设计 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/narrative-design-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/7c5287afcd4e876cdd7ac8cac05b07b2529acb89" %}
[知识库 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/knowledge-bank-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/4e0200509af6aec80cc3e4db7d53eeeb77ee76d1" %}
[外部 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/external-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/4dd0f56a9411883f2a72d0e1666c09db995df98f" %}
[MCP 服务器 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/mcp-server-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/f8d44c79bf1e017f91e01dcd9fb7a3a708930589" %}
[动作 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/action-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/ac8129adfcadd7218ac6e52bdc6388fefcf9351a" %}
[聊天历史 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/chat-history-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/0bef86f48f506b7240afeae45c35ccdd06027c8e" %}
[评估 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/evaluation-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/fdfed88f59c6997bd47c6e08c93781d8de8d9d7d" %}
[语言列表 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/language-list-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/ca26d73f8d2e97a80021565ab030a9f12904f637" %}
[语音列表 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/voice-list-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/533981de37c51ca21e1526c104e6de84309a01a1" %}
[角色列表 API](https://docs.convai.com/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/character-list-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 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/character-crafting-apis.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.
