Domain name for API request: adp.intl.tencentcloudapi.com.
This API is used to create an Agent. Currently only support claw mode.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateAgent. |
| Version | Yes | String | Common Params. The value used for this API: 2026-05-20. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| AppId | Yes | String | Application ID. |
| Agent | No | AgentSpec | Agent configuration |
| Kind | No | Integer | Agent type, case-sensitive between B-end configuration Agent and client user-mode Agent Enumeration values:
|
| Parameter Name | Type | Description |
|---|---|---|
| AgentId | String | Agent Id |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: adp.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAgent
<Common request parameters>
{
"AppId": "2068***********2288",
"Agent": {
"Profile": {
"Name": "User Agent",
"IconUrl": "https://cdn.xiaowei.qq.com/static/adp/agent-robot.png",
"Role": 1,
"Description": "User Agent",
"ParentAgentId": "user_e55be224-3cb4-4951-abdd-3454bd70b6a1"
},
"Instructions": "User Agent",
"Model": {
"ModelId": "Moonshot/moonshot-v1-128k",
"Alias": "moonshot-v1-128k",
"ContextWordsLimit": 20000,
"InstructionsWordsLimit": 20000
},
"ToolList": [
{
"Config": {
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"ToolId": "959ea8eb-2772-4981-a92f-c4f43625b0c1",
"Description": "Intelligently generate related images based on input text descriptions (ultra-fast version)",
"InputList": [
{
"Name": "Image",
"Description": "Reference Image. Either Base64 or Url must be provided. If both are provided, Url prevails. When the Image parameter is imported, the Style and Resolution parameters do not take effect, and the output Image Resolution remains the same as the imported Image. Image restrictions: Resolution greater than 128 and less than 2048 on one side; Image size less than 6 MB; format support: jpg, jpeg, png, bmp, tiff, webp.",
"Type": 4,
"IsRequired": false,
"IsHidden": false,
"Input": {
"InputType": 0
},
"SubParameterList": [],
"OneOfList": [],
"AnyOfList": []
}
],
"OutputList": [],
"HeaderParameterList": [],
"QueryParameterList": [],
"ToolSource": 0,
"IsDisabled": false
}
}
],
"PluginList": [
{
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"HeaderParameterList": [],
"QueryParameterList": [],
"EnableCamRoleAuth": false,
"AuthType": 0
}
],
"SkillList": [
{
"SkillId": "f5fc841f-82fc-46ca-8152-d3bab786d52c"
}
],
"AdvancedConfig": {
"MaxReasoningRound": 100
}
},
"Kind": 1
}
{
"Response": {
"AgentId": "user_cc760218-4bb4-4c4e-b6d2-4996e212597e",
"RequestId": "5b14e728-55b3-44cb-9d49-9dac2c96423b"
}
}
POST / HTTP/1.1
Host: adp.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAgent
<Common request parameters>
{
"AppId": "2068***********2288",
"Agent": {
"Profile": {
"Name": "My Main Agent",
"IconUrl": "https://cdn.xiaowei.qq.com/static/adp/agent-robot.png",
"Role": 0,
"Description": "Agent"
},
"Instructions": "User Agent",
"Model": {
"ModelId": "Moonshot/moonshot-v1-128k",
"Alias": "moonshot-v1-128k",
"ContextWordsLimit": 20000,
"InstructionsWordsLimit": 20000
},
"ToolList": [
{
"Config": {
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"ToolId": "959ea8eb-2772-4981-a92f-c4f43625b0c1",
"Description": "Intelligently generate related images based on input text descriptions (ultra-fast version)",
"InputList": [
{
"Name": "Image",
"Description": "Reference Image. Either Base64 or Url must be provided. If both are provided, Url prevails. When the Image parameter is input, the Style and Resolution parameters do not take effect, and the output Image Resolution will remain the same as the input Image Resolution. Image restrictions: Resolution greater than 128 and less than 2048 on one side; Image less than 6 MB; format support: jpg, jpeg, png, bmp, tiff, webp.",
"Type": 4,
"IsRequired": false,
"IsHidden": false,
"Input": {
"InputType": 0
},
"SubParameterList": [],
"OneOfList": [],
"AnyOfList": []
}
],
"OutputList": [],
"HeaderParameterList": [],
"QueryParameterList": [],
"ToolSource": 0,
"IsDisabled": false
}
}
],
"PluginList": [
{
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"HeaderParameterList": [],
"QueryParameterList": [],
"EnableCamRoleAuth": false,
"AuthType": 0
}
],
"SkillList": [
{
"SkillId": "f5fc841f-82fc-46ca-8152-d3bab786d52c"
}
],
"AdvancedConfig": {
"MaxReasoningRound": 100
}
}
}
{
"Response": {
"AgentId": "0f050c95-31b6-4d31-8c31-1fd6a6bafb4c",
"RequestId": "c3e001ca-0abc-40cf-a16a-6e5e38f39df7"
}
}
POST / HTTP/1.1
Host: adp.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAgent
<Common request parameters>
{
"AppId": "2068***********2288",
"Agent": {
"Profile": {
"Name": "My Agent",
"IconUrl": "https://cdn.xiaowei.qq.com/static/adp/agent-robot.png",
"Role": 1,
"Description": "Agent"
},
"Instructions": "User Agent",
"Model": {
"ModelId": "Moonshot/moonshot-v1-128k",
"Alias": "moonshot-v1-128k",
"ContextWordsLimit": 20000,
"InstructionsWordsLimit": 20000
},
"ToolList": [
{
"Config": {
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"ToolId": "959ea8eb-2772-4981-a92f-c4f43625b0c1",
"Description": "Intelligently generate related images based on input text descriptions (ultra-fast version)",
"InputList": [
{
"Name": "Image",
"Description": "Reference Image. Either Base64 or Url must be provided. If both are provided, Url prevails. When the Image parameter is imported, the Style and Resolution parameters do not take effect, and the output Image Resolution remains the same as the imported Image Resolution. Image restrictions: Resolution greater than 128 and less than 2048 on one side; Image size less than 6 MB; format support: jpg, jpeg, png, bmp, tiff, webp.",
"Type": 4,
"IsRequired": false,
"IsHidden": false,
"Input": {
"InputType": 0
},
"SubParameterList": [],
"OneOfList": [],
"AnyOfList": []
}
],
"OutputList": [],
"HeaderParameterList": [],
"QueryParameterList": [],
"ToolSource": 0,
"IsDisabled": false
}
}
],
"PluginList": [
{
"PluginId": "bf8ad2f3-1e5c-410a-ae81-abd7c5c14f1c",
"HeaderParameterList": [],
"QueryParameterList": [],
"EnableCamRoleAuth": false,
"AuthType": 0
}
],
"SkillList": [
{
"SkillId": "f5fc841f-82fc-46ca-8152-d3bab786d52c"
}
],
"AdvancedConfig": {
"MaxReasoningRound": 100
}
}
}
{
"Response": {
"AgentId": "e86a4137-2a19-469f-9b47-6fd4a8c6c115",
"RequestId": "31d23269-e98c-47df-a90d-963a00bbc4f4"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
文档反馈