跳转到主要内容
POST
/
v2
/
agent
/
{projectId}
/
job
/
{id}
/
message
发送后续消息
curl --request POST \
  --url https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>"
}
'
{
  "id": "<string>",
  "status": "active",
  "source": {
    "repository": "<string>",
    "ref": "<string>"
  },
  "model": "<string>",
  "prLink": "https://github.com/org/repo/pull/123",
  "createdAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z"
}
向现有代理任务发送后续指令。该消息会异步处理——请轮询 获取代理任务 端点以跟踪进度。

速率限制

  • 每个 Mintlify 项目每小时最多可使用 100 次

用法

curl -X POST https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
  -H "Authorization: Bearer mint_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Also add error handling examples to the quickstart guide"}'

授权

Authorization
string
header
必填

Authorization 头部需要 Bearer 令牌。请使用以 mint_ 为前缀的管理员 API 密钥。这是服务端使用的机密凭证。你可以在控制台的 API keys 页面 中生成一个。

路径参数

projectId
string
必填

你的项目 ID。可从你的控制台中的 API keys 页面复制。

id
string
必填

要向其发送消息的代理任务的唯一标识符。

请求体

application/json
prompt
string
必填

发送给代理的后续指令。

Minimum string length: 1

响应

消息发送成功

id
string

代理任务的唯一标识符。

status
enum<string>

作业的当前状态。active —— 代理当前正在处理提示词。completed —— 代理已成功完成,并且可能已创建 PR(请检查 prLink)。failed —— 代理遇到了不可恢复的错误。请持续轮询,直到状态为 completedfailed

可用选项:
active,
completed,
failed
source
object

源存储库信息。

model
string

此作业使用的 AI 模型。

由代理创建的 GitHub 拉取请求(PR;亦称“合并请求”/Merge Request)URL。作业仍处于 active 状态或没有文件变更时,该值为 null。代理成功创建 PR 后,此字段会被填充。

示例:

"https://github.com/org/repo/pull/123"

createdAt
string<date-time>

作业创建时的时间戳。

archivedAt
string<date-time> | null

作业归档时的时间戳。