> 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

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

借助这些 API，您可以：

* **创建和管理角色** — 定义角色元数据，如名称、描述、语言。
* **配置 AI 设置** 通过 **核心 AI 设置 API**，包括模型选择、温度。
* **构建并维护知识库** — 上传、更新并组织构成角色领域知识的文档。
* **开发背景故事** 使用 **背景故事 API**，为您的角色提供深度和连贯性。
* **设计叙事元素** 通过 **叙事设计 API** 以创建沉浸式剧情线和世界观构建关联。
* **创建外部 API 函数** — 角色可通过以下方式调用的 Python 处理程序（天气、票务、实时数据）作为工具： **外部 API**.
* **连接 MCP 服务器** — 注册远程 MCP 工具服务器，支持静态请求头或 OAuth，并通过以下方式将其附加到角色： **MCP 服务器 API**.
* **定义并管理动作** （手势、动作或特定环境行为），使用 **动作 API**.
* **访问语言和语音选项** 通过 **语言列表** 和 **语音列表 API**，支持多语言和语音定制的角色体验。
* **检索并管理角色列表和版本** 通过 **角色列表 API**，确保您的生产角色保持有序并正确版本化。
* **评估并优化** 使用以下工具来评估您角色的回复和表现： **评估 API**.

这些 API 共同让您塑造角色的 **核心智能、情感基调和知识框架**，确保在每次对话中都保持一致、可信的个性。

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

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

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

{% content-ref url="/pages/ba1c2d733d1597fe6cbe6b30bbd302d5f1bf6fb1" %}
[核心 AI 设置 API](/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](/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/narrative-design-api.md)
{% endcontent-ref %}

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

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

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

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

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

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

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

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

{% content-ref url="/pages/533981de37c51ca21e1526c104e6de84309a01a1" %}
[角色列表 API](/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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
