private generates id for api model.