v1

latestOpenAPI 3.1.0MIT2026-07-1318121242.5 KB
Tasks

Create an agent task

Creates a model task. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model's task.

post/tasks

Request body

streamboolean required

是否启用流式(SSE)返回;true 则以 text/event-stream 推送 Task 事件。

structured_outputobject

期望的结构化输出 JSON Schema;仅非流式模式有效,流式模式下将被忽略。

client_idstring

调用方客户端标识(如 AIME)。

request_idstring

请求链路唯一 ID;便于将复杂调用串联在一起。

session_idstring

会话 ID;用于跨多轮交互复用上下文。

task_idstring

任务 ID;用于区分主任务与子任务。

user_idstring

终端用户 ID。

allowed_toolsstring[]

允许使用的工具白名单;为 null 允许全部,空数组表示禁止所有。

disallowed_toolsstring[]

禁用的工具黑名单;为 null 或空数组不生效。

allowed_subagentsstring[]

允许使用的子代理白名单;为 null 允许全部,空数组禁止所有。

stop_toolsstring[]

命中则停止代理循环的工具名列表;为 null 或空数组不生效。

inference_argsobject

推理参数覆盖项(如温度、最大 tokens 等),具体字段由后端实现决定。

workspace_dirstring

文件系统工作目录;供文件工具与代码解释器使用。

envobject

Agent 的运行时环境变量键值对。

log_dirstring

日志输出目录。

rollout_save_dirstring

回溯(rollout)结果保存目录。

return_rolloutboolean

是否在最终结果中返回 rollout 事件集合。

include_compress_model_rolloutboolean

是否包含上下文压缩模型的 rollout 结果。

include_subagent_rolloutboolean

是否包含子 Agent 的 rollout 结果。

Response

OK

jsonrpc'2.0' required

JSON-RPC protocol version, always '2.0'.