Add stream support for api