Padatkan perbualan (OpenAI Responses API)

post/v1/responses/compact

Padatkan perbualan panjang melalui OpenAI Responses API.

Pengesahan

Hantar kunci API OLETOKEN sebagai token Bearer. Kunci dicipta di halaman Kunci API dalam konsol.

Authorization: Bearer $OLETOKEN_API_KEY

Isi permintaan

Content-Type:application/json

MedanJenisWajibKeterangan
modelstring—
inputstring | object[]—Input, sama ada rentetan atau tatasusunan mesej
instructionsstring——
previous_response_idstring——

Respons

200Perbualan dipadatkan

MedanJenisWajibKeterangan
idstring——
objectstring——
created_atinteger——
outputobject[]——
usageUsage——
prompt_tokensinteger—Bilangan token prompt
completion_tokensinteger—Bilangan token penyempurnaan
total_tokensinteger—Jumlah bilangan token
prompt_tokens_detailsobject——
cached_tokensinteger——
text_tokensinteger——
audio_tokensinteger——
image_tokensinteger——
completion_tokens_detailsobject——
text_tokensinteger——
audio_tokensinteger——
reasoning_tokensinteger——
errorobject——

Contoh permintaan

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