TensorOcean Global 文档

OpenAI Responses

文本及结构化输入、output 条目与 Responses 流式事件。

在线测试

选择服务地址,展开认证填写密钥,修改请求体后发送,查看状态码和返回内容。

POST
/v1/responses
*object
array<ResponseFunctionTool>
object
object

输入文本或结构化条目;返回 output 数组。SDK 的 output_text 是辅助属性,不是保证存在的原始 JSON 字段。

认证

BearerAuth
认证Bearer <token>

TensorOcean Global API Key;Authorization: Bearer 。

位置: header

请求体

application/json

TypeScript 类型定义

在 TypeScript 中使用 request body 类型。

首期示例使用显式 input。工具能力和可选参数需由所选模型支持。

响应体

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/responses" \  -H "Content-Type: application/json" \  -d '{    "model": "YOUR_RESPONSES_MODEL_ID",    "input": "Say hello in one sentence."  }'
{  "id": "resp_example",  "object": "response",  "created_at": 1793750400,  "status": "completed",  "model": "YOUR_RESPONSES_MODEL_ID",  "output": [    {      "id": "msg_example",      "type": "message",      "role": "assistant",      "status": "completed",      "content": [        {          "type": "output_text",          "text": "Hello!",          "annotations": []        }      ]    }  ],  "usage": {    "input_tokens": 12,    "output_tokens": 3,    "total_tokens": 15  },  "error": null,  "incomplete_details": null}

认证与服务地址