cURL
curl --request POST \ --url https://api.example.com/threads/prune \ --header 'Content-Type: application/json' \ --data ' { "thread_ids": [ "3c90c3cc-0d44-4b50-8888-8dd25736052a" ], "strategy": "delete" } '
{ "pruned_count": 123 }
Prune threads by ID. The ‘delete’ strategy removes threads entirely. The ‘keep_latest’ strategy prunes old checkpoints but keeps threads and their latest state.
Payload for pruning threads.
List of thread IDs to prune.
The prune strategy. 'delete' removes threads entirely. 'keep_latest' prunes old checkpoints but keeps threads and their latest state.
delete
keep_latest
Success
Response from pruning threads.
Number of threads successfully pruned.
Was this page helpful?