Programmatically generate flows?

Is there anyway to programmatically generate nodes/flows outside of creating a large JSON blob via the APIs exposed in the node-red npm package? For instance, could I programmatically create a flow then add nodes to it simlar to this:

flow.addNode('httpRequest', {method: POST,..., wires: []

If not, is there a way for developers to programmatically access the special parameters associated with a particular type of node? I see that there is a registerType function that allows users to specify the special parameters associated with a new node, but I would like to be able to tell the special parameters that an inject node has that a debug node does not.

Is there any answer to this question? I have similar problem.
I want to read a csv file on the beginning of deployment and generate nodes/flows based on the number of columns on csv file. But I don't want to change the nodes/flows while running.
@carrollj I think you can edit your flow when node-red is off and then start node-red. It'll be deployed when started. For instance, you can use java json library to make new nodes and flows.
However, how to connect the nodes? If I generate nodes/flows by copying the text, connecting them can be tricky because I should generate unique ids. I used simple numbers like "1", "2", ... they seem to work. I don't know if this is the right way or not.
But if you want to generate nodes/flows while running, I have no idea. Does anyone know if this is possible or not?

No, it is not possible to create nodes dynamically at runtime.

The only way to add/remove nodes is to deploy a new flow configuration.

Thank you for your reply. What do you recommend for generating the nodes and flows @knolleary ? Any specific library?