import requests import json # 测试通过 Router 调用 gpt_image_2 工具 response = requests.post( "http://localhost:8001/run_tool", headers={"Content-Type": "application/json"}, json={ "tool_id": "gpt_image_2", "params": { "prompt": "1024x1024 square image, a beautiful sunset over mountains" } }, timeout=180 ) print(f"Status Code: {response.status_code}") print(f"Response: {json.dumps(response.json(), indent=2, ensure_ascii=False)}")