文本接口

POST /v1/responses/compact

压缩对话 (OpenAI Responses API)

OpenAI Responses API,用于对长对话进行 compaction。

POST/v1/responses/compact

身份验证

Authorizationstring必填

使用 OneAster 推理 API Key(Bearer sk-…)。

Authorization: Bearer $ONEASTER_API_KEY

请求正文 · application/json

modelstring必填
inputoneOf

输入内容,可以是字符串或消息数组

instructionsstring
previous_response_idstring
JSON Schema
{
  "type": "object",
  "required": [
    "model"
  ],
  "properties": {
    "model": {
      "type": "string"
    },
    "input": {
      "description": "输入内容,可以是字符串或消息数组",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {}
          }
        }
      ]
    },
    "instructions": {
      "type": "string"
    },
    "previous_response_id": {
      "type": "string"
    }
  }
}