文档
Anthropic 兼容端点
Anthropic 兼容端点
POSTcurl https://:1234/v1/responses \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-oss-20b", "input": "Provide a prime number less than 50", "reasoning": { "effort": "low" } }'
使用先前响应中的 id 作为 previous_response_id。
curl https://:1234/v1/responses \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-oss-20b", "input": "Multiply it by 2", "previous_response_id": "resp_123" }'
curl https://:1234/v1/responses \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-oss-20b", "input": "Hello", "stream": true }'
您将收到 SSE 事件,例如 response.created、response.output_text.delta 和 response.completed。
在应用中启用远程 MCP(开发者 → 设置)。使用 MCP 服务器工具的示例负载
curl https://:1234/v1/responses \ -H "Content-Type: application/json" \ -d '{ "model": "ibm/granite-4-micro", "input": "What is the top trending model on hugging face?", "tools": [ { "type": "mcp", "server_label": "huggingface", "server_url": "https://hugging-face.cn/mcp", "allowed_tools": [ "model_search" ] } ] }'
此页面的源代码可在 GitHub 上查看