I don't know of a flow chart API, but there are any number of general purpose chart API's.
Google charts has examples for org chart (among many other chart types).
There are many threads on this kind of thing on SO already:
JavaScript Chart Library
Graph visualization library in JavaScript
etc