创建代理任务(v1)

Changed on

已废弃:请改用使用 webhook 触发器的自定义自动化。此操作会创建一个新的代理任务,该任务可根据提供的消息和 Git branch 信息生成并编辑文档。

使用管理员 API 密钥进行身份验证。

post/v1/agent/{projectId}/job

Request

  • Base URL
    https://api.mintlify.com
  • Auth
    HTTP bearer

Path parameters

projectIdstring required

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

Request body

branchstring

代理应处理的 Git branch 名称。如省略,代理会根据消息内容生成一个 branch 名称。

asDraftboolean

控制拉取请求(PR;亦称“合并请求”/Merge Request)是以草稿模式还是非草稿模式创建。为 true 时,会创建草稿拉取请求(PR;亦称“合并请求”/Merge Request)。为 false 时(默认),会创建可供评审的常规拉取请求(PR;亦称“合并请求”/Merge Request)。

model'sonnet' | 'opus'

用于代理任务的 AI 模型。使用 sonnet 可获得更快、更具成本效益的处理。使用 opus 可获得能力更强但速度较慢的处理。

Response

代理任务创建成功。返回 Server-Sent Events 流式响应。

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    2 more changes in this revision