Reset to Auto increment after existing data migration

I have a doctype where i need to transfer the existing data from current system to frappe system. i need the same ID in new frappe system doctype what i used in old system . so i would like to set PK as set by user and manually inserting old id to name(ID) field that is fine . once the old data transfer is finished i need to set it an auto increment for the PK field but that is not allowed due data exists in system . how can do this . for example if i reached after manual id insert throgh api suppose i reached 150. then from 151 i dont want manual it will be an external api call where i need auto increment 151 152 153 and so on

Once you create your naming series, you can still manually import documents with included PK (name field).

If you create a naming series with a proper prefix, you can set the sequence number. See this link.