What am I doing wrong while using SerpApi with Connect that results in an api_key error?

Though in your demo it has select options for the parameters which means maybe they are indeed dynamic?