POST
/
agent
/
create
curl --request POST \
  --url https://geekai.co/api/v1/agent/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=测试智能体' \
  --form 'desc=专业的客服咨询助手,可以解答产品相关问题' \
  --form model=deepseek-chat \
  --form chat_level=2 \
  --form interneted=0 \
  --form stream=1
{
  "message": "智能体创建成功",
  "data": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "initializing",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

注:训练模型设置参考系统支持模型列表

响应数据格式和 OpenAI 完全兼容,根据是否是流式响应而变化,可以参考下面的请求示例进行判断:

cURL 请求示例

curl --location --request POST 'https://geekai.co/api/v1/agent/create' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--form 'name="测试智能体100"' \
--form 'desc="测试智能体机器人"' \
--form 'logo=@"/E:/图片/geekai/geekai-icon-tr-g.png"' \
--form 'model="gpt"' \
--form 'interneted="1"'

Postman 请求响应示例

Authorizations

Authorization
string
header
required

JWT认证token

Body

multipart/form-data

Response

200
application/json

成功响应

The response is of type object.