Server Code for Streamin API