API for creating networks