update api for corpus mode
update api for corpus mode