In NETCONF or similar NBI’s there is no way how the user does not pass a list key value - the key value is the only means how a list instance can be identified, and so as to configure a list instance, you first need to identify it. In CLI you may use
tailf:key-default to assign a fixed values and then write a transaction hook that would do the value generation (i.e. “move” the new list instance to another list instance with a generated key value).
What I would suggest though is to use actions: define an action like
create-subnet which would take the list attributes as an input, and the action implementation would generate the id value. Such approach would work for both CLI or NETCONF or any other NBI.