Text Series

POST /v1/responses/compact

API Key · POST /v1/responses/compact

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

POST/v1/responses/compact

Authorizations

Authorizationstringrequired

Use a OneAster inference API Key (Bearer sk-…).

Authorization: Bearer $ONEASTER_API_KEY

Body · application/json

modelstringrequired
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"
    }
  }
}