LinkexLinkex Docs
API ReferenceGeneratedResponses

压缩对话 (OpenAI Responses API)

POST
/v1/responses/compact

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

Authorization

BearerAuth
AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/responses/compact" \  -H "Content-Type: application/json" \  -d '{    "model": "string"  }'
{  "id": "string",  "object": "response.compaction",  "created_at": 0,  "output": [    {}  ],  "usage": {    "prompt_tokens": 0,    "completion_tokens": 0,    "total_tokens": 0,    "prompt_tokens_details": {      "cached_tokens": 0,      "text_tokens": 0,      "audio_tokens": 0,      "image_tokens": 0    },    "completion_tokens_details": {      "text_tokens": 0,      "audio_tokens": 0,      "reasoning_tokens": 0    }  },  "error": {}}