I have got the reference of getting the panorama image by panoid but its giving me only the thumbnail image but I want an original panorama image directly from streetview.
While there is no official API to download the full panorama. There are many tools that you can use.
Windows Tool: http://www.purebasic.fr/english/viewtopic.php?f=27&t=50248
NodeJS: https://www.npmjs.com/package/extract-streetview
https://github.com/mattdesl/google-panorama-equirectangular
Chrome plugin: https://chrome.google.com/webstore/detail/pano-fetch/ggmfokbjchlhboclfngkneflhkopebbh?hl=en
Note: The thumbnail url that you are using is also an unofficial way. You should use their API to load streetview thumbnail. Please refer: https://developers.google.com/maps/documentation/streetview/intro