For AI agents: the complete documentation index is available at https://docs.reelway.ai/llms.txt, the full documentation bundle is available at https://docs.reelway.ai/llms-full.txt, and this page is available as Markdown at https://docs.reelway.ai/api-reference/tool-execution.md.

直接工具执行

POSThttps://rcn.reelway.ai/v1/creative-agent/tools/execute鉴权:凭证

同步执行托管工具,返回最终消息与可选产物

创意智能体的六个同步托管工具通过单一端点执行:不需要建立长连接,适合无状态服务端与函数计算。

请求体

字段类型必填说明
toolstring是托管工具名;tool_name 作为别名被接受
arguments各工具定义是所选工具的完整参数对象
app_sourcestring否调用方标签(≤128 字符,超长截断);亦可用 X-App-Source 头
token_type / billing_modestring否Sogni 兼容形状字段;统一余额计费下不改变计费结果

未知字段返回 400(1010)。arguments 必须为对象;未实现或未知工具返回 422(1001)。

六个托管工具

工具用途
enhance_prompt把粗略提示词扩写为模型就绪的图像/视频/语音提示词
compose_script起草脚本、分镜、预告片与短视频文案
compose_lyrics撰写歌词与建议的音乐参数
compose_instrumental撰写纯音乐结构与建议参数
compose_workflow把创意简报编译为工作流 input 计划与费用预估
compose_workflow_template起草或编辑带参数的工作流模板与示例计划
预览六个工具当前为占位实现(mock 语义):响应契约稳定,内容质量随真实引擎接入提升

请求示例

curl --fail-with-body https://rcn.reelway.ai/v1/creative-agent/tools/execute \
  -H "api-key: $REELWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "enhance_prompt",
    "arguments": {
      "prompt": "一只戴墨镜的柴犬",
      "target_output": "video_prompt"
    }
  }'

响应

标准信封:data 含工具输出(message 文本与结构化字段,按工具定义)。未实现工具返回 422(1001);参数缺漏返回 400。

另见