Skip to Content
goldflow.cc Docs
ChatOpenAI Compatible

压缩对话 (OpenAI Responses API)

POST
/v1/responses/compact

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

Authorization

bearerAuth
headerAuthorizationBearer <API key>

使用 Authorization Bearer API Key 进行鉴权。

Request Body

application/json
  1. body
model*string

模型 ID。

input?|array<>

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

instructions?string

instructions 字段。

previous_response_id?string

previous_response_id 字段。

Response Body

成功压缩对话

application/json
  1. response
id?string

资源唯一 ID。

object?string

object 字段。

created_at?integer

创建时间。

output?array<>

输出内容。

usage?
error?

错误信息。

Example Request
curl -X POST 'https://goldflow.cc/v1/responses/compact' \  -H 'Content-Type: application/json' \  -d '{  "model": "string"}'
Example Response200
{  "id": "string",  "object": "string",  "created_at": 0,  "output": [    {}  ],  "usage": {    "prompt_tokens": 0,    "completion_tokens": 0,    "total_tokens": 0,    "input_tokens": 0,    "output_tokens": 0  },  "error": {}}