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_KEYIsi permintaan
Content-Type:application/json
| Medan | Jenis | Wajib | Keterangan |
|---|---|---|---|
| model | string | — | |
| input | string | object[] | — | Input, sama ada rentetan atau tatasusunan mesej |
| instructions | string | — | — |
| previous_response_id | string | — | — |
Respons
200Perbualan dipadatkan
| Medan | Jenis | Wajib | Keterangan |
|---|---|---|---|
| id | string | — | — |
| object | string | — | — |
| created_at | integer | — | — |
| output | object[] | — | — |
| usage | Usage | — | — |
| prompt_tokens | integer | — | Bilangan token prompt |
| completion_tokens | integer | — | Bilangan token penyempurnaan |
| total_tokens | integer | — | Jumlah bilangan token |
| prompt_tokens_details | object | — | — |
| cached_tokens | integer | — | — |
| text_tokens | integer | — | — |
| audio_tokens | integer | — | — |
| image_tokens | integer | — | — |
| completion_tokens_details | object | — | — |
| text_tokens | integer | — | — |
| audio_tokens | integer | — | — |
| reasoning_tokens | integer | — | — |
| error | object | — | — |
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"
}'
