Nén hội thoại (OpenAI Responses API)

post/v1/responses/compact

Nén một hội thoại dài thông qua OpenAI Responses API.

Xác thực

Gửi khóa API OLETOKEN dưới dạng token Bearer. Khóa được tạo tại trang API Keys trong bảng điều khiển.

Authorization: Bearer $OLETOKEN_API_KEY

Nội dung yêu cầu

Content-Type:application/json

TrườngKiểuBắt buộcMô tả
modelstring
inputstring | object[]Đầu vào, có thể là một chuỗi hoặc một mảng tin nhắn
instructionsstring
previous_response_idstring

Phản hồi

200Đã nén hội thoại

TrườngKiểuBắt buộcMô tả
idstring
objectstring
created_atinteger
outputobject[]
usageUsage
prompt_tokensintegerSố token prompt
completion_tokensintegerSố token completion
total_tokensintegerTổng số token
prompt_tokens_detailsobject
cached_tokensinteger
text_tokensinteger
audio_tokensinteger
image_tokensinteger
completion_tokens_detailsobject
text_tokensinteger
audio_tokensinteger
reasoning_tokensinteger
errorobject

Ví dụ yêu cầu

curl -X POST 'https://api.oletoken.ai/v1/responses/compact' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "string"
  }'