创建 Responses

使用 OpenRoute Responses API 创建响应。支持流式传输和特定提供商的参数。

POST
/responses

Authorization

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

创建响应的请求。结合了通用字段和特定提供商的选项。

Response Body

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/responses" \  -H "Content-Type: application/json" \  -d '{    "model": "openai/o1-pro",    "input": "Tell me a three sentence bedtime story about a unicorn.",    "max_output_tokens": 100  }'
{  "id": "string",  "model": "string",  "output": [    {      "type": "message",      "content": [        {          "type": "output_text",          "text": "string"        }      ]    }  ]}